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