@wix/auto_sdk_loyalty_earning-rules 1.0.11 → 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/{es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-B7haYXGy.d.mts} +239 -105
  14. package/build/{es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts → internal/loyalty-v1-loyalty-earning-rule-earning-rules.universal-B7haYXGy.d.ts} +239 -105
  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.types.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-C7uemg2R.d.mts} +234 -105
  22. package/build/{internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.d.ts → loyalty-v1-loyalty-earning-rule-earning-rules.universal-C7uemg2R.d.ts} +234 -105
  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.js +0 -151
  52. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  53. package/build/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -1294
  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.js +0 -148
  79. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  80. package/build/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -1294
  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.js +0 -151
  105. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  106. package/build/internal/cjs/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -1299
  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.js +0 -148
  131. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.types.js.map +0 -1
  132. package/build/internal/es/src/loyalty-v1-loyalty-earning-rule-earning-rules.universal.d.ts +0 -1299
  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,1294 +0,0 @@
1
- import { NonNullablePaths } from '@wix/sdk-types';
2
- /**
3
- * A loyalty earning rule defines how customers earn points in a loyalty program.
4
- * You can create rules for different activities, such as making purchases.
5
- */
6
- export interface LoyaltyEarningRule extends LoyaltyEarningRuleTypeOneOf {
7
- /** Fixed amount of points awarded for each qualifying activity. */
8
- fixedAmount?: FixedAmount;
9
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
10
- conversionRate?: ConversionRate;
11
- /**
12
- * Loyalty earning rule ID.
13
- * @format GUID
14
- * @readonly
15
- */
16
- _id?: string | null;
17
- /**
18
- * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
19
- * @format GUID
20
- */
21
- sourceAppId?: string;
22
- /**
23
- * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
24
- * @minLength 1
25
- * @maxLength 80
26
- */
27
- triggerAppId?: string;
28
- /**
29
- * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
30
- * @minLength 1
31
- * @maxLength 80
32
- */
33
- triggerActivityType?: string;
34
- /**
35
- * Name of the earning rule.
36
- * @minLength 1
37
- * @maxLength 50
38
- */
39
- title?: string;
40
- /** Current status of the earning rule. */
41
- status?: StatusWithLiterals;
42
- /**
43
- * Revision number, incremented by 1 each time the earning rule is updated.
44
- * Pass the latest revision when updating to prevent conflicting changes.
45
- */
46
- revision?: string | null;
47
- /**
48
- * Date and time the earning rule was created.
49
- * @readonly
50
- */
51
- _createdDate?: Date | null;
52
- /**
53
- * Date and time the earning rule was last updated.
54
- * @readonly
55
- */
56
- _updatedDate?: Date | null;
57
- /**
58
- * Additional metadata about the earning rule.
59
- * @readonly
60
- */
61
- metadata?: Metadata;
62
- }
63
- /** @oneof */
64
- export interface LoyaltyEarningRuleTypeOneOf {
65
- /** Fixed amount of points awarded for each qualifying activity. */
66
- fixedAmount?: FixedAmount;
67
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
68
- conversionRate?: ConversionRate;
69
- }
70
- /** Fixed amount type of earning rule. */
71
- export interface FixedAmount {
72
- /**
73
- * Fixed amount configurations for each tier.
74
- * @maxSize 21
75
- */
76
- configs?: FixedAmountConfig[];
77
- }
78
- export interface FixedAmountConfig {
79
- /**
80
- * Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction#terminology) is used.
81
- * @format GUID
82
- * @readonly
83
- */
84
- tierId?: string | null;
85
- /** Number of points to award. */
86
- points?: number;
87
- }
88
- /**
89
- * Conversion rate type of earning rule.
90
- * Customers earn points based on the amount spent.
91
- * For example, for every $10 spent, a customer might earn 1 point.
92
- */
93
- export interface ConversionRate {
94
- /**
95
- * Conversion rate configurations for each tier.
96
- *
97
- * Points are awarded proportionally to the amount spent.
98
- *
99
- * Formula: `(amount spent) / (money_amount * points)`.
100
- * @maxSize 21
101
- */
102
- configs?: ConversionRateConfig[];
103
- /**
104
- * Specifies which field in the Wix automations trigger payload [REST](https://dev.wix.com/docs/rest/business-management/automations/introduction#how-do-automations-work)|[SDK](https://dev.wix.com/docs/sdk/backend-modules/automations/triggered-events/reporting-and-canceling-events) to use for calculating points in conversion rate rules.
105
- * For example, if set to "priceSummary.totalAmount", the rule uses the total order amount to calculate loyalty points to be awarded.
106
- * This field is only applicable for automated earning rules.
107
- */
108
- field?: string | null;
109
- }
110
- export interface ConversionRateConfig {
111
- /**
112
- * Tier ID. If empty, the [base tier](https://dev.wix.com/docs/rest/crm/loyalty-program/tiers/introduction) is used.
113
- * @format GUID
114
- * @readonly
115
- */
116
- tierId?: string | null;
117
- /**
118
- * The amount of money used as a reference for point calculation.
119
- * Points are awarded proportionally to the amount spent.
120
- *
121
- * For example, if set to 10, 1 point is awarded for every 10 units of currency spent (assuming `points` is set to 1).
122
- *
123
- * Formula for points is: `(amount spent) / (money_amount * points)`.
124
- */
125
- moneyAmount?: number;
126
- /**
127
- * Points given for the specified `money_amount`.
128
- * Works in conjunction with `money_amount` to define the earning rule.
129
- *
130
- * For example: If `money_amount` is 20 and `points` is 10:
131
- * - Spending 10 units of currency earns 5 points
132
- * - Spending 20 units of currency earns 10 points
133
- * - Spending 30 units of currency earns 15 points
134
- */
135
- points?: number;
136
- }
137
- export declare enum Status {
138
- /** Status is unknown or not specified. */
139
- UNKNOWN = "UNKNOWN",
140
- /** Earning rule is active and can assign points. */
141
- ACTIVE = "ACTIVE",
142
- /** Earning rule is paused and can't assign points. */
143
- PAUSED = "PAUSED"
144
- }
145
- /** @enumType */
146
- export type StatusWithLiterals = Status | 'UNKNOWN' | 'ACTIVE' | 'PAUSED';
147
- export interface Metadata {
148
- /** Whether the earning rule can be deleted. */
149
- canBeDeleted?: boolean;
150
- }
151
- export interface LoyaltyEarningRuleTypeTag {
152
- /** Type of custom earning rule. */
153
- ruleType?: LoyaltyEarningRuleTypeTagTypeWithLiterals;
154
- }
155
- export declare enum LoyaltyEarningRuleTypeTagType {
156
- /** Type is unknown or not specified. */
157
- UNKNOWN_TYPE = "UNKNOWN_TYPE",
158
- /** Earning rule for a customer's birthday. */
159
- BIRTHDAY = "BIRTHDAY"
160
- }
161
- /** @enumType */
162
- export type LoyaltyEarningRuleTypeTagTypeWithLiterals = LoyaltyEarningRuleTypeTagType | 'UNKNOWN_TYPE' | 'BIRTHDAY';
163
- export interface CacheInvalidated {
164
- }
165
- export interface EarningRuleDisabled {
166
- }
167
- export interface CreateLoyaltyEarningRuleRequest {
168
- /** Earning rule to create. */
169
- earningRule: LoyaltyEarningRule;
170
- }
171
- export interface CreateLoyaltyEarningRuleResponse {
172
- /** Created earning rule. */
173
- earningRule?: LoyaltyEarningRule;
174
- }
175
- export interface BulkCreateLoyaltyEarningRulesRequest {
176
- /**
177
- * Earning rules to create.
178
- * @minSize 1
179
- * @maxSize 100
180
- */
181
- earningRules: LoyaltyEarningRule[];
182
- }
183
- export interface BulkCreateLoyaltyEarningRulesResponse {
184
- /** Created earning rules. */
185
- results?: BulkLoyaltyEarningRuleResult[];
186
- /** Additional metadata for the created earning rules. */
187
- bulkActionMetadata?: BulkActionMetadata;
188
- }
189
- export interface BulkLoyaltyEarningRuleResult {
190
- /** Additional metadata for the created earning rules. */
191
- itemMetadata?: ItemMetadata;
192
- /** Created earning rule. */
193
- item?: LoyaltyEarningRule;
194
- }
195
- export interface ItemMetadata {
196
- /** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
197
- _id?: string | null;
198
- /** Index of the item within the request array. Allows for correlation between request and response items. */
199
- originalIndex?: number;
200
- /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
201
- success?: boolean;
202
- /** Details about the error in case of failure. */
203
- error?: ApplicationError;
204
- }
205
- export interface ApplicationError {
206
- /** Error code. */
207
- code?: string;
208
- /** Description of the error. */
209
- description?: string;
210
- /** Data related to the error. */
211
- data?: Record<string, any> | null;
212
- }
213
- export interface BulkActionMetadata {
214
- /** Number of items that were successfully processed. */
215
- totalSuccesses?: number;
216
- /** Number of items that couldn't be processed. */
217
- totalFailures?: number;
218
- /** Number of failures without details because detailed failure threshold was exceeded. */
219
- undetailedFailures?: number;
220
- }
221
- export interface CreateCustomLoyaltyEarningRuleRequest {
222
- /** Type of the custom earning rule. */
223
- type: TypeWithLiterals;
224
- /** Custom earning rule to create. */
225
- earningRule?: CustomLoyaltyEarningRule;
226
- }
227
- export declare enum Type {
228
- /** Unknown type. This value is not used. */
229
- UNKNOWN_TYPE = "UNKNOWN_TYPE",
230
- /** Earning rule for social media. */
231
- SOCIAL_MEDIA = "SOCIAL_MEDIA",
232
- /** Earning rule for birthdays. */
233
- BIRTHDAY = "BIRTHDAY"
234
- }
235
- /** @enumType */
236
- export type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'SOCIAL_MEDIA' | 'BIRTHDAY';
237
- /** Used in CreateCustomLoyaltyEarningRuleRequest */
238
- export interface CustomLoyaltyEarningRule extends CustomLoyaltyEarningRuleTypeOneOf {
239
- /** Fixed amount of points awarded for each qualifying activity. */
240
- fixedAmount?: FixedAmount;
241
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
242
- conversionRate?: ConversionRate;
243
- /**
244
- * Name of the earning rule.
245
- * @minLength 1
246
- * @maxLength 50
247
- */
248
- title?: string;
249
- }
250
- /** @oneof */
251
- export interface CustomLoyaltyEarningRuleTypeOneOf {
252
- /** Fixed amount of points awarded for each qualifying activity. */
253
- fixedAmount?: FixedAmount;
254
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
255
- conversionRate?: ConversionRate;
256
- }
257
- export interface CreateCustomLoyaltyEarningRuleResponse {
258
- /** Created earning rule. */
259
- earningRule?: LoyaltyEarningRule;
260
- }
261
- export interface GetLoyaltyEarningRuleRequest {
262
- /**
263
- * ID of the earning rule to retrieve.
264
- * @format GUID
265
- */
266
- _id: string;
267
- }
268
- export interface GetLoyaltyEarningRuleResponse {
269
- /** Retrieved earning rule. */
270
- earningRule?: LoyaltyEarningRule;
271
- }
272
- export interface UpdateLoyaltyEarningRuleRequest {
273
- /** Earning rule to update. */
274
- earningRule: LoyaltyEarningRule;
275
- }
276
- export interface UpdateLoyaltyEarningRuleResponse {
277
- /** The updated earning rule. */
278
- earningRule?: LoyaltyEarningRule;
279
- }
280
- export interface DeleteLoyaltyEarningRuleRequest {
281
- /**
282
- * ID of the earning rule to delete.
283
- * @format GUID
284
- */
285
- _id: string;
286
- /**
287
- * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
288
- * Pass the latest revision when updating to prevent conflicting changes.
289
- */
290
- revision?: string;
291
- }
292
- export interface DeleteLoyaltyEarningRuleResponse {
293
- }
294
- export interface DeleteAutomationEarningRuleRequest {
295
- /**
296
- * ID of the earning rule to delete.
297
- * @format GUID
298
- */
299
- _id: string;
300
- }
301
- export interface DeleteAutomationEarningRuleResponse {
302
- }
303
- export interface ListEarningRulesRequest {
304
- /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
305
- triggerAppId?: string | null;
306
- /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
307
- triggerActivityType?: string | null;
308
- }
309
- export interface ListEarningRulesResponse {
310
- /** Retrieved earning rules. */
311
- earningRules?: LoyaltyEarningRule[];
312
- }
313
- export interface ListEarningRulesInTierRequest {
314
- /**
315
- * ID of the tier for which the earning rules will be returned.
316
- * @format GUID
317
- */
318
- tierId?: string | null;
319
- /** Pagination options. */
320
- paging?: CursorPaging;
321
- }
322
- export interface CursorPaging {
323
- /**
324
- * Maximum number of items to return in the results.
325
- * @max 100
326
- */
327
- limit?: number | null;
328
- /**
329
- * Pointer to the next or previous page in the list of results.
330
- *
331
- * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
332
- * Not relevant for the first request.
333
- * @maxLength 16000
334
- */
335
- cursor?: string | null;
336
- }
337
- export interface ListEarningRulesInTierResponse {
338
- /** Retrieved earning rules. */
339
- earningRules?: LoyaltyEarningRule[];
340
- /** Details on the paged set of results returned. */
341
- pagingMetadata?: PagingMetadataV2;
342
- }
343
- export interface PagingMetadataV2 {
344
- /** Number of items returned in the response. */
345
- count?: number | null;
346
- /** Offset that was requested. */
347
- offset?: number | null;
348
- /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
349
- total?: number | null;
350
- /** Flag that indicates the server failed to calculate the `total` field. */
351
- tooManyToCount?: boolean | null;
352
- /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
353
- cursors?: Cursors;
354
- }
355
- export interface Cursors {
356
- /**
357
- * Cursor string pointing to the next page in the list of results.
358
- * @maxLength 16000
359
- */
360
- next?: string | null;
361
- /**
362
- * Cursor pointing to the previous page in the list of results.
363
- * @maxLength 16000
364
- */
365
- prev?: string | null;
366
- }
367
- export interface DomainEvent extends DomainEventBodyOneOf {
368
- createdEvent?: EntityCreatedEvent;
369
- updatedEvent?: EntityUpdatedEvent;
370
- deletedEvent?: EntityDeletedEvent;
371
- actionEvent?: ActionEvent;
372
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
373
- _id?: string;
374
- /**
375
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
376
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
377
- */
378
- entityFqdn?: string;
379
- /**
380
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
381
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
382
- */
383
- slug?: string;
384
- /** ID of the entity associated with the event. */
385
- entityId?: string;
386
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
387
- eventTime?: Date | null;
388
- /**
389
- * Whether the event was triggered as a result of a privacy regulation application
390
- * (for example, GDPR).
391
- */
392
- triggeredByAnonymizeRequest?: boolean | null;
393
- /** If present, indicates the action that triggered the event. */
394
- originatedFrom?: string | null;
395
- /**
396
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
397
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
398
- */
399
- entityEventSequence?: string | null;
400
- }
401
- /** @oneof */
402
- export interface DomainEventBodyOneOf {
403
- createdEvent?: EntityCreatedEvent;
404
- updatedEvent?: EntityUpdatedEvent;
405
- deletedEvent?: EntityDeletedEvent;
406
- actionEvent?: ActionEvent;
407
- }
408
- export interface EntityCreatedEvent {
409
- entity?: string;
410
- }
411
- export interface RestoreInfo {
412
- deletedDate?: Date | null;
413
- }
414
- export interface EntityUpdatedEvent {
415
- /**
416
- * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
417
- * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
418
- * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
419
- */
420
- currentEntity?: string;
421
- }
422
- export interface EntityDeletedEvent {
423
- /** Entity that was deleted. */
424
- deletedEntity?: string | null;
425
- }
426
- export interface ActionEvent {
427
- body?: string;
428
- }
429
- export interface Empty {
430
- }
431
- export interface InvalidateEarningRuleCacheRequest {
432
- }
433
- export interface InvalidateEarningRuleCacheResponse {
434
- }
435
- export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
436
- /** Emitted on a meta site creation. */
437
- siteCreated?: SiteCreated;
438
- /** Emitted on a meta site transfer completion. */
439
- siteTransferred?: SiteTransferred;
440
- /** Emitted on a meta site deletion. */
441
- siteDeleted?: SiteDeleted;
442
- /** Emitted on a meta site restoration. */
443
- siteUndeleted?: SiteUndeleted;
444
- /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
445
- sitePublished?: SitePublished;
446
- /** Emitted on a meta site unpublish. */
447
- siteUnpublished?: SiteUnpublished;
448
- /** Emitted when meta site is marked as template. */
449
- siteMarkedAsTemplate?: SiteMarkedAsTemplate;
450
- /** Emitted when meta site is marked as a WixSite. */
451
- siteMarkedAsWixSite?: SiteMarkedAsWixSite;
452
- /** Emitted when an application is provisioned (installed). */
453
- serviceProvisioned?: ServiceProvisioned;
454
- /** Emitted when an application is removed (uninstalled). */
455
- serviceRemoved?: ServiceRemoved;
456
- /** Emitted when meta site name (URL slug) is changed. */
457
- siteRenamedPayload?: SiteRenamed;
458
- /** Emitted when meta site was permanently deleted. */
459
- hardDeleted?: SiteHardDeleted;
460
- /** Emitted on a namespace change. */
461
- namespaceChanged?: NamespaceChanged;
462
- /** Emitted when Studio is attached. */
463
- studioAssigned?: StudioAssigned;
464
- /** Emitted when Studio is detached. */
465
- studioUnassigned?: StudioUnassigned;
466
- /**
467
- * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
468
- * the actual URL.
469
- *
470
- * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
471
- * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
472
- */
473
- urlChanged?: SiteUrlChanged;
474
- /** Site is marked as PurgedExternally */
475
- sitePurgedExternally?: SitePurgedExternally;
476
- /** Emitted when Odeditor is attached. */
477
- odeditorAssigned?: OdeditorAssigned;
478
- /** Emitted when Odeditor is detached. */
479
- odeditorUnassigned?: OdeditorUnassigned;
480
- /** Emitted when Picasso is attached. */
481
- picassoAssigned?: PicassoAssigned;
482
- /** Emitted when Picasso is detached. */
483
- picassoUnassigned?: PicassoUnassigned;
484
- /**
485
- * A meta site id.
486
- * @format GUID
487
- */
488
- metaSiteId?: string;
489
- /** A meta site version. Monotonically increasing. */
490
- version?: string;
491
- /** A timestamp of the event. */
492
- timestamp?: string;
493
- /**
494
- * TODO(meta-site): Change validation once validations are disabled for consumers
495
- * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659
496
- * @maxSize 4000
497
- */
498
- assets?: Asset[];
499
- }
500
- /** @oneof */
501
- export interface MetaSiteSpecialEventPayloadOneOf {
502
- /** Emitted on a meta site creation. */
503
- siteCreated?: SiteCreated;
504
- /** Emitted on a meta site transfer completion. */
505
- siteTransferred?: SiteTransferred;
506
- /** Emitted on a meta site deletion. */
507
- siteDeleted?: SiteDeleted;
508
- /** Emitted on a meta site restoration. */
509
- siteUndeleted?: SiteUndeleted;
510
- /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
511
- sitePublished?: SitePublished;
512
- /** Emitted on a meta site unpublish. */
513
- siteUnpublished?: SiteUnpublished;
514
- /** Emitted when meta site is marked as template. */
515
- siteMarkedAsTemplate?: SiteMarkedAsTemplate;
516
- /** Emitted when meta site is marked as a WixSite. */
517
- siteMarkedAsWixSite?: SiteMarkedAsWixSite;
518
- /** Emitted when an application is provisioned (installed). */
519
- serviceProvisioned?: ServiceProvisioned;
520
- /** Emitted when an application is removed (uninstalled). */
521
- serviceRemoved?: ServiceRemoved;
522
- /** Emitted when meta site name (URL slug) is changed. */
523
- siteRenamedPayload?: SiteRenamed;
524
- /** Emitted when meta site was permanently deleted. */
525
- hardDeleted?: SiteHardDeleted;
526
- /** Emitted on a namespace change. */
527
- namespaceChanged?: NamespaceChanged;
528
- /** Emitted when Studio is attached. */
529
- studioAssigned?: StudioAssigned;
530
- /** Emitted when Studio is detached. */
531
- studioUnassigned?: StudioUnassigned;
532
- /**
533
- * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch
534
- * the actual URL.
535
- *
536
- * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT
537
- * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459
538
- */
539
- urlChanged?: SiteUrlChanged;
540
- /** Site is marked as PurgedExternally */
541
- sitePurgedExternally?: SitePurgedExternally;
542
- /** Emitted when Odeditor is attached. */
543
- odeditorAssigned?: OdeditorAssigned;
544
- /** Emitted when Odeditor is detached. */
545
- odeditorUnassigned?: OdeditorUnassigned;
546
- /** Emitted when Picasso is attached. */
547
- picassoAssigned?: PicassoAssigned;
548
- /** Emitted when Picasso is detached. */
549
- picassoUnassigned?: PicassoUnassigned;
550
- }
551
- export interface Asset {
552
- /**
553
- * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum).
554
- * @maxLength 36
555
- */
556
- appDefId?: string;
557
- /**
558
- * An instance id. For legacy reasons may be UUID or a string.
559
- * @maxLength 200
560
- */
561
- instanceId?: string;
562
- /** An application state. */
563
- state?: StateWithLiterals;
564
- }
565
- export declare enum State {
566
- UNKNOWN = "UNKNOWN",
567
- ENABLED = "ENABLED",
568
- DISABLED = "DISABLED",
569
- PENDING = "PENDING",
570
- DEMO = "DEMO"
571
- }
572
- /** @enumType */
573
- export type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO';
574
- export interface SiteCreated {
575
- /**
576
- * A template identifier (empty if not created from a template).
577
- * @maxLength 36
578
- */
579
- originTemplateId?: string;
580
- /**
581
- * An account id of the owner.
582
- * @format GUID
583
- */
584
- ownerId?: string;
585
- /** A context in which meta site was created. */
586
- context?: SiteCreatedContextWithLiterals;
587
- /**
588
- * A meta site id from which this site was created.
589
- *
590
- * In case of a creation from a template it's a template id.
591
- * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
592
- * @format GUID
593
- */
594
- originMetaSiteId?: string | null;
595
- /**
596
- * A meta site name (URL slug).
597
- * @maxLength 20
598
- */
599
- siteName?: string;
600
- /** A namespace. */
601
- namespace?: NamespaceWithLiterals;
602
- }
603
- export declare enum SiteCreatedContext {
604
- /** A valid option, we don't expose all reasons why site might be created. */
605
- OTHER = "OTHER",
606
- /** A meta site was created from template. */
607
- FROM_TEMPLATE = "FROM_TEMPLATE",
608
- /** A meta site was created by copying of the transfferred meta site. */
609
- DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
610
- /** A copy of existing meta site. */
611
- DUPLICATE = "DUPLICATE",
612
- /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
613
- OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
614
- /** deprecated A meta site was created for Flash editor. */
615
- FLASH = "FLASH"
616
- }
617
- /** @enumType */
618
- export type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH';
619
- export declare enum Namespace {
620
- UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
621
- /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
622
- WIX = "WIX",
623
- /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */
624
- SHOUT_OUT = "SHOUT_OUT",
625
- /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */
626
- ALBUMS = "ALBUMS",
627
- /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */
628
- WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
629
- /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
630
- HOTELS = "HOTELS",
631
- /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
632
- CLUBS = "CLUBS",
633
- /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
634
- ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
635
- /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
636
- DEV_SITE = "DEV_SITE",
637
- /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
638
- LOGOS = "LOGOS",
639
- /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */
640
- VIDEO_MAKER = "VIDEO_MAKER",
641
- /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
642
- PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
643
- /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
644
- DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
645
- /**
646
- * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
647
- *
648
- * Meta site with this namespace will *not* be shown in a user's site list by default.
649
- */
650
- HTML_DRAFT = "HTML_DRAFT",
651
- /**
652
- * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
653
- * Will be accessible from Site List and will not have a website app.
654
- * Once the user attaches a site, the site will become a regular wixsite.
655
- */
656
- SITELESS_BUSINESS = "SITELESS_BUSINESS",
657
- /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
658
- CREATOR_ECONOMY = "CREATOR_ECONOMY",
659
- /** It is to be used in the Business First efforts. */
660
- DASHBOARD_FIRST = "DASHBOARD_FIRST",
661
- /** Bookings business flow with no site. */
662
- ANYWHERE = "ANYWHERE",
663
- /** Namespace for Headless Backoffice with no editor */
664
- HEADLESS = "HEADLESS",
665
- /**
666
- * Namespace for master site that will exist in parent account that will be referenced by subaccounts
667
- * The site will be used for account level CSM feature for enterprise
668
- */
669
- ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
670
- /** Rise.ai Siteless account management for Gift Cards and Store Credit. */
671
- RISE = "RISE",
672
- /**
673
- * As part of the branded app new funnel, users now can create a meta site that will be branded app first.
674
- * There's a blank site behind the scene but it's blank).
675
- * The Mobile company will be the owner of this namespace.
676
- */
677
- BRANDED_FIRST = "BRANDED_FIRST",
678
- /** Nownia.com Siteless account management for Ai Scheduling Assistant. */
679
- NOWNIA = "NOWNIA",
680
- /**
681
- * UGC Templates are templates that are created by users for personal use and to sale to other users.
682
- * The Partners company owns this namespace.
683
- */
684
- UGC_TEMPLATE = "UGC_TEMPLATE",
685
- /** Codux Headless Sites */
686
- CODUX = "CODUX",
687
- /** Bobb - AI Design Creator. */
688
- MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
689
- /**
690
- * Shared Blog Site is a unique single site across Enterprise account,
691
- * This site will hold all Blog posts related to the Marketing product.
692
- */
693
- SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE",
694
- /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
695
- STANDALONE_FORMS = "STANDALONE_FORMS",
696
- /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
697
- STANDALONE_EVENTS = "STANDALONE_EVENTS",
698
- /** MIMIR - Siteless account for MIMIR Ai Job runner. */
699
- MIMIR = "MIMIR"
700
- }
701
- /** @enumType */
702
- export 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';
703
- /** Site transferred to another user. */
704
- export interface SiteTransferred {
705
- /**
706
- * A previous owner id (user that transfers meta site).
707
- * @format GUID
708
- */
709
- oldOwnerId?: string;
710
- /**
711
- * A new owner id (user that accepts meta site).
712
- * @format GUID
713
- */
714
- newOwnerId?: string;
715
- }
716
- /** Soft deletion of the meta site. Could be restored. */
717
- export interface SiteDeleted {
718
- /** A deletion context. */
719
- deleteContext?: DeleteContext;
720
- }
721
- export interface DeleteContext {
722
- /** When the meta site was deleted. */
723
- dateDeleted?: Date | null;
724
- /** A status. */
725
- deleteStatus?: DeleteStatusWithLiterals;
726
- /**
727
- * A reason (flow).
728
- * @maxLength 255
729
- */
730
- deleteOrigin?: string;
731
- /**
732
- * A service that deleted it.
733
- * @maxLength 255
734
- */
735
- initiatorId?: string | null;
736
- }
737
- export declare enum DeleteStatus {
738
- UNKNOWN = "UNKNOWN",
739
- TRASH = "TRASH",
740
- DELETED = "DELETED",
741
- PENDING_PURGE = "PENDING_PURGE",
742
- PURGED_EXTERNALLY = "PURGED_EXTERNALLY"
743
- }
744
- /** @enumType */
745
- export type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY';
746
- /** Restoration of the meta site. */
747
- export interface SiteUndeleted {
748
- }
749
- /** First publish of a meta site. Or subsequent publish after unpublish. */
750
- export interface SitePublished {
751
- }
752
- export interface SiteUnpublished {
753
- /**
754
- * A list of URLs previously associated with the meta site.
755
- * @maxLength 4000
756
- * @maxSize 10000
757
- */
758
- urls?: string[];
759
- }
760
- export interface SiteMarkedAsTemplate {
761
- }
762
- export interface SiteMarkedAsWixSite {
763
- }
764
- /**
765
- * Represents a service provisioned a site.
766
- *
767
- * Note on `origin_instance_id`:
768
- * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
769
- * This is because of the following scenario:
770
- *
771
- * Imagine you have a template where a third-party application (TPA) includes some stub data,
772
- * such as a product catalog. When you create a site from this template, you inherit this
773
- * default product catalog. However, if the template's product catalog is modified,
774
- * your site will retain the catalog as it was at the time of site creation. This ensures that
775
- * your site remains consistent with what you initially received and does not include any
776
- * changes made to the original template afterward.
777
- * To ensure this, the TPA on the template gets a new instance_id.
778
- */
779
- export interface ServiceProvisioned {
780
- /**
781
- * Either UUID or EmbeddedServiceType.
782
- * @maxLength 36
783
- */
784
- appDefId?: string;
785
- /**
786
- * Not only UUID. Something here could be something weird.
787
- * @maxLength 36
788
- */
789
- instanceId?: string;
790
- /**
791
- * An instance id from which this instance is originated.
792
- * @maxLength 36
793
- */
794
- originInstanceId?: string;
795
- /**
796
- * A version.
797
- * @maxLength 500
798
- */
799
- version?: string | null;
800
- /**
801
- * The origin meta site id
802
- * @format GUID
803
- */
804
- originMetaSiteId?: string | null;
805
- }
806
- export interface ServiceRemoved {
807
- /**
808
- * Either UUID or EmbeddedServiceType.
809
- * @maxLength 36
810
- */
811
- appDefId?: string;
812
- /**
813
- * Not only UUID. Something here could be something weird.
814
- * @maxLength 36
815
- */
816
- instanceId?: string;
817
- /**
818
- * A version.
819
- * @maxLength 500
820
- */
821
- version?: string | null;
822
- }
823
- /** Rename of the site. Meaning, free public url has been changed as well. */
824
- export interface SiteRenamed {
825
- /**
826
- * A new meta site name (URL slug).
827
- * @maxLength 20
828
- */
829
- newSiteName?: string;
830
- /**
831
- * A previous meta site name (URL slug).
832
- * @maxLength 255
833
- */
834
- oldSiteName?: string;
835
- }
836
- /**
837
- * Hard deletion of the meta site.
838
- *
839
- * Could not be restored. Therefore it's desirable to cleanup data.
840
- */
841
- export interface SiteHardDeleted {
842
- /** A deletion context. */
843
- deleteContext?: DeleteContext;
844
- }
845
- export interface NamespaceChanged {
846
- /** A previous namespace. */
847
- oldNamespace?: NamespaceWithLiterals;
848
- /** A new namespace. */
849
- newNamespace?: NamespaceWithLiterals;
850
- }
851
- /** Assigned Studio editor */
852
- export interface StudioAssigned {
853
- }
854
- /** Unassigned Studio editor */
855
- export interface StudioUnassigned {
856
- }
857
- /**
858
- * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc.
859
- *
860
- * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up
861
- * with sites and its urls, you need to listen to another topic/event. Read about it:
862
- *
863
- * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service
864
- */
865
- export interface SiteUrlChanged {
866
- }
867
- /**
868
- * Used at the end of the deletion flow for both draft sites and when a user deletes a site.
869
- * Consumed by other teams to remove relevant data.
870
- */
871
- export interface SitePurgedExternally {
872
- /**
873
- * @maxLength 2048
874
- * @maxSize 100
875
- * @deprecated
876
- * @targetRemovalDate 2025-04-15
877
- */
878
- appDefId?: string[];
879
- }
880
- /** Assigned Odeditor */
881
- export interface OdeditorAssigned {
882
- }
883
- /** Unassigned Odeditor */
884
- export interface OdeditorUnassigned {
885
- }
886
- /** Assigned Picasso editor */
887
- export interface PicassoAssigned {
888
- }
889
- /** Unassigned Picasso */
890
- export interface PicassoUnassigned {
891
- }
892
- export interface MessageEnvelope {
893
- /**
894
- * App instance ID.
895
- * @format GUID
896
- */
897
- instanceId?: string | null;
898
- /**
899
- * Event type.
900
- * @maxLength 150
901
- */
902
- eventType?: string;
903
- /** The identification type and identity data. */
904
- identity?: IdentificationData;
905
- /** Stringify payload. */
906
- data?: string;
907
- }
908
- export interface IdentificationData extends IdentificationDataIdOneOf {
909
- /**
910
- * ID of a site visitor that has not logged in to the site.
911
- * @format GUID
912
- */
913
- anonymousVisitorId?: string;
914
- /**
915
- * ID of a site visitor that has logged in to the site.
916
- * @format GUID
917
- */
918
- memberId?: string;
919
- /**
920
- * ID of a Wix user (site owner, contributor, etc.).
921
- * @format GUID
922
- */
923
- wixUserId?: string;
924
- /**
925
- * ID of an app.
926
- * @format GUID
927
- */
928
- appId?: string;
929
- /** @readonly */
930
- identityType?: WebhookIdentityTypeWithLiterals;
931
- }
932
- /** @oneof */
933
- export interface IdentificationDataIdOneOf {
934
- /**
935
- * ID of a site visitor that has not logged in to the site.
936
- * @format GUID
937
- */
938
- anonymousVisitorId?: string;
939
- /**
940
- * ID of a site visitor that has logged in to the site.
941
- * @format GUID
942
- */
943
- memberId?: string;
944
- /**
945
- * ID of a Wix user (site owner, contributor, etc.).
946
- * @format GUID
947
- */
948
- wixUserId?: string;
949
- /**
950
- * ID of an app.
951
- * @format GUID
952
- */
953
- appId?: string;
954
- }
955
- export declare enum WebhookIdentityType {
956
- UNKNOWN = "UNKNOWN",
957
- ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
958
- MEMBER = "MEMBER",
959
- WIX_USER = "WIX_USER",
960
- APP = "APP"
961
- }
962
- /** @enumType */
963
- export type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
964
- export interface BaseEventMetadata {
965
- /**
966
- * App instance ID.
967
- * @format GUID
968
- */
969
- instanceId?: string | null;
970
- /**
971
- * Event type.
972
- * @maxLength 150
973
- */
974
- eventType?: string;
975
- /** The identification type and identity data. */
976
- identity?: IdentificationData;
977
- }
978
- export interface EventMetadata extends BaseEventMetadata {
979
- /** Event ID. With this ID you can easily spot duplicated events and ignore them. */
980
- _id?: string;
981
- /**
982
- * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.
983
- * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.
984
- */
985
- entityFqdn?: string;
986
- /**
987
- * Event action name, placed at the top level to make it easier for users to dispatch messages.
988
- * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.
989
- */
990
- slug?: string;
991
- /** ID of the entity associated with the event. */
992
- entityId?: string;
993
- /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */
994
- eventTime?: Date | null;
995
- /**
996
- * Whether the event was triggered as a result of a privacy regulation application
997
- * (for example, GDPR).
998
- */
999
- triggeredByAnonymizeRequest?: boolean | null;
1000
- /** If present, indicates the action that triggered the event. */
1001
- originatedFrom?: string | null;
1002
- /**
1003
- * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.
1004
- * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.
1005
- */
1006
- entityEventSequence?: string | null;
1007
- }
1008
- export interface LoyaltyEarningRuleCreatedEnvelope {
1009
- entity: LoyaltyEarningRule;
1010
- metadata: EventMetadata;
1011
- }
1012
- /**
1013
- * Triggered when an earning rule is created.
1014
- * @permissionScope Read Loyalty
1015
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1016
- * @permissionScope Manage Loyalty
1017
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1018
- * @permissionScope Manage Restaurants - all permissions
1019
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1020
- * @permissionId LOYALTY.READ_EARNING_RULES
1021
- * @webhook
1022
- * @eventType wix.loyalty.v1.loyalty_earning_rule_created
1023
- * @slug created
1024
- */
1025
- export declare function onLoyaltyEarningRuleCreated(handler: (event: LoyaltyEarningRuleCreatedEnvelope) => void | Promise<void>): void;
1026
- export interface LoyaltyEarningRuleDeletedEnvelope {
1027
- metadata: EventMetadata;
1028
- }
1029
- /**
1030
- * Triggered when an earning rule is deleted.
1031
- * @permissionScope Read Loyalty
1032
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1033
- * @permissionScope Manage Loyalty
1034
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1035
- * @permissionScope Manage Restaurants - all permissions
1036
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1037
- * @permissionId LOYALTY.READ_EARNING_RULES
1038
- * @webhook
1039
- * @eventType wix.loyalty.v1.loyalty_earning_rule_deleted
1040
- * @slug deleted
1041
- */
1042
- export declare function onLoyaltyEarningRuleDeleted(handler: (event: LoyaltyEarningRuleDeletedEnvelope) => void | Promise<void>): void;
1043
- export interface LoyaltyEarningRuleUpdatedEnvelope {
1044
- entity: LoyaltyEarningRule;
1045
- metadata: EventMetadata;
1046
- }
1047
- /**
1048
- * Triggered when an earning rule is updated.
1049
- * @permissionScope Read Loyalty
1050
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1051
- * @permissionScope Manage Loyalty
1052
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1053
- * @permissionScope Manage Restaurants - all permissions
1054
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1055
- * @permissionId LOYALTY.READ_EARNING_RULES
1056
- * @webhook
1057
- * @eventType wix.loyalty.v1.loyalty_earning_rule_updated
1058
- * @slug updated
1059
- */
1060
- export declare function onLoyaltyEarningRuleUpdated(handler: (event: LoyaltyEarningRuleUpdatedEnvelope) => void | Promise<void>): void;
1061
- 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`;
1062
- /**
1063
- * Creates a non-automated earning rule.
1064
- *
1065
- * >**Note**: You can only create non-automated earning rules from a supported list.
1066
- * For the supported list of services, see the introduction.
1067
- * @param earningRule - Earning rule to create.
1068
- * @public
1069
- * @requiredField earningRule
1070
- * @requiredField earningRule.sourceAppId
1071
- * @requiredField earningRule.status
1072
- * @requiredField earningRule.title
1073
- * @requiredField earningRule.triggerActivityType
1074
- * @requiredField earningRule.triggerAppId
1075
- * @requiredField earningRule.type
1076
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1077
- * @permissionScope Manage Loyalty
1078
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1079
- * @permissionScope Manage Restaurants - all permissions
1080
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1081
- * @applicableIdentity APP
1082
- * @returns Created earning rule.
1083
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateLoyaltyEarningRule
1084
- */
1085
- export declare function createLoyaltyEarningRule(earningRule: NonNullablePaths<LoyaltyEarningRule, `sourceAppId` | `status` | `title` | `triggerActivityType` | `triggerAppId`>): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
1086
- /**
1087
- * Creates multiple non-automated earning rules.
1088
- *
1089
- * >**Note**: You can only create non-automated earning rules from a supported list.
1090
- * For the supported list of services, see the introduction.
1091
- * @param earningRules - Earning rules to create.
1092
- * @public
1093
- * @requiredField earningRules
1094
- * @requiredField earningRules.sourceAppId
1095
- * @requiredField earningRules.status
1096
- * @requiredField earningRules.title
1097
- * @requiredField earningRules.triggerActivityType
1098
- * @requiredField earningRules.triggerAppId
1099
- * @requiredField earningRules.type
1100
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1101
- * @permissionScope Manage Loyalty
1102
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1103
- * @permissionScope Manage Restaurants - all permissions
1104
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1105
- * @applicableIdentity APP
1106
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.BulkCreateLoyaltyEarningRules
1107
- */
1108
- 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` | {
1109
- [P in LoyaltyEarningRuleNonNullablePaths]: `results.${number}.item.${P}`;
1110
- }[LoyaltyEarningRuleNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
1111
- /**
1112
- * Creates a custom automated earning rule.
1113
- *
1114
- * To learn more about the automated rules, read the introduction.
1115
- * @param type - Type of the custom earning rule.
1116
- * @public
1117
- * @requiredField type
1118
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1119
- * @permissionScope Manage Loyalty
1120
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1121
- * @permissionScope Manage Restaurants - all permissions
1122
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1123
- * @applicableIdentity APP
1124
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.CreateCustomLoyaltyEarningRule
1125
- */
1126
- export declare function createCustomLoyaltyEarningRule(type: TypeWithLiterals, options?: CreateCustomLoyaltyEarningRuleOptions): Promise<NonNullablePaths<CreateCustomLoyaltyEarningRuleResponse, {
1127
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
1128
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1129
- export interface CreateCustomLoyaltyEarningRuleOptions {
1130
- /** Custom earning rule to create. */
1131
- earningRule?: CustomLoyaltyEarningRule;
1132
- }
1133
- /**
1134
- * Retrieves a specified non-automated earning rule.
1135
- * @param _id - ID of the earning rule to retrieve.
1136
- * @public
1137
- * @requiredField _id
1138
- * @permissionId LOYALTY.READ_EARNING_RULES
1139
- * @permissionScope Read Loyalty
1140
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1141
- * @permissionScope Manage Loyalty
1142
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1143
- * @permissionScope Manage Restaurants - all permissions
1144
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1145
- * @applicableIdentity APP
1146
- * @applicableIdentity VISITOR
1147
- * @returns Retrieved earning rule.
1148
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.GetLoyaltyEarningRule
1149
- */
1150
- export declare function getLoyaltyEarningRule(_id: string): Promise<NonNullablePaths<LoyaltyEarningRule, LoyaltyEarningRuleNonNullablePaths>>;
1151
- /**
1152
- * Updates an earning rule.
1153
- *
1154
- * Supports partial updates.
1155
- *
1156
- * Revision number, which increments by 1 each time the earning rule is updated. To prevent conflicting changes,
1157
- * the current revision must be passed when updating the earning rule.
1158
- * @param _id - Loyalty earning rule ID.
1159
- * @public
1160
- * @requiredField _id
1161
- * @requiredField earningRule
1162
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1163
- * @permissionScope Manage Loyalty
1164
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1165
- * @permissionScope Manage Restaurants - all permissions
1166
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1167
- * @applicableIdentity APP
1168
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.UpdateLoyaltyEarningRule
1169
- */
1170
- export declare function updateLoyaltyEarningRule(_id: string, earningRule: UpdateLoyaltyEarningRule): Promise<NonNullablePaths<UpdateLoyaltyEarningRuleResponse, {
1171
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRule.${P}`;
1172
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1173
- export interface UpdateLoyaltyEarningRule {
1174
- /** Fixed amount of points awarded for each qualifying activity. */
1175
- fixedAmount?: FixedAmount;
1176
- /** Points awarded based on a conversion rate formula: `(amount spent) / (money_amount * points)`. */
1177
- conversionRate?: ConversionRate;
1178
- /**
1179
- * Loyalty earning rule ID.
1180
- * @format GUID
1181
- * @readonly
1182
- */
1183
- _id?: string | null;
1184
- /**
1185
- * ID of the app managing the earning rule. Can be a loyalty app ID or a Wix automations app ID.
1186
- * @format GUID
1187
- */
1188
- sourceAppId?: string;
1189
- /**
1190
- * ID of the app that triggers point assignment. Examples: Wix Stores, Wix Bookings, Wix Events.
1191
- * @minLength 1
1192
- * @maxLength 80
1193
- */
1194
- triggerAppId?: string;
1195
- /**
1196
- * Type of activity that triggers point assignment. For example, `wix-restaurants/orderSubmitted` or `birthday`.
1197
- * @minLength 1
1198
- * @maxLength 80
1199
- */
1200
- triggerActivityType?: string;
1201
- /**
1202
- * Name of the earning rule.
1203
- * @minLength 1
1204
- * @maxLength 50
1205
- */
1206
- title?: string;
1207
- /** Current status of the earning rule. */
1208
- status?: StatusWithLiterals;
1209
- /**
1210
- * Revision number, incremented by 1 each time the earning rule is updated.
1211
- * Pass the latest revision when updating to prevent conflicting changes.
1212
- */
1213
- revision?: string | null;
1214
- /**
1215
- * Date and time the earning rule was created.
1216
- * @readonly
1217
- */
1218
- _createdDate?: Date | null;
1219
- /**
1220
- * Date and time the earning rule was last updated.
1221
- * @readonly
1222
- */
1223
- _updatedDate?: Date | null;
1224
- /**
1225
- * Additional metadata about the earning rule.
1226
- * @readonly
1227
- */
1228
- metadata?: Metadata;
1229
- }
1230
- /**
1231
- * Deletes a non-automated earning rule.
1232
- * @param _id - ID of the earning rule to delete.
1233
- * @public
1234
- * @requiredField _id
1235
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1236
- * @permissionScope Manage Loyalty
1237
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1238
- * @permissionScope Manage Restaurants - all permissions
1239
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1240
- * @applicableIdentity APP
1241
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteLoyaltyEarningRule
1242
- */
1243
- export declare function deleteLoyaltyEarningRule(_id: string, options?: DeleteLoyaltyEarningRuleOptions): Promise<void>;
1244
- export interface DeleteLoyaltyEarningRuleOptions {
1245
- /**
1246
- * Revision of the earning rule. Incremented by 1 each time the earning rule is updated.
1247
- * Pass the latest revision when updating to prevent conflicting changes.
1248
- */
1249
- revision?: string;
1250
- }
1251
- /**
1252
- * Deletes a custom automated earning rule.
1253
- *
1254
- * > **Note:** Pre-installed automated rules can only be paused, not deleted.
1255
- * @param _id - ID of the earning rule to delete.
1256
- * @public
1257
- * @requiredField _id
1258
- * @permissionId LOYALTY.MANAGE_EARNING_RULES
1259
- * @permissionScope Manage Loyalty
1260
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1261
- * @permissionScope Manage Restaurants - all permissions
1262
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1263
- * @applicableIdentity APP
1264
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.DeleteAutomationEarningRule
1265
- */
1266
- export declare function deleteAutomationEarningRule(_id: string): Promise<void>;
1267
- /**
1268
- * Retrieves a list of earning rules.
1269
- *
1270
- * Returns both automated and non-automated earning rules.
1271
- *
1272
- * You can filter the results by `triggerAppId` or `triggerActivityType`.
1273
- * @public
1274
- * @permissionId LOYALTY.READ_EARNING_RULES
1275
- * @permissionScope Read Loyalty
1276
- * @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
1277
- * @permissionScope Manage Loyalty
1278
- * @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
1279
- * @permissionScope Manage Restaurants - all permissions
1280
- * @permissionScopeId SCOPE.RESTAURANTS.MEGA-SCOPES
1281
- * @applicableIdentity APP
1282
- * @applicableIdentity VISITOR
1283
- * @fqn com.wixpress.loyalty.earningrule.LoyaltyEarningRules.ListEarningRules
1284
- */
1285
- export declare function listEarningRules(options?: ListEarningRulesOptions): Promise<NonNullablePaths<ListEarningRulesResponse, {
1286
- [P in LoyaltyEarningRuleNonNullablePaths]: `earningRules.${number}.${P}`;
1287
- }[LoyaltyEarningRuleNonNullablePaths]>>;
1288
- export interface ListEarningRulesOptions {
1289
- /** App ID that triggers the point assignment. For example, `9a5d83fd-8570-482e-81ab-cfa88942ee60`. */
1290
- triggerAppId?: string | null;
1291
- /** Type of activity that triggers the point assignment. For example, `restaurants-order-is-pending`. */
1292
- triggerActivityType?: string | null;
1293
- }
1294
- export {};