@wix/auto_sdk_referral_programs 1.0.0

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 (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/loyalty-referral-v1-program-programs.context.d.ts +17 -0
  11. package/build/cjs/src/loyalty-referral-v1-program-programs.context.js +42 -0
  12. package/build/cjs/src/loyalty-referral-v1-program-programs.context.js.map +1 -0
  13. package/build/cjs/src/loyalty-referral-v1-program-programs.http.d.ts +39 -0
  14. package/build/cjs/src/loyalty-referral-v1-program-programs.http.js +450 -0
  15. package/build/cjs/src/loyalty-referral-v1-program-programs.http.js.map +1 -0
  16. package/build/cjs/src/loyalty-referral-v1-program-programs.meta.d.ts +20 -0
  17. package/build/cjs/src/loyalty-referral-v1-program-programs.meta.js +180 -0
  18. package/build/cjs/src/loyalty-referral-v1-program-programs.meta.js.map +1 -0
  19. package/build/cjs/src/loyalty-referral-v1-program-programs.public.d.ts +69 -0
  20. package/build/cjs/src/loyalty-referral-v1-program-programs.public.js +114 -0
  21. package/build/cjs/src/loyalty-referral-v1-program-programs.public.js.map +1 -0
  22. package/build/cjs/src/loyalty-referral-v1-program-programs.types.d.ts +1337 -0
  23. package/build/cjs/src/loyalty-referral-v1-program-programs.types.js +277 -0
  24. package/build/cjs/src/loyalty-referral-v1-program-programs.types.js.map +1 -0
  25. package/build/cjs/src/loyalty-referral-v1-program-programs.universal.d.ts +1468 -0
  26. package/build/cjs/src/loyalty-referral-v1-program-programs.universal.js +553 -0
  27. package/build/cjs/src/loyalty-referral-v1-program-programs.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/loyalty-referral-v1-program-programs.context.d.ts +17 -0
  39. package/build/es/src/loyalty-referral-v1-program-programs.context.js +19 -0
  40. package/build/es/src/loyalty-referral-v1-program-programs.context.js.map +1 -0
  41. package/build/es/src/loyalty-referral-v1-program-programs.http.d.ts +39 -0
  42. package/build/es/src/loyalty-referral-v1-program-programs.http.js +439 -0
  43. package/build/es/src/loyalty-referral-v1-program-programs.http.js.map +1 -0
  44. package/build/es/src/loyalty-referral-v1-program-programs.meta.d.ts +20 -0
  45. package/build/es/src/loyalty-referral-v1-program-programs.meta.js +146 -0
  46. package/build/es/src/loyalty-referral-v1-program-programs.meta.js.map +1 -0
  47. package/build/es/src/loyalty-referral-v1-program-programs.public.d.ts +69 -0
  48. package/build/es/src/loyalty-referral-v1-program-programs.public.js +83 -0
  49. package/build/es/src/loyalty-referral-v1-program-programs.public.js.map +1 -0
  50. package/build/es/src/loyalty-referral-v1-program-programs.types.d.ts +1337 -0
  51. package/build/es/src/loyalty-referral-v1-program-programs.types.js +274 -0
  52. package/build/es/src/loyalty-referral-v1-program-programs.types.js.map +1 -0
  53. package/build/es/src/loyalty-referral-v1-program-programs.universal.d.ts +1468 -0
  54. package/build/es/src/loyalty-referral-v1-program-programs.universal.js +519 -0
  55. package/build/es/src/loyalty-referral-v1-program-programs.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.context.d.ts +19 -0
  66. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.context.js +42 -0
  67. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.context.js.map +1 -0
  68. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.http.d.ts +39 -0
  69. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.http.js +450 -0
  70. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.http.js.map +1 -0
  71. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.meta.d.ts +20 -0
  72. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.meta.js +180 -0
  73. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.meta.js.map +1 -0
  74. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.public.d.ts +79 -0
  75. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.public.js +114 -0
  76. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.public.js.map +1 -0
  77. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.types.d.ts +1337 -0
  78. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.types.js +277 -0
  79. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.types.js.map +1 -0
  80. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.universal.d.ts +1478 -0
  81. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.universal.js +553 -0
  82. package/build/internal/cjs/src/loyalty-referral-v1-program-programs.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/loyalty-referral-v1-program-programs.context.d.ts +19 -0
  93. package/build/internal/es/src/loyalty-referral-v1-program-programs.context.js +19 -0
  94. package/build/internal/es/src/loyalty-referral-v1-program-programs.context.js.map +1 -0
  95. package/build/internal/es/src/loyalty-referral-v1-program-programs.http.d.ts +39 -0
  96. package/build/internal/es/src/loyalty-referral-v1-program-programs.http.js +439 -0
  97. package/build/internal/es/src/loyalty-referral-v1-program-programs.http.js.map +1 -0
  98. package/build/internal/es/src/loyalty-referral-v1-program-programs.meta.d.ts +20 -0
  99. package/build/internal/es/src/loyalty-referral-v1-program-programs.meta.js +146 -0
  100. package/build/internal/es/src/loyalty-referral-v1-program-programs.meta.js.map +1 -0
  101. package/build/internal/es/src/loyalty-referral-v1-program-programs.public.d.ts +79 -0
  102. package/build/internal/es/src/loyalty-referral-v1-program-programs.public.js +83 -0
  103. package/build/internal/es/src/loyalty-referral-v1-program-programs.public.js.map +1 -0
  104. package/build/internal/es/src/loyalty-referral-v1-program-programs.types.d.ts +1337 -0
  105. package/build/internal/es/src/loyalty-referral-v1-program-programs.types.js +274 -0
  106. package/build/internal/es/src/loyalty-referral-v1-program-programs.types.js.map +1 -0
  107. package/build/internal/es/src/loyalty-referral-v1-program-programs.universal.d.ts +1478 -0
  108. package/build/internal/es/src/loyalty-referral-v1-program-programs.universal.js +519 -0
  109. package/build/internal/es/src/loyalty-referral-v1-program-programs.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1468 @@
1
+ export interface ReferralProgram {
2
+ /** Referral program name. */
3
+ name?: string | null;
4
+ /** @readonly */
5
+ status?: ProgramStatus;
6
+ /**
7
+ * Revision number, which increments by 1 each time the program is updated.
8
+ * To prevent conflicting changes, the current `revision` must be passed when updating the program.
9
+ */
10
+ revision?: string | null;
11
+ /**
12
+ * Date and time the program was created.
13
+ * @readonly
14
+ */
15
+ _createdDate?: Date | null;
16
+ /**
17
+ * Date and time the program was last updated.
18
+ * @readonly
19
+ */
20
+ _updatedDate?: Date | null;
21
+ /**
22
+ * Reward configuration for the referred friend.
23
+ * Specifies the reward given to a new customer who was referred to the business.
24
+ */
25
+ referredFriendReward?: Reward;
26
+ /**
27
+ * Reward configuration for the referring customer.
28
+ * Specifies the reward given to an existing customer who referred a new customer to the business.
29
+ */
30
+ referringCustomerReward?: Reward;
31
+ /** List of actions that complete a referral. For an action to be considered successful, the referred friend must place and pay for an item. */
32
+ successfulReferralActions?: Action[];
33
+ /** Configures email notifications for the referral program. */
34
+ emails?: Emails;
35
+ /**
36
+ * Indicates which premium features are available for the current account.
37
+ * @readonly
38
+ */
39
+ premiumFeatures?: PremiumFeatures;
40
+ }
41
+ /** Status of the referral program. */
42
+ export declare enum ProgramStatus {
43
+ /** Unknown program status. */
44
+ UNKNOWN = "UNKNOWN",
45
+ /** Referral program is in a draft state and is being modified. It is not yet active. */
46
+ DRAFT = "DRAFT",
47
+ /** Referral program is active. */
48
+ ACTIVE = "ACTIVE",
49
+ /** Referral program is paused. */
50
+ PAUSED = "PAUSED"
51
+ }
52
+ export interface Reward extends RewardOptionsOneOf {
53
+ /** Options for coupon reward type. */
54
+ couponOptions?: Coupon;
55
+ /** Options for the Loyalty points reward type. */
56
+ loyaltyPointsOptions?: LoyaltyPoints;
57
+ /** Type of the reward. */
58
+ type?: Type;
59
+ }
60
+ /** @oneof */
61
+ export interface RewardOptionsOneOf {
62
+ /** Options for coupon reward type. */
63
+ couponOptions?: Coupon;
64
+ /** Options for the Loyalty points reward type. */
65
+ loyaltyPointsOptions?: LoyaltyPoints;
66
+ }
67
+ export declare enum Type {
68
+ /** Unknown reward type. */
69
+ UNKNOWN = "UNKNOWN",
70
+ /** Coupon reward type. */
71
+ COUPON = "COUPON",
72
+ /** Loyalty points reward type. */
73
+ LOYALTY_POINTS = "LOYALTY_POINTS",
74
+ /** No reward type. */
75
+ NOTHING = "NOTHING"
76
+ }
77
+ export interface Coupon extends CouponDiscountTypeOptionsOneOf, CouponScopeOrMinSubtotalOneOf {
78
+ /** Options for fixed amount discount. */
79
+ fixedAmountOptions?: FixedAmountDiscount;
80
+ /** Options for percentage discounts. */
81
+ percentageOptions?: PercentageDiscount;
82
+ /** Limit the coupon to carts with a subtotal above this number. */
83
+ minimumSubtotal?: number;
84
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
85
+ scope?: CouponScope;
86
+ /** Coupon name. */
87
+ name?: string;
88
+ /** Coupon discount type. */
89
+ discountType?: DiscountType;
90
+ /**
91
+ * Whether the coupon is limited to one item.
92
+ * If `true` and a customer pays for multiple items, the discount applies to only the lowest priced item.
93
+ * Coupons with a bookings `scope.namespace` are always limited to one item.
94
+ */
95
+ limitedToOneItem?: boolean | null;
96
+ /** Whether the coupon applies to subscription products. */
97
+ appliesToSubscriptions?: boolean | null;
98
+ /**
99
+ * Specifies the amount of discounted cycles for a subscription item.
100
+ *
101
+ * - Can only be set when `scope.namespace = pricingPlans`.
102
+ * - If `discountedCycleCount` is empty, the coupon applies to all available cycles.
103
+ * - `discountedCycleCount` is ignored if `appliesToSubscriptions = true`.
104
+ *
105
+ * Max: `999`
106
+ */
107
+ discountedCycleCount?: number | null;
108
+ }
109
+ /** @oneof */
110
+ export interface CouponDiscountTypeOptionsOneOf {
111
+ /** Options for fixed amount discount. */
112
+ fixedAmountOptions?: FixedAmountDiscount;
113
+ /** Options for percentage discounts. */
114
+ percentageOptions?: PercentageDiscount;
115
+ }
116
+ /** @oneof */
117
+ export interface CouponScopeOrMinSubtotalOneOf {
118
+ /** Limit the coupon to carts with a subtotal above this number. */
119
+ minimumSubtotal?: number;
120
+ /** Specifies the type of line items this coupon will apply to. See [valid scope values](https://dev.wix.com/api/rest/coupons/coupons/valid-scope-values). */
121
+ scope?: CouponScope;
122
+ }
123
+ export declare enum DiscountType {
124
+ /** Unknown discount type. */
125
+ UNKNOWN = "UNKNOWN",
126
+ /** Discount as a fixed amount. */
127
+ FIXED_AMOUNT = "FIXED_AMOUNT",
128
+ /** Discount as a percentage. */
129
+ PERCENTAGE = "PERCENTAGE",
130
+ /** Free shipping. If `true`, the coupon applies to all items in all `namespaces`. */
131
+ FREE_SHIPPING = "FREE_SHIPPING"
132
+ }
133
+ export interface FixedAmountDiscount {
134
+ /** Amount of the discount as a fixed value. */
135
+ amount?: number;
136
+ }
137
+ export interface PercentageDiscount {
138
+ /** Percentage of discount. */
139
+ percentage?: number;
140
+ }
141
+ export interface CouponScope {
142
+ /** Scope namespace (Wix Stores, Wix Bookings, Wix Events, Wix Pricing Plans) */
143
+ namespace?: string;
144
+ /** Coupon scope's applied group, for example, Event or ticket in Wix Events. */
145
+ group?: Group;
146
+ }
147
+ export interface Group {
148
+ /** Name of the group. */
149
+ name?: string;
150
+ /** Entity ID of the group. */
151
+ entityId?: string | null;
152
+ }
153
+ export interface LoyaltyPoints {
154
+ /** Number of loyalty points to give. */
155
+ amount?: number;
156
+ }
157
+ export declare enum Action {
158
+ /** Unknown action. */
159
+ UNKNOWN = "UNKNOWN",
160
+ /** Referred friend ordered and paid for an order in a store. */
161
+ STORE_ORDER_PLACED = "STORE_ORDER_PLACED",
162
+ /** Referred friend ordered and paid for a plan. */
163
+ PLAN_ORDERED = "PLAN_ORDERED",
164
+ /** Referred friend ordered and paid for a ticket. */
165
+ TICKET_ORDERED = "TICKET_ORDERED",
166
+ /** Referred friend booked and paid for a session. */
167
+ SESSION_BOOKED = "SESSION_BOOKED",
168
+ /** Referred friend placed and paid for a restaurant order. */
169
+ RESTAURANT_ORDER_PLACED = "RESTAURANT_ORDER_PLACED",
170
+ /** Referred friend joined an online program. */
171
+ ONLINE_PROGRAM_JOINED = "ONLINE_PROGRAM_JOINED"
172
+ }
173
+ export interface Emails {
174
+ /** Configures email invitations to encourage customers to refer their friends. Select the apps for which this feature is enabled. */
175
+ encourageToReferFriends?: App[];
176
+ /**
177
+ * Whether to send email notifications to referring customers when they receive a referral reward.
178
+ * If true, referring customers will be notified by email when their referred friend completes a qualifying action (for example, placing an order).
179
+ */
180
+ notifyCustomersAboutReward?: boolean;
181
+ }
182
+ export declare enum App {
183
+ /** Unknown app. */
184
+ UNKNOWN = "UNKNOWN",
185
+ /** Send an email to customers who've placed an order with stores. */
186
+ STORES = "STORES",
187
+ /** Send an email to customers who've placed an order with pricing plans. */
188
+ PRICING_PLANS = "PRICING_PLANS",
189
+ /** Send an email to customers who've placed an order with events. */
190
+ EVENTS = "EVENTS",
191
+ /** Send an email to customers who've placed an order with bookings. */
192
+ BOOKINGS = "BOOKINGS",
193
+ /** Send an email to customers who've placed an order with restaurants. */
194
+ RESTAURANTS = "RESTAURANTS",
195
+ /** Send an email to customers who've joined an online program. */
196
+ ONLINE_PROGRAMS = "ONLINE_PROGRAMS"
197
+ }
198
+ export interface PremiumFeatures {
199
+ /**
200
+ * Whether the site owner has access to the referral program feature.
201
+ * @readonly
202
+ */
203
+ referralProgram?: boolean;
204
+ }
205
+ export interface GetReferralProgramRequest {
206
+ }
207
+ export interface GetReferralProgramResponse {
208
+ /** Retrieved referral program. */
209
+ referralProgram?: ReferralProgram;
210
+ }
211
+ export interface BulkGetReferralProgramRequest {
212
+ }
213
+ export interface BulkGetReferralProgramResponse {
214
+ /** Retrieved referral programs. */
215
+ programInSites?: ProgramInSite[];
216
+ }
217
+ export interface ProgramInSite {
218
+ /** Metasite ID. */
219
+ metaSiteId?: string;
220
+ /** Retrieved referral program. */
221
+ referralProgram?: ReferralProgram;
222
+ }
223
+ export interface UpdateReferralProgramRequest {
224
+ /** Referral program to update. Include the latest `revision` for a successful update. */
225
+ referralProgram: ReferralProgram;
226
+ }
227
+ export interface UpdateReferralProgramResponse {
228
+ /** Updated referral program. */
229
+ referralProgram?: ReferralProgram;
230
+ }
231
+ export interface ActivateReferralProgramRequest {
232
+ }
233
+ export interface ActivateReferralProgramResponse {
234
+ /** Activated referral program. */
235
+ referralProgram?: ReferralProgram;
236
+ }
237
+ export interface PauseReferralProgramRequest {
238
+ }
239
+ export interface PauseReferralProgramResponse {
240
+ /** Paused referral program. */
241
+ referralProgram?: ReferralProgram;
242
+ }
243
+ export interface GetAISocialMediaPostsSuggestionsRequest {
244
+ /** Topic to generate social media post suggestions for. For example, fitness, education, or technology. */
245
+ topic?: string;
246
+ }
247
+ export interface GetAISocialMediaPostsSuggestionsResponse {
248
+ /** Generated social media post suggestions. */
249
+ suggestions?: AISocialMediaPostSuggestion[];
250
+ /** Referral URL to refer friends. */
251
+ referFriendsPageUrl?: string | null;
252
+ }
253
+ export interface AISocialMediaPostSuggestion {
254
+ /** Suggested post content. */
255
+ postContent?: string;
256
+ /** Suggested hashtags. */
257
+ hashtags?: string[];
258
+ }
259
+ export interface GenerateAISocialMediaPostsSuggestionsRequest {
260
+ /** Topic to generate social media post suggestions for. For example, fitness, education, or technology. */
261
+ topic?: string;
262
+ }
263
+ export interface GenerateAISocialMediaPostsSuggestionsResponse {
264
+ /** Generated social media post suggestions. */
265
+ suggestions?: AISocialMediaPostSuggestion[];
266
+ /** Referral URL to refer friends. */
267
+ referFriendsPageUrl?: string | null;
268
+ }
269
+ export interface GetReferralProgramPremiumFeaturesRequest {
270
+ }
271
+ export interface GetReferralProgramPremiumFeaturesResponse {
272
+ /**
273
+ * Whether the site has the referral program feature enabled.
274
+ * @readonly
275
+ */
276
+ referralProgram?: boolean;
277
+ }
278
+ export interface DomainEvent extends DomainEventBodyOneOf {
279
+ createdEvent?: EntityCreatedEvent;
280
+ updatedEvent?: EntityUpdatedEvent;
281
+ deletedEvent?: EntityDeletedEvent;
282
+ actionEvent?: ActionEvent;
283
+ /**
284
+ * Unique event ID.
285
+ * Allows clients to ignore duplicate webhooks.
286
+ */
287
+ _id?: string;
288
+ /**
289
+ * Assumes actions are also always typed to an entity_type
290
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
291
+ */
292
+ entityFqdn?: string;
293
+ /**
294
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
295
+ * This is although the created/updated/deleted notion is duplication of the oneof types
296
+ * Example: created/updated/deleted/started/completed/email_opened
297
+ */
298
+ slug?: string;
299
+ /** ID of the entity associated with the event. */
300
+ entityId?: string;
301
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
302
+ eventTime?: Date | null;
303
+ /**
304
+ * Whether the event was triggered as a result of a privacy regulation application
305
+ * (for example, GDPR).
306
+ */
307
+ triggeredByAnonymizeRequest?: boolean | null;
308
+ /** If present, indicates the action that triggered the event. */
309
+ originatedFrom?: string | null;
310
+ /**
311
+ * A sequence number defining the order of updates to the underlying entity.
312
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
313
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
314
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
315
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
316
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
317
+ */
318
+ entityEventSequence?: string | null;
319
+ }
320
+ /** @oneof */
321
+ export interface DomainEventBodyOneOf {
322
+ createdEvent?: EntityCreatedEvent;
323
+ updatedEvent?: EntityUpdatedEvent;
324
+ deletedEvent?: EntityDeletedEvent;
325
+ actionEvent?: ActionEvent;
326
+ }
327
+ export interface EntityCreatedEvent {
328
+ entity?: string;
329
+ }
330
+ export interface RestoreInfo {
331
+ deletedDate?: Date | null;
332
+ }
333
+ export interface EntityUpdatedEvent {
334
+ /**
335
+ * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
336
+ * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
337
+ * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
338
+ */
339
+ currentEntity?: string;
340
+ }
341
+ export interface EntityDeletedEvent {
342
+ /** Entity that was deleted */
343
+ deletedEntity?: string | null;
344
+ }
345
+ export interface ActionEvent {
346
+ body?: string;
347
+ }
348
+ export interface Empty {
349
+ }
350
+ export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
351
+ /** Emitted on a meta site creation. */
352
+ siteCreated?: SiteCreated;
353
+ /** Emitted on a meta site transfer completion. */
354
+ siteTransferred?: SiteTransferred;
355
+ /** Emitted on a meta site deletion. */
356
+ siteDeleted?: SiteDeleted;
357
+ /** Emitted on a meta site restoration. */
358
+ siteUndeleted?: SiteUndeleted;
359
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
360
+ sitePublished?: SitePublished;
361
+ /** Emitted on a meta site unpublish. */
362
+ siteUnpublished?: SiteUnpublished;
363
+ /** Emitted when meta site is marked as template. */
364
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
365
+ /** Emitted when meta site is marked as a WixSite. */
366
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
367
+ /** Emitted when an application is provisioned (installed). */
368
+ serviceProvisioned?: ServiceProvisioned;
369
+ /** Emitted when an application is removed (uninstalled). */
370
+ serviceRemoved?: ServiceRemoved;
371
+ /** Emitted when meta site name (URL slug) is changed. */
372
+ siteRenamedPayload?: SiteRenamed;
373
+ /** Emitted when meta site was permanently deleted. */
374
+ hardDeleted?: SiteHardDeleted;
375
+ /** Emitted on a namespace change. */
376
+ namespaceChanged?: NamespaceChanged;
377
+ /** Emitted when Studio is attached. */
378
+ studioAssigned?: StudioAssigned;
379
+ /** Emitted when Studio is detached. */
380
+ studioUnassigned?: StudioUnassigned;
381
+ /** A meta site id. */
382
+ metaSiteId?: string;
383
+ /** A meta site version. Monotonically increasing. */
384
+ version?: string;
385
+ /** A timestamp of the event. */
386
+ timestamp?: string;
387
+ /**
388
+ * TODO(meta-site): Change validation once validations are disabled for consumers
389
+ * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659
390
+ */
391
+ assets?: Asset[];
392
+ }
393
+ /** @oneof */
394
+ export interface MetaSiteSpecialEventPayloadOneOf {
395
+ /** Emitted on a meta site creation. */
396
+ siteCreated?: SiteCreated;
397
+ /** Emitted on a meta site transfer completion. */
398
+ siteTransferred?: SiteTransferred;
399
+ /** Emitted on a meta site deletion. */
400
+ siteDeleted?: SiteDeleted;
401
+ /** Emitted on a meta site restoration. */
402
+ siteUndeleted?: SiteUndeleted;
403
+ /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
404
+ sitePublished?: SitePublished;
405
+ /** Emitted on a meta site unpublish. */
406
+ siteUnpublished?: SiteUnpublished;
407
+ /** Emitted when meta site is marked as template. */
408
+ siteMarkedAsTemplate?: SiteMarkedAsTemplate;
409
+ /** Emitted when meta site is marked as a WixSite. */
410
+ siteMarkedAsWixSite?: SiteMarkedAsWixSite;
411
+ /** Emitted when an application is provisioned (installed). */
412
+ serviceProvisioned?: ServiceProvisioned;
413
+ /** Emitted when an application is removed (uninstalled). */
414
+ serviceRemoved?: ServiceRemoved;
415
+ /** Emitted when meta site name (URL slug) is changed. */
416
+ siteRenamedPayload?: SiteRenamed;
417
+ /** Emitted when meta site was permanently deleted. */
418
+ hardDeleted?: SiteHardDeleted;
419
+ /** Emitted on a namespace change. */
420
+ namespaceChanged?: NamespaceChanged;
421
+ /** Emitted when Studio is attached. */
422
+ studioAssigned?: StudioAssigned;
423
+ /** Emitted when Studio is detached. */
424
+ studioUnassigned?: StudioUnassigned;
425
+ }
426
+ export interface Asset {
427
+ /** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */
428
+ appDefId?: string;
429
+ /** An instance id. For legacy reasons may be UUID or a string. */
430
+ instanceId?: string;
431
+ /** An application state. */
432
+ state?: State;
433
+ }
434
+ export declare enum State {
435
+ UNKNOWN = "UNKNOWN",
436
+ ENABLED = "ENABLED",
437
+ DISABLED = "DISABLED",
438
+ PENDING = "PENDING",
439
+ DEMO = "DEMO"
440
+ }
441
+ export interface SiteCreated {
442
+ /** A template identifier (empty if not created from a template). */
443
+ originTemplateId?: string;
444
+ /** An account id of the owner. */
445
+ ownerId?: string;
446
+ /** A context in which meta site was created. */
447
+ context?: SiteCreatedContext;
448
+ /**
449
+ * A meta site id from which this site was created.
450
+ *
451
+ * In case of a creation from a template it's a template id.
452
+ * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
453
+ */
454
+ originMetaSiteId?: string | null;
455
+ /** A meta site name (URL slug). */
456
+ siteName?: string;
457
+ /** A namespace. */
458
+ namespace?: Namespace;
459
+ }
460
+ export declare enum SiteCreatedContext {
461
+ /** A valid option, we don't expose all reasons why site might be created. */
462
+ OTHER = "OTHER",
463
+ /** A meta site was created from template. */
464
+ FROM_TEMPLATE = "FROM_TEMPLATE",
465
+ /** A meta site was created by copying of the transfferred meta site. */
466
+ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
467
+ /** A copy of existing meta site. */
468
+ DUPLICATE = "DUPLICATE",
469
+ /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
470
+ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
471
+ /** deprecated A meta site was created for Flash editor. */
472
+ FLASH = "FLASH"
473
+ }
474
+ export declare enum Namespace {
475
+ UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
476
+ /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
477
+ WIX = "WIX",
478
+ /** 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. */
479
+ SHOUT_OUT = "SHOUT_OUT",
480
+ /** 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. */
481
+ ALBUMS = "ALBUMS",
482
+ /** 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. */
483
+ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
484
+ /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
485
+ HOTELS = "HOTELS",
486
+ /** 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. */
487
+ CLUBS = "CLUBS",
488
+ /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
489
+ ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
490
+ /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
491
+ DEV_SITE = "DEV_SITE",
492
+ /** 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. */
493
+ LOGOS = "LOGOS",
494
+ /** 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. */
495
+ VIDEO_MAKER = "VIDEO_MAKER",
496
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
497
+ PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
498
+ /** MetaSites with this namespace will *not* be shown in a user's site list by default. */
499
+ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
500
+ /**
501
+ * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
502
+ *
503
+ * Meta site with this namespace will *not* be shown in a user's site list by default.
504
+ */
505
+ HTML_DRAFT = "HTML_DRAFT",
506
+ /**
507
+ * the user-journey for Fitness users who want to start from managing their business instead of designing their website.
508
+ * Will be accessible from Site List and will not have a website app.
509
+ * Once the user attaches a site, the site will become a regular wixsite.
510
+ */
511
+ SITELESS_BUSINESS = "SITELESS_BUSINESS",
512
+ /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
513
+ CREATOR_ECONOMY = "CREATOR_ECONOMY",
514
+ /** It is to be used in the Business First efforts. */
515
+ DASHBOARD_FIRST = "DASHBOARD_FIRST",
516
+ /** Bookings business flow with no site. */
517
+ ANYWHERE = "ANYWHERE",
518
+ /** Namespace for Headless Backoffice with no editor */
519
+ HEADLESS = "HEADLESS",
520
+ /**
521
+ * Namespace for master site that will exist in parent account that will be referenced by subaccounts
522
+ * The site will be used for account level CSM feature for enterprise
523
+ */
524
+ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
525
+ /** Rise.ai Siteless account management for Gift Cards and Store Credit. */
526
+ RISE = "RISE",
527
+ /**
528
+ * As part of the branded app new funnel, users now can create a meta site that will be branded app first.
529
+ * There's a blank site behind the scene but it's blank).
530
+ * The Mobile company will be the owner of this namespace.
531
+ */
532
+ BRANDED_FIRST = "BRANDED_FIRST",
533
+ /** Nownia.com Siteless account management for Ai Scheduling Assistant. */
534
+ NOWNIA = "NOWNIA",
535
+ /**
536
+ * UGC Templates are templates that are created by users for personal use and to sale to other users.
537
+ * The Partners company owns this namespace.
538
+ */
539
+ UGC_TEMPLATE = "UGC_TEMPLATE",
540
+ /** Codux Headless Sites */
541
+ CODUX = "CODUX",
542
+ /** Bobb - AI Design Creator. */
543
+ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
544
+ /**
545
+ * Shared Blog Site is a unique single site across Enterprise account,
546
+ * This site will hold all Blog posts related to the Marketing product.
547
+ */
548
+ SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE"
549
+ }
550
+ /** Site transferred to another user. */
551
+ export interface SiteTransferred {
552
+ /** A previous owner id (user that transfers meta site). */
553
+ oldOwnerId?: string;
554
+ /** A new owner id (user that accepts meta site). */
555
+ newOwnerId?: string;
556
+ }
557
+ /** Soft deletion of the meta site. Could be restored. */
558
+ export interface SiteDeleted {
559
+ /** A deletion context. */
560
+ deleteContext?: DeleteContext;
561
+ }
562
+ export interface DeleteContext {
563
+ /** When the meta site was deleted. */
564
+ dateDeleted?: Date | null;
565
+ /** A status. */
566
+ deleteStatus?: DeleteStatus;
567
+ /** A reason (flow). */
568
+ deleteOrigin?: string;
569
+ /** A service that deleted it. */
570
+ initiatorId?: string | null;
571
+ }
572
+ export declare enum DeleteStatus {
573
+ UNKNOWN = "UNKNOWN",
574
+ TRASH = "TRASH",
575
+ DELETED = "DELETED",
576
+ PENDING_PURGE = "PENDING_PURGE"
577
+ }
578
+ /** Restoration of the meta site. */
579
+ export interface SiteUndeleted {
580
+ }
581
+ /** First publish of a meta site. Or subsequent publish after unpublish. */
582
+ export interface SitePublished {
583
+ }
584
+ export interface SiteUnpublished {
585
+ /** A list of URLs previously associated with the meta site. */
586
+ urls?: string[];
587
+ }
588
+ export interface SiteMarkedAsTemplate {
589
+ }
590
+ export interface SiteMarkedAsWixSite {
591
+ }
592
+ /**
593
+ * Represents a service provisioned a site.
594
+ *
595
+ * Note on `origin_instance_id`:
596
+ * There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
597
+ * This is because of the following scenario:
598
+ *
599
+ * Imagine you have a template where a third-party application (TPA) includes some stub data,
600
+ * such as a product catalog. When you create a site from this template, you inherit this
601
+ * default product catalog. However, if the template's product catalog is modified,
602
+ * your site will retain the catalog as it was at the time of site creation. This ensures that
603
+ * your site remains consistent with what you initially received and does not include any
604
+ * changes made to the original template afterward.
605
+ * To ensure this, the TPA on the template gets a new instance_id.
606
+ */
607
+ export interface ServiceProvisioned {
608
+ /** Either UUID or EmbeddedServiceType. */
609
+ appDefId?: string;
610
+ /** Not only UUID. Something here could be something weird. */
611
+ instanceId?: string;
612
+ /** An instance id from which this instance is originated. */
613
+ originInstanceId?: string;
614
+ /** A version. */
615
+ version?: string | null;
616
+ /** The origin meta site id */
617
+ originMetaSiteId?: string | null;
618
+ }
619
+ export interface ServiceRemoved {
620
+ /** Either UUID or EmbeddedServiceType. */
621
+ appDefId?: string;
622
+ /** Not only UUID. Something here could be something weird. */
623
+ instanceId?: string;
624
+ /** A version. */
625
+ version?: string | null;
626
+ }
627
+ /** Rename of the site. Meaning, free public url has been changed as well. */
628
+ export interface SiteRenamed {
629
+ /** A new meta site name (URL slug). */
630
+ newSiteName?: string;
631
+ /** A previous meta site name (URL slug). */
632
+ oldSiteName?: string;
633
+ }
634
+ /**
635
+ * Hard deletion of the meta site.
636
+ *
637
+ * Could not be restored. Therefore it's desirable to cleanup data.
638
+ */
639
+ export interface SiteHardDeleted {
640
+ /** A deletion context. */
641
+ deleteContext?: DeleteContext;
642
+ }
643
+ export interface NamespaceChanged {
644
+ /** A previous namespace. */
645
+ oldNamespace?: Namespace;
646
+ /** A new namespace. */
647
+ newNamespace?: Namespace;
648
+ }
649
+ /** Assigned Studio editor */
650
+ export interface StudioAssigned {
651
+ }
652
+ /** Unassigned Studio editor */
653
+ export interface StudioUnassigned {
654
+ }
655
+ export interface HtmlSitePublished {
656
+ /** Application instance ID */
657
+ appInstanceId?: string;
658
+ /** Application type */
659
+ appType?: string;
660
+ /** Revision */
661
+ revision?: string;
662
+ /** MSID */
663
+ metaSiteId?: string | null;
664
+ /** optional branch id if publish is done from branch */
665
+ branchId?: string | null;
666
+ /** The site's last transactionId */
667
+ lastTransactionId?: string | null;
668
+ /** A list of the site's pages */
669
+ pages?: Page[];
670
+ /** Site's publish date */
671
+ publishDate?: string;
672
+ }
673
+ export interface Page {
674
+ /** Page's Id */
675
+ _id?: string;
676
+ }
677
+ export interface SubscriptionEvent extends SubscriptionEventEventOneOf {
678
+ /** Triggered when a subscription is created. */
679
+ created?: SubscriptionCreated;
680
+ /**
681
+ * Triggered when a subscription is assigned to a Wix site, including the initial
682
+ * assignment of a floating subscription or a re-assignement from a different site.
683
+ */
684
+ assigned?: SubscriptionAssigned;
685
+ /** Triggered when a subscription is canceled. */
686
+ cancelled?: SubscriptionCancelled;
687
+ /** Triggered when the subscription's auto renew is turned on. */
688
+ autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
689
+ /** Triggered when the subscription's auto renew is turned off. */
690
+ autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
691
+ /**
692
+ * Triggered when a subscription is unassigned from a Wix site and becomes
693
+ * floating.
694
+ */
695
+ unassigned?: SubscriptionUnassigned;
696
+ /**
697
+ * Triggered when a subscription is transferred from one Wix account to another.
698
+ * A transfer includes cancelling the original subscription and creating a new
699
+ * subscription for the target account. The event returns both the original
700
+ * and the new subscription.
701
+ */
702
+ transferred?: SubscriptionTransferred;
703
+ /** Triggered when a recurring charge succeeds for a subscription. */
704
+ recurringChargeSucceeded?: RecurringChargeSucceeded;
705
+ /**
706
+ * Triggered when a subscription was updated including when its product has been
707
+ * up- or downgraded or the billing cycle is changed.
708
+ */
709
+ contractSwitched?: ContractSwitched;
710
+ /**
711
+ * Triggered when a subscription gets close to the end of its billing cycle.
712
+ * The exact number of days is defined in the billing system.
713
+ */
714
+ nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
715
+ /**
716
+ * Triggered when a subscription is updated and the change doesn't happen
717
+ * immediately but at the end of the current billing cycle.
718
+ */
719
+ pendingChange?: SubscriptionPendingChange;
720
+ /** Triggered when a recurring charge attempt fails for a subscription. */
721
+ recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;
722
+ /** ID of the subscription's event. */
723
+ eventId?: string | null;
724
+ /**
725
+ * Date and time of the event in
726
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
727
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
728
+ */
729
+ eventDate?: Date | null;
730
+ }
731
+ /** @oneof */
732
+ export interface SubscriptionEventEventOneOf {
733
+ /** Triggered when a subscription is created. */
734
+ created?: SubscriptionCreated;
735
+ /**
736
+ * Triggered when a subscription is assigned to a Wix site, including the initial
737
+ * assignment of a floating subscription or a re-assignement from a different site.
738
+ */
739
+ assigned?: SubscriptionAssigned;
740
+ /** Triggered when a subscription is canceled. */
741
+ cancelled?: SubscriptionCancelled;
742
+ /** Triggered when the subscription's auto renew is turned on. */
743
+ autoRenewTurnedOn?: SubscriptionAutoRenewTurnedOn;
744
+ /** Triggered when the subscription's auto renew is turned off. */
745
+ autoRenewTurnedOff?: SubscriptionAutoRenewTurnedOff;
746
+ /**
747
+ * Triggered when a subscription is unassigned from a Wix site and becomes
748
+ * floating.
749
+ */
750
+ unassigned?: SubscriptionUnassigned;
751
+ /**
752
+ * Triggered when a subscription is transferred from one Wix account to another.
753
+ * A transfer includes cancelling the original subscription and creating a new
754
+ * subscription for the target account. The event returns both the original
755
+ * and the new subscription.
756
+ */
757
+ transferred?: SubscriptionTransferred;
758
+ /** Triggered when a recurring charge succeeds for a subscription. */
759
+ recurringChargeSucceeded?: RecurringChargeSucceeded;
760
+ /**
761
+ * Triggered when a subscription was updated including when its product has been
762
+ * up- or downgraded or the billing cycle is changed.
763
+ */
764
+ contractSwitched?: ContractSwitched;
765
+ /**
766
+ * Triggered when a subscription gets close to the end of its billing cycle.
767
+ * The exact number of days is defined in the billing system.
768
+ */
769
+ nearEndOfPeriod?: SubscriptionNearEndOfPeriod;
770
+ /**
771
+ * Triggered when a subscription is updated and the change doesn't happen
772
+ * immediately but at the end of the current billing cycle.
773
+ */
774
+ pendingChange?: SubscriptionPendingChange;
775
+ /** Triggered when a recurring charge attempt fails for a subscription. */
776
+ recurringChargeAttemptFailed?: RecurringChargeAttemptFailed;
777
+ }
778
+ /** Triggered when a subscription is created. */
779
+ export interface SubscriptionCreated {
780
+ /** Created subscription. */
781
+ subscription?: Subscription;
782
+ /** Metadata for the `created` event. */
783
+ metadata?: Record<string, string>;
784
+ /**
785
+ * Subscription reactivation data.
786
+ * A subscription can be reactivated for example if it was incorrectly canceled because of fraud and then reactivated
787
+ * by the billing system
788
+ */
789
+ reactivationData?: ReactivationData;
790
+ }
791
+ /**
792
+ * A subscription holds information about a Premium product that a Wix account
793
+ * owner has purchased including details about the billing.
794
+ */
795
+ export interface Subscription {
796
+ /** ID of the subscription. */
797
+ _id?: string;
798
+ /** ID of the Wix account that purchased the subscription. */
799
+ userId?: string;
800
+ /**
801
+ * ID of the [product](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/products/product-object)
802
+ * for which the subscription was purchased.
803
+ */
804
+ productId?: string;
805
+ /**
806
+ * Date and time the subscription was created in
807
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
808
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
809
+ */
810
+ createdAt?: Date | null;
811
+ /**
812
+ * Date and time the subscription was last updated in
813
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
814
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
815
+ */
816
+ updatedAt?: Date | null;
817
+ /**
818
+ * ID of the metasite that the subscription is assigned to.
819
+ * Available only when the subscription is assigned to a Wix site.
820
+ * Subscriptions for account level products can't be assigned to a Wix site.
821
+ */
822
+ metaSiteId?: string | null;
823
+ /** Information about the system that manages the subscription's billing. */
824
+ billingReference?: BillingReference;
825
+ /** Information about the billing cycle of the subscription. */
826
+ cycle?: Cycle;
827
+ /**
828
+ * Subscription status.
829
+ *
830
+ * + `UNKNOWN`: Default status.
831
+ * + `AUTO_RENEW_ON`: Subscription is active and automatically renews at the end of the current billing cycle.
832
+ * + `AUTO_RENEW_OFF`: Subscription is active but expires at the end of the current billing cycle.
833
+ * + `MANUAL_RECURRING`: Subscription is active and renews at the end of the current billing cycle, in case the customer takes an action related to the payment.
834
+ * + `CANCELLED`: Subscription isn't active because it has been canceled.
835
+ * + `TRANSFERRED`: Subscription isn't active because it has been transferred to a different account. A different active subscription was created for the target account.
836
+ */
837
+ status?: SubscriptionStatus;
838
+ /**
839
+ * Date and time the subscription was last transferred from one Wix account to
840
+ * another in
841
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
842
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
843
+ */
844
+ transferredAt?: Date | null;
845
+ /**
846
+ * ID of the [product type](https://bo.wix.com/wix-docs/rest/premium/premium-product-catalog-v2/product-types/product-type-object)
847
+ * that the product, for which the subscription was purchased, belongs to.
848
+ */
849
+ productTypeId?: string;
850
+ /** Version number, which increments by 1 each time the subscription is updated. */
851
+ version?: number;
852
+ /**
853
+ * Whether the subscription is active. Includes the statuses
854
+ * `"AUTO_RENEW_ON"`, `"AUTO_RENEW_OFF"`, and `"MANUAL_RECURRING"`.
855
+ */
856
+ active?: boolean;
857
+ /**
858
+ * Date and time the subscription was originally created in
859
+ * [UTC datetime](https://en.wikipedia.org/wiki/Coordinated_Universal_Time)
860
+ * `YYYY-MM-DDThh:mm:ss.sssZ` format.
861
+ * Differs from `createdAt` in case the subscription was originally created for a different Wix account and has been transferred.
862
+ */
863
+ originalCreationDate?: Date | null;
864
+ /** Custom metadata about the subscription. */
865
+ metadata?: Record<string, string>;
866
+ /**
867
+ * 2-letter country code in
868
+ * [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)
869
+ * format.
870
+ */
871
+ countryCode?: string | null;
872
+ }
873
+ export interface BillingReference {
874
+ /**
875
+ * Name of the billing system that manages the subscription.
876
+ *
877
+ * + `"UNKNOWN"`: Default value.
878
+ * + `"SBS"`: [Wix Billing](https://github.com/wix-p/premium-billing/tree/master/sbs).
879
+ * + `"LICENSER"`:
880
+ * + `"BASS"`: [Billing and Subscriptions System](https://dev.wix.com/docs/rest/internal-only/premium/subscriptions-by-billing-by-wix/introduction).
881
+ * + `"RESELLER"`: [External Reseller](https://dev.wix.com/api/rest/account-level-apis/resellers/introduction).
882
+ */
883
+ providerName?: ProviderName;
884
+ /** Current provider reference ID. */
885
+ providerReferenceId?: string | null;
886
+ /** Previous provider reference IDs. Used for when a subscription is extended, specifically for domains. */
887
+ previousProviderReferenceIds?: string[];
888
+ }
889
+ export declare enum ProviderName {
890
+ UNKNOWN = "UNKNOWN",
891
+ SBS = "SBS",
892
+ LICENSER = "LICENSER",
893
+ BASS = "BASS",
894
+ RESELLER = "RESELLER",
895
+ RECURRING_INVOICES = "RECURRING_INVOICES"
896
+ }
897
+ export interface Cycle extends CycleCycleSelectorOneOf {
898
+ /** repetitive interval */
899
+ interval?: Interval;
900
+ /** one time */
901
+ oneTime?: OneTime;
902
+ }
903
+ /** @oneof */
904
+ export interface CycleCycleSelectorOneOf {
905
+ /** repetitive interval */
906
+ interval?: Interval;
907
+ /** one time */
908
+ oneTime?: OneTime;
909
+ }
910
+ export interface Interval {
911
+ /** interval unit of measure */
912
+ unit?: IntervalUnit;
913
+ /** number of interval */
914
+ count?: number;
915
+ }
916
+ export declare enum IntervalUnit {
917
+ /** unknown interval unit */
918
+ UNKNOWN = "UNKNOWN",
919
+ /** day */
920
+ DAY = "DAY",
921
+ /** week */
922
+ WEEK = "WEEK",
923
+ /** month */
924
+ MONTH = "MONTH",
925
+ /** year */
926
+ YEAR = "YEAR"
927
+ }
928
+ export interface OneTime {
929
+ }
930
+ export declare enum SubscriptionStatus {
931
+ UNKNOWN = "UNKNOWN",
932
+ AUTO_RENEW_ON = "AUTO_RENEW_ON",
933
+ AUTO_RENEW_OFF = "AUTO_RENEW_OFF",
934
+ MANUAL_RECURRING = "MANUAL_RECURRING",
935
+ CANCELLED = "CANCELLED",
936
+ TRANSFERRED = "TRANSFERRED"
937
+ }
938
+ /** Triggered when a subscription is reactivated. */
939
+ export interface ReactivationData {
940
+ reactivationReason?: ReactivationReasonEnum;
941
+ /**
942
+ * In the event of reactivation after chargeback dispute, the subscription may be extended according to the
943
+ * number of days it was inactive during the time of resolving the dispute
944
+ */
945
+ newEndOfPeriod?: Date | null;
946
+ /** The original end date, before the inactive period. */
947
+ oldEndOfPeriod?: Date | null;
948
+ /** The difference in days between the new new_end_of_period and old_end_of_period */
949
+ differenceInDays?: number | null;
950
+ }
951
+ /** Reason for subscription reactivation */
952
+ export declare enum ReactivationReasonEnum {
953
+ UNKNOWN = "UNKNOWN",
954
+ /**
955
+ * Subscription was reactivated due to billing status change from CANCELED to ACTIVE, for example if it was incorrectly
956
+ * canceled because of suspicion of fraud
957
+ */
958
+ BILLING_STATUS_CHANGE = "BILLING_STATUS_CHANGE",
959
+ /** Subscription was reactivated after a chargeback dispute */
960
+ REACTIVATED_AFTER_CHARGEBACK = "REACTIVATED_AFTER_CHARGEBACK"
961
+ }
962
+ /**
963
+ * Triggered when a subscription is assigned to a Wix site, including the initial
964
+ * assignment of a floating subscription or a re-assignement from a different site.
965
+ */
966
+ export interface SubscriptionAssigned {
967
+ /** Assigned subscription. */
968
+ subscription?: Subscription;
969
+ /** ID of the metasite that the subscription has been assigned to before the update. */
970
+ previousMetaSiteId?: string | null;
971
+ }
972
+ /** Triggered when a subscription is canceled. */
973
+ export interface SubscriptionCancelled {
974
+ /** Canceled subscription. */
975
+ subscription?: Subscription;
976
+ /** Details about the cancellation including who canceled the subscription and why. */
977
+ cancellationDetails?: CancellationDetails;
978
+ /**
979
+ * Whether the subscription is canceled immediately or expires at the end of the current billing cycle.
980
+ *
981
+ * Default: `false`
982
+ */
983
+ immediateCancel?: boolean;
984
+ /** Whether the subscription was canceled during the free trial period. */
985
+ canceledInFreeTrial?: boolean;
986
+ }
987
+ /** Information about the cancellation flow including who canceled the subscription and why it was canceled. */
988
+ export interface CancellationDetails {
989
+ /**
990
+ * Cancellation code.
991
+ *
992
+ * Values supported for cancellations on behalf of the billing system: `-1`, `-2`, `-3`, `-4`, `-5`, `-6`, `-7`, `-8`.
993
+ * For cancellations on behalf of the site owner or the service provider `cancellationCode`
994
+ * is taken from the request of
995
+ * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
996
+ *
997
+ * + `-1`: The subscription has been cancelled by the billing system but none of the listed cancellation reasons applies.
998
+ * + `-2`: There were payment problems.
999
+ * + `-3`: There was a chargeback.
1000
+ * + `-4`: Customer support has canceled the subscription and issued a refund.
1001
+ * + `-5`: The site owner has changed their existing subscription.
1002
+ * + `-6`: The subscription has been transferred to a different Wix account.
1003
+ * + `-7`: The subscription has been canceled because the site owner hasn't manually authenticated the recurring payment during the subscription's grace period. For example, site owners must manually confirm recurring payments within 40 days when paying with boleto.
1004
+ * + `-8`: The Wix account that the subscription belonged to has been deleted.
1005
+ */
1006
+ cancellationCode?: number | null;
1007
+ /**
1008
+ * Cancellation reason. For cancellations on behalf of the site owner or the service provider `cancellationReason`
1009
+ * is taken from the request of
1010
+ * [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
1011
+ * For cancellations on behalf of the billing system `cancellationReason` is `null` or an empty string.
1012
+ */
1013
+ cancellationReason?: string | null;
1014
+ /**
1015
+ * Initiator of the cancellation. For `"USER_REQUESTED"` and `"APP_MANAGED"`,
1016
+ * `cancellationCode` and `cancellationReason` are taken from the request of
1017
+ * [Cancel Immediately](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately)
1018
+ * or [Cancel Immediately Offline](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/cancel-immediately-offline).
1019
+ * For `"PASSIVE"`, cancellations `cancellationCode` is automatically calculated and `cancellationReason`
1020
+ * is `null` or an empty string.
1021
+ *
1022
+ * + `"UNKNOWN`: Default value.
1023
+ * + `"USER_REQUESTED"`: The Wix account owner has canceled the subscription.
1024
+ * + `"APP_MANAGED"`: The service provider has canceled the subscription.
1025
+ * + `"PASSIVE"`: The billing system has canceled the subscription. For example, in case of payment failure or fraud.
1026
+ */
1027
+ initiator?: Initiator;
1028
+ }
1029
+ export declare enum Initiator {
1030
+ UNKNOWN = "UNKNOWN",
1031
+ USER_REQUESTED = "USER_REQUESTED",
1032
+ APP_MANAGED = "APP_MANAGED",
1033
+ PASSIVE = "PASSIVE"
1034
+ }
1035
+ /** Triggered when the subscription's auto renew is turned on. */
1036
+ export interface SubscriptionAutoRenewTurnedOn {
1037
+ /** Subscription for which auto renew is turned on. */
1038
+ subscription?: Subscription;
1039
+ /**
1040
+ * Supported values: `USER`, `APP`.
1041
+ *
1042
+ * Information about who turned auto renew on.
1043
+ * + `"USER"`: The site owner who purchased the subscription has turned auto renew on.
1044
+ * + `"APP"`: The service provider has turned auto renew on.
1045
+ */
1046
+ initiator?: string | null;
1047
+ }
1048
+ /** Triggered when the subscription's auto renew is turned off. */
1049
+ export interface SubscriptionAutoRenewTurnedOff {
1050
+ /** Subscription for which auto renew is turned off. */
1051
+ subscription?: Subscription;
1052
+ /** Details about the cancellation including who canceled the subscription and why. */
1053
+ cancellationDetails?: CancellationDetails;
1054
+ /**
1055
+ * Whether the subscription is immediately canceled or expires at the end of the current billing cycle.
1056
+ *
1057
+ * Default: `false`
1058
+ */
1059
+ immediateCancel?: boolean;
1060
+ }
1061
+ /**
1062
+ * Triggered when a subscription is unassigned from a Wix site and becomes
1063
+ * floating.
1064
+ */
1065
+ export interface SubscriptionUnassigned {
1066
+ /** Unassigned subscription. */
1067
+ subscription?: Subscription;
1068
+ /** ID of the metasite that the subscription has been assigned to before the event. */
1069
+ previousMetaSiteId?: string;
1070
+ /**
1071
+ * Reason why the subscription is unassigned.
1072
+ *
1073
+ * + `"UNKNOWN"`: Default value.
1074
+ * + `"USER_REQUESTED"`: The Wix account owner has unassigned the subscription.
1075
+ * + `"REPLACED_BY_ANOTHER_SUBSCRIPTION"`: A different subscription that replaces this subscription is assigned to the site.
1076
+ */
1077
+ unassignReason?: UnassignReason;
1078
+ }
1079
+ export declare enum UnassignReason {
1080
+ UNKNOWN = "UNKNOWN",
1081
+ USER_REQUESTED = "USER_REQUESTED",
1082
+ REPLACED_BY_ANOTHER_SUBSCRIPTION = "REPLACED_BY_ANOTHER_SUBSCRIPTION"
1083
+ }
1084
+ /**
1085
+ * Triggered when a subscription is transferred from one Wix account to another.
1086
+ * A transfer includes cancelling the original subscription and creating a new
1087
+ * subscription for the target account. The event returns both the original
1088
+ * and the new subscription.
1089
+ */
1090
+ export interface SubscriptionTransferred {
1091
+ /** Original subscription that was canceled for the transfer. */
1092
+ originSubscription?: Subscription;
1093
+ /** Newly created subscription for the target account. */
1094
+ targetSubscription?: Subscription;
1095
+ }
1096
+ /** Triggered when a recurring charge succeeds for a subscription. */
1097
+ export interface RecurringChargeSucceeded {
1098
+ /** Subscription for which the recurring charge has succeeded. */
1099
+ subscription?: Subscription;
1100
+ /** Indication that there was a successful charge at the end of the free trial period */
1101
+ freeTrialPeriodEnd?: boolean;
1102
+ }
1103
+ /**
1104
+ * Triggered when a subscription was updated including when its product has been
1105
+ * up- or downgraded or the billing cycle is changed.
1106
+ */
1107
+ export interface ContractSwitched {
1108
+ /** Updated subscription. */
1109
+ subscription?: Subscription;
1110
+ /** Billing cycle before the update. */
1111
+ previousCycle?: Cycle;
1112
+ /** ID of the product belonging to the subscription before the update. */
1113
+ previousProductId?: string;
1114
+ /** ID of the product type that the subscription's original product belonged to before the update. */
1115
+ previousProductTypeId?: string;
1116
+ /**
1117
+ * Update type. __Note__: Doesn't include information about a product adjustment.
1118
+ * For that purpose, see `productAdjustment`.
1119
+ *
1120
+ * + `"NOT_APPLICABLE"`: Default value.
1121
+ * + `"ADDITIONAL_QUANTITY"`: An increased usage quota is added to the subscription. For example, a second mailbox is added to a subscription that previously included a single mailbox.
1122
+ * + `"CREDIT_UNUSED_PERIOD"`: The subscription is upgraded and the new price is less than the regular price. The new price applies to every billing cycle, not just the first cycle.
1123
+ * + `"REFUND_PRICE_DIFF"`: Not implemented.
1124
+ * + `"ADJUST_PERIOD_END"`: Not implemented.
1125
+ * + `"DOWNGRADE_GRACE_PERIOD"`: For downgrades during the grace period. In this situation, the site owner hasn’t paid yet and must immediately pay for the downgraded subscription.
1126
+ * + `"FULL_AMOUNT_PERIOD"`: For upgrades in which the site owner retains unused benefits. For example, site owners upgrading a Facebook Ads subscription retain their unused FB Ads credit. The unused credit is added to the new credit.
1127
+ * + `"END_OF_PERIOD"`: The subscription's billing current cycle is extended because of a downgrade.
1128
+ * + `"PENDING_CHANGES"`: The subscription's billing is updated, but the change doesn't apply immediately. Instead, the update becomes effective at the end of current billing cycle.
1129
+ * + `"DOWNGRADE_RENEWAL"`: The subscription is downgraded because of a declined payment. This prevents subscriptions from churning.
1130
+ */
1131
+ contractSwitchType?: ContractSwitchType;
1132
+ /**
1133
+ * ID of the metasite the subscription has been assigned to previously.
1134
+ * Available only in case the subscription is assigned to a different site.
1135
+ */
1136
+ previousMetaSiteId?: string | null;
1137
+ /**
1138
+ * Update reason.
1139
+ *
1140
+ * + `"PRICE_INCREASE"`: The subscription's price has been increased.
1141
+ * + `"EXTERNAL_PROVIDER_TRIGGER"`: Any reason other than a price increase.
1142
+ */
1143
+ contractSwitchReason?: ContractSwitchReason;
1144
+ /** Information about the price update. Available only for updates with a price increase. */
1145
+ productPriceIncreaseData?: ProductPriceIncreaseData;
1146
+ /**
1147
+ * Information about a product adjustment. For example, a downgrade.
1148
+ * __Note__: This isn't the same as `contractSwitchType`.
1149
+ *
1150
+ * + `NOT_APPLICABLE`: There is no information about whether the product has been up- or downgraded.
1151
+ * + `DOWNGRADE`: The product has been downgraded.
1152
+ */
1153
+ productAdjustment?: ProductAdjustment;
1154
+ }
1155
+ /** Copied from SBS */
1156
+ export declare enum ContractSwitchType {
1157
+ NOT_APPLICABLE = "NOT_APPLICABLE",
1158
+ ADDITIONAL_QUANTITY = "ADDITIONAL_QUANTITY",
1159
+ CREDIT_UNUSED_PERIOD = "CREDIT_UNUSED_PERIOD",
1160
+ REFUND_PRICE_DIFF = "REFUND_PRICE_DIFF",
1161
+ ADJUST_PERIOD_END = "ADJUST_PERIOD_END",
1162
+ DOWNGRADE_GRACE_PERIOD = "DOWNGRADE_GRACE_PERIOD",
1163
+ FULL_AMOUNT_PERIOD = "FULL_AMOUNT_PERIOD",
1164
+ END_OF_PERIOD = "END_OF_PERIOD",
1165
+ PENDING_CHANGES = "PENDING_CHANGES",
1166
+ DOWNGRADE_RENEWAL = "DOWNGRADE_RENEWAL"
1167
+ }
1168
+ export declare enum ContractSwitchReason {
1169
+ EXTERNAL_PROVIDER_TRIGGER = "EXTERNAL_PROVIDER_TRIGGER",
1170
+ PRICE_INCREASE = "PRICE_INCREASE"
1171
+ }
1172
+ /** Triggered when a subscription's price is increased. */
1173
+ export interface ProductPriceIncreaseData {
1174
+ /** Price of the subscription before the update. */
1175
+ previousPrice?: string | null;
1176
+ /** A value that is used in order to select the correct email template to send the user regarding the price increase. */
1177
+ emailTemplateSelector?: string | null;
1178
+ /** Used to differentiate between migration segments. Does not have to be unique per segment. */
1179
+ segmentName?: string | null;
1180
+ /** Used to determine how the price increase was triggered. */
1181
+ priceIncreaseTrigger?: PriceIncreaseTrigger;
1182
+ }
1183
+ /** Reason for Price Increase Trigger */
1184
+ export declare enum PriceIncreaseTrigger {
1185
+ NEAR_RENEWAL = "NEAR_RENEWAL",
1186
+ RECURRING_SUCCESS = "RECURRING_SUCCESS",
1187
+ MANUAL = "MANUAL"
1188
+ }
1189
+ /** Triggered when a subscription's product is adusted. */
1190
+ export declare enum ProductAdjustment {
1191
+ /** flag to show that the ContractSwitchedEvent is not applicable / needed */
1192
+ NOT_APPLICABLE = "NOT_APPLICABLE",
1193
+ /** flag to show that the ContractSwitchedEvent is a Downgrade */
1194
+ DOWNGRADE = "DOWNGRADE"
1195
+ }
1196
+ /**
1197
+ * Triggered when a subscription gets close to the end of its billing cycle.
1198
+ * The exact number of days is defined in the billing system.
1199
+ */
1200
+ export interface SubscriptionNearEndOfPeriod {
1201
+ /** Subscription that got close to the end of its billing cycle. */
1202
+ subscription?: Subscription;
1203
+ /** Whether the subscription is within the free trial period. */
1204
+ inFreeTrial?: boolean;
1205
+ }
1206
+ /**
1207
+ * Triggered when a subscription is updated and the change doesn't happen
1208
+ * immediately but at the end of the current billing cycle.
1209
+ */
1210
+ export interface SubscriptionPendingChange {
1211
+ /** Subscription for which a pending update is triggered. */
1212
+ subscription?: Subscription;
1213
+ }
1214
+ /** Triggered when a recurring charge attempt failed for a subscription. */
1215
+ export interface RecurringChargeAttemptFailed {
1216
+ /** Subscription for which the recurring charge attempt has failed. */
1217
+ subscription?: Subscription;
1218
+ }
1219
+ export interface MessageEnvelope {
1220
+ /** App instance ID. */
1221
+ instanceId?: string | null;
1222
+ /** Event type. */
1223
+ eventType?: string;
1224
+ /** The identification type and identity data. */
1225
+ identity?: IdentificationData;
1226
+ /** Stringify payload. */
1227
+ data?: string;
1228
+ }
1229
+ export interface IdentificationData extends IdentificationDataIdOneOf {
1230
+ /** ID of a site visitor that has not logged in to the site. */
1231
+ anonymousVisitorId?: string;
1232
+ /** ID of a site visitor that has logged in to the site. */
1233
+ memberId?: string;
1234
+ /** ID of a Wix user (site owner, contributor, etc.). */
1235
+ wixUserId?: string;
1236
+ /** ID of an app. */
1237
+ appId?: string;
1238
+ /** @readonly */
1239
+ identityType?: WebhookIdentityType;
1240
+ }
1241
+ /** @oneof */
1242
+ export interface IdentificationDataIdOneOf {
1243
+ /** ID of a site visitor that has not logged in to the site. */
1244
+ anonymousVisitorId?: string;
1245
+ /** ID of a site visitor that has logged in to the site. */
1246
+ memberId?: string;
1247
+ /** ID of a Wix user (site owner, contributor, etc.). */
1248
+ wixUserId?: string;
1249
+ /** ID of an app. */
1250
+ appId?: string;
1251
+ }
1252
+ export declare enum WebhookIdentityType {
1253
+ UNKNOWN = "UNKNOWN",
1254
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1255
+ MEMBER = "MEMBER",
1256
+ WIX_USER = "WIX_USER",
1257
+ APP = "APP"
1258
+ }
1259
+ interface FixedAmountDiscountNonNullableFields {
1260
+ amount: number;
1261
+ }
1262
+ interface PercentageDiscountNonNullableFields {
1263
+ percentage: number;
1264
+ }
1265
+ interface GroupNonNullableFields {
1266
+ name: string;
1267
+ }
1268
+ interface CouponScopeNonNullableFields {
1269
+ namespace: string;
1270
+ group?: GroupNonNullableFields;
1271
+ }
1272
+ interface CouponNonNullableFields {
1273
+ fixedAmountOptions?: FixedAmountDiscountNonNullableFields;
1274
+ percentageOptions?: PercentageDiscountNonNullableFields;
1275
+ minimumSubtotal: number;
1276
+ scope?: CouponScopeNonNullableFields;
1277
+ name: string;
1278
+ discountType: DiscountType;
1279
+ }
1280
+ interface LoyaltyPointsNonNullableFields {
1281
+ amount: number;
1282
+ }
1283
+ interface RewardNonNullableFields {
1284
+ couponOptions?: CouponNonNullableFields;
1285
+ loyaltyPointsOptions?: LoyaltyPointsNonNullableFields;
1286
+ type: Type;
1287
+ }
1288
+ interface EmailsNonNullableFields {
1289
+ encourageToReferFriends: App[];
1290
+ notifyCustomersAboutReward: boolean;
1291
+ }
1292
+ interface PremiumFeaturesNonNullableFields {
1293
+ referralProgram: boolean;
1294
+ }
1295
+ interface ReferralProgramNonNullableFields {
1296
+ status: ProgramStatus;
1297
+ referredFriendReward?: RewardNonNullableFields;
1298
+ referringCustomerReward?: RewardNonNullableFields;
1299
+ successfulReferralActions: Action[];
1300
+ emails?: EmailsNonNullableFields;
1301
+ premiumFeatures?: PremiumFeaturesNonNullableFields;
1302
+ }
1303
+ export interface GetReferralProgramResponseNonNullableFields {
1304
+ referralProgram?: ReferralProgramNonNullableFields;
1305
+ }
1306
+ interface ProgramInSiteNonNullableFields {
1307
+ metaSiteId: string;
1308
+ referralProgram?: ReferralProgramNonNullableFields;
1309
+ }
1310
+ export interface BulkGetReferralProgramResponseNonNullableFields {
1311
+ programInSites: ProgramInSiteNonNullableFields[];
1312
+ }
1313
+ export interface UpdateReferralProgramResponseNonNullableFields {
1314
+ referralProgram?: ReferralProgramNonNullableFields;
1315
+ }
1316
+ export interface ActivateReferralProgramResponseNonNullableFields {
1317
+ referralProgram?: ReferralProgramNonNullableFields;
1318
+ }
1319
+ export interface PauseReferralProgramResponseNonNullableFields {
1320
+ referralProgram?: ReferralProgramNonNullableFields;
1321
+ }
1322
+ interface AISocialMediaPostSuggestionNonNullableFields {
1323
+ postContent: string;
1324
+ hashtags: string[];
1325
+ }
1326
+ export interface GetAISocialMediaPostsSuggestionsResponseNonNullableFields {
1327
+ suggestions: AISocialMediaPostSuggestionNonNullableFields[];
1328
+ }
1329
+ export interface GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields {
1330
+ suggestions: AISocialMediaPostSuggestionNonNullableFields[];
1331
+ }
1332
+ export interface GetReferralProgramPremiumFeaturesResponseNonNullableFields {
1333
+ referralProgram: boolean;
1334
+ }
1335
+ export interface BaseEventMetadata {
1336
+ /** App instance ID. */
1337
+ instanceId?: string | null;
1338
+ /** Event type. */
1339
+ eventType?: string;
1340
+ /** The identification type and identity data. */
1341
+ identity?: IdentificationData;
1342
+ }
1343
+ export interface EventMetadata extends BaseEventMetadata {
1344
+ /**
1345
+ * Unique event ID.
1346
+ * Allows clients to ignore duplicate webhooks.
1347
+ */
1348
+ _id?: string;
1349
+ /**
1350
+ * Assumes actions are also always typed to an entity_type
1351
+ * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
1352
+ */
1353
+ entityFqdn?: string;
1354
+ /**
1355
+ * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
1356
+ * This is although the created/updated/deleted notion is duplication of the oneof types
1357
+ * Example: created/updated/deleted/started/completed/email_opened
1358
+ */
1359
+ slug?: string;
1360
+ /** ID of the entity associated with the event. */
1361
+ entityId?: string;
1362
+ /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
1363
+ eventTime?: Date | null;
1364
+ /**
1365
+ * Whether the event was triggered as a result of a privacy regulation application
1366
+ * (for example, GDPR).
1367
+ */
1368
+ triggeredByAnonymizeRequest?: boolean | null;
1369
+ /** If present, indicates the action that triggered the event. */
1370
+ originatedFrom?: string | null;
1371
+ /**
1372
+ * A sequence number defining the order of updates to the underlying entity.
1373
+ * For example, given that some entity was updated at 16:00 and than again at 16:01,
1374
+ * it is guaranteed that the sequence number of the second update is strictly higher than the first.
1375
+ * As the consumer, you can use this value to ensure that you handle messages in the correct order.
1376
+ * To do so, you will need to persist this number on your end, and compare the sequence number from the
1377
+ * message against the one you have stored. Given that the stored number is higher, you should ignore the message.
1378
+ */
1379
+ entityEventSequence?: string | null;
1380
+ }
1381
+ export interface ProgramUpdatedEnvelope {
1382
+ entity: ReferralProgram;
1383
+ metadata: EventMetadata;
1384
+ }
1385
+ /**
1386
+ * Triggered when a referral program is updated.
1387
+ * @permissionId REFERRALS.READ_PROGRAM
1388
+ * @webhook
1389
+ * @eventType wix.loyalty.referral.v1.program_updated
1390
+ * @serviceIdentifier wix.loyalty.referral.program.v1.ReferralPrograms
1391
+ * @slug updated
1392
+ */
1393
+ export declare function onProgramUpdated(handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>): void;
1394
+ /**
1395
+ * Retrieves the referral program.
1396
+ * @public
1397
+ * @permissionId REFERRALS.READ_PROGRAM
1398
+ * @applicableIdentity VISITOR
1399
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgram
1400
+ */
1401
+ export declare function getReferralProgram(): Promise<GetReferralProgramResponse & GetReferralProgramResponseNonNullableFields>;
1402
+ /**
1403
+ * Updates a referral program. Supports partial updates.
1404
+ *
1405
+ * Revision number, which increments by 1 each time the referral program is updated.
1406
+ * To prevent conflicting changes, the current revision must be passed when updating the referral program.
1407
+ * @param referralProgram - Referral program to update. Include the latest `revision` for a successful update.
1408
+ * @public
1409
+ * @requiredField referralProgram
1410
+ * @requiredField referralProgram.revision
1411
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1412
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.UpdateReferralProgram
1413
+ */
1414
+ export declare function updateReferralProgram(referralProgram: ReferralProgram): Promise<UpdateReferralProgramResponse & UpdateReferralProgramResponseNonNullableFields>;
1415
+ /**
1416
+ * Activates the referral program, changing its status to `ACTIVE`.
1417
+ * @public
1418
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1419
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.ActivateReferralProgram
1420
+ */
1421
+ export declare function activateReferralProgram(): Promise<ActivateReferralProgramResponse & ActivateReferralProgramResponseNonNullableFields>;
1422
+ /**
1423
+ * Pauses the referral program, changing its status to `PAUSED`.
1424
+ * @public
1425
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1426
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.PauseReferralProgram
1427
+ */
1428
+ export declare function pauseReferralProgram(): Promise<PauseReferralProgramResponse & PauseReferralProgramResponseNonNullableFields>;
1429
+ /**
1430
+ * Retrieves pre-generated AI social media post suggestions for promoting the referral program.
1431
+ *
1432
+ * This method returns a list of AI-generated social media post suggestions that site owners or members can use to promote the referral program. You can display these suggestions to allow referring customers to easily copy and share them on their preferred social media platforms.
1433
+ *
1434
+ * >**Note**: This method retrieves existing suggestions. To generate new ones,
1435
+ * use Generate AI Social Media Posts Suggestions.
1436
+ * @public
1437
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1438
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetAISocialMediaPostsSuggestions
1439
+ */
1440
+ export declare function getAiSocialMediaPostsSuggestions(options?: GetAiSocialMediaPostsSuggestionsOptions): Promise<GetAISocialMediaPostsSuggestionsResponse & GetAISocialMediaPostsSuggestionsResponseNonNullableFields>;
1441
+ export interface GetAiSocialMediaPostsSuggestionsOptions {
1442
+ /** Topic to generate social media post suggestions for. For example, fitness, education, or technology. */
1443
+ topic?: string;
1444
+ }
1445
+ /**
1446
+ * Creates new AI-generated social media post suggestions for promoting the referral program.
1447
+ *
1448
+ * This method generates new AI-powered social media post suggestions for promoting the referral program. Use it to refresh content or create alternatives to existing suggestions.
1449
+ *
1450
+ * >**Note**: This method generates new suggestions each time it's called. To retrieve existing suggestions without generating new ones, use Get AI Social Media Posts Suggestions.
1451
+ * @public
1452
+ * @permissionId REFERRALS.MANAGE_PROGRAM
1453
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GenerateAISocialMediaPostsSuggestions
1454
+ */
1455
+ export declare function generateAiSocialMediaPostsSuggestions(options?: GenerateAiSocialMediaPostsSuggestionsOptions): Promise<GenerateAISocialMediaPostsSuggestionsResponse & GenerateAISocialMediaPostsSuggestionsResponseNonNullableFields>;
1456
+ export interface GenerateAiSocialMediaPostsSuggestionsOptions {
1457
+ /** Topic to generate social media post suggestions for. For example, fitness, education, or technology. */
1458
+ topic?: string;
1459
+ }
1460
+ /**
1461
+ * Retrieves information about the enabled premium features for the referral program.
1462
+ * @public
1463
+ * @permissionId REFERRALS.READ_PROGRAM
1464
+ * @applicableIdentity VISITOR
1465
+ * @fqn wix.loyalty.referral.program.v1.ReferralPrograms.GetReferralProgramPremiumFeatures
1466
+ */
1467
+ export declare function getReferralProgramPremiumFeatures(): Promise<GetReferralProgramPremiumFeaturesResponse & GetReferralProgramPremiumFeaturesResponseNonNullableFields>;
1468
+ export {};