@wix/auto_sdk_loyalty_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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-program-programs.context.d.ts +18 -0
- package/build/cjs/src/loyalty-v1-program-programs.context.js +30 -0
- package/build/cjs/src/loyalty-v1-program-programs.context.js.map +1 -0
- package/build/cjs/src/loyalty-v1-program-programs.http.d.ts +49 -0
- package/build/cjs/src/loyalty-v1-program-programs.http.js +417 -0
- package/build/cjs/src/loyalty-v1-program-programs.http.js.map +1 -0
- package/build/cjs/src/loyalty-v1-program-programs.meta.d.ts +20 -0
- package/build/cjs/src/loyalty-v1-program-programs.meta.js +180 -0
- package/build/cjs/src/loyalty-v1-program-programs.meta.js.map +1 -0
- package/build/cjs/src/loyalty-v1-program-programs.public.d.ts +88 -0
- package/build/cjs/src/loyalty-v1-program-programs.public.js +83 -0
- package/build/cjs/src/loyalty-v1-program-programs.public.js.map +1 -0
- package/build/cjs/src/loyalty-v1-program-programs.types.d.ts +1161 -0
- package/build/cjs/src/loyalty-v1-program-programs.types.js +167 -0
- package/build/cjs/src/loyalty-v1-program-programs.types.js.map +1 -0
- package/build/cjs/src/loyalty-v1-program-programs.universal.d.ts +1296 -0
- package/build/cjs/src/loyalty-v1-program-programs.universal.js +516 -0
- package/build/cjs/src/loyalty-v1-program-programs.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/loyalty-v1-program-programs.context.d.ts +18 -0
- package/build/es/src/loyalty-v1-program-programs.context.js +18 -0
- package/build/es/src/loyalty-v1-program-programs.context.js.map +1 -0
- package/build/es/src/loyalty-v1-program-programs.http.d.ts +49 -0
- package/build/es/src/loyalty-v1-program-programs.http.js +406 -0
- package/build/es/src/loyalty-v1-program-programs.http.js.map +1 -0
- package/build/es/src/loyalty-v1-program-programs.meta.d.ts +20 -0
- package/build/es/src/loyalty-v1-program-programs.meta.js +146 -0
- package/build/es/src/loyalty-v1-program-programs.meta.js.map +1 -0
- package/build/es/src/loyalty-v1-program-programs.public.d.ts +88 -0
- package/build/es/src/loyalty-v1-program-programs.public.js +63 -0
- package/build/es/src/loyalty-v1-program-programs.public.js.map +1 -0
- package/build/es/src/loyalty-v1-program-programs.types.d.ts +1161 -0
- package/build/es/src/loyalty-v1-program-programs.types.js +164 -0
- package/build/es/src/loyalty-v1-program-programs.types.js.map +1 -0
- package/build/es/src/loyalty-v1-program-programs.universal.d.ts +1296 -0
- package/build/es/src/loyalty-v1-program-programs.universal.js +482 -0
- package/build/es/src/loyalty-v1-program-programs.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.context.d.ts +18 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.context.js +30 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.context.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.http.d.ts +49 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.http.js +417 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.http.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.meta.d.ts +20 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.meta.js +180 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.meta.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.public.d.ts +88 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.public.js +83 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.public.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.types.d.ts +1161 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.types.js +167 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.types.js.map +1 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.universal.d.ts +1296 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.universal.js +516 -0
- package/build/internal/cjs/src/loyalty-v1-program-programs.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-program-programs.context.d.ts +18 -0
- package/build/internal/es/src/loyalty-v1-program-programs.context.js +18 -0
- package/build/internal/es/src/loyalty-v1-program-programs.context.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-program-programs.http.d.ts +49 -0
- package/build/internal/es/src/loyalty-v1-program-programs.http.js +406 -0
- package/build/internal/es/src/loyalty-v1-program-programs.http.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-program-programs.meta.d.ts +20 -0
- package/build/internal/es/src/loyalty-v1-program-programs.meta.js +146 -0
- package/build/internal/es/src/loyalty-v1-program-programs.meta.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-program-programs.public.d.ts +88 -0
- package/build/internal/es/src/loyalty-v1-program-programs.public.js +63 -0
- package/build/internal/es/src/loyalty-v1-program-programs.public.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-program-programs.types.d.ts +1161 -0
- package/build/internal/es/src/loyalty-v1-program-programs.types.js +164 -0
- package/build/internal/es/src/loyalty-v1-program-programs.types.js.map +1 -0
- package/build/internal/es/src/loyalty-v1-program-programs.universal.d.ts +1296 -0
- package/build/internal/es/src/loyalty-v1-program-programs.universal.js +482 -0
- package/build/internal/es/src/loyalty-v1-program-programs.universal.js.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +52 -0
|
@@ -0,0 +1,1296 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A loyalty program allows sites to maintain customer reward accounts. Site owners can create a
|
|
3
|
+
* loyalty program to increase customer retention. Read more about the loyalty program in
|
|
4
|
+
* [this overview](https://support.wix.com/en/article/wix-loyalty-program-an-overview).
|
|
5
|
+
*/
|
|
6
|
+
export interface LoyaltyProgram {
|
|
7
|
+
/** Program name. */
|
|
8
|
+
name?: string | null;
|
|
9
|
+
/** Information about the program's collectible entity. */
|
|
10
|
+
pointDefinition?: PointDefinition;
|
|
11
|
+
/**
|
|
12
|
+
* Program status. Customers can only earn or redeem points while the program is `ACTIVE`.
|
|
13
|
+
*
|
|
14
|
+
* Default: `"DRAFT"`
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
17
|
+
status?: ProgramStatus;
|
|
18
|
+
/**
|
|
19
|
+
* Date and time the program was created.
|
|
20
|
+
* @readonly
|
|
21
|
+
*/
|
|
22
|
+
_createdDate?: Date | null;
|
|
23
|
+
/**
|
|
24
|
+
* Date and time the program was updated.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
_updatedDate?: Date | null;
|
|
28
|
+
/** Configuration for the points expiration feature. */
|
|
29
|
+
pointsExpiration?: PointsExpiration;
|
|
30
|
+
/**
|
|
31
|
+
* Information about the available program premium features.
|
|
32
|
+
* @readonly
|
|
33
|
+
*/
|
|
34
|
+
premiumFeatures?: PremiumFeatures;
|
|
35
|
+
}
|
|
36
|
+
export interface PointDefinition {
|
|
37
|
+
/**
|
|
38
|
+
* Display name for the program's collectible unit.
|
|
39
|
+
*
|
|
40
|
+
* It's recommended to use a plural, for example `Stars`.
|
|
41
|
+
*
|
|
42
|
+
* In contrast to a custom name, the default `"Points"` name is translated and adjusted to singular based on circumstances.
|
|
43
|
+
*
|
|
44
|
+
* Default: `Points`.
|
|
45
|
+
*/
|
|
46
|
+
customName?: string | null;
|
|
47
|
+
/** Image URL. See [Image]($w/image/introduction) for more information on URL formats for images. */
|
|
48
|
+
icon?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface FocalPoint {
|
|
51
|
+
/** X-coordinate of the focal point. */
|
|
52
|
+
x?: number;
|
|
53
|
+
/** Y-coordinate of the focal point. */
|
|
54
|
+
y?: number;
|
|
55
|
+
/** crop by height */
|
|
56
|
+
height?: number | null;
|
|
57
|
+
/** crop by width */
|
|
58
|
+
width?: number | null;
|
|
59
|
+
}
|
|
60
|
+
export declare enum ProgramStatus {
|
|
61
|
+
/** Unknown program status. */
|
|
62
|
+
UNKNOWN = "UNKNOWN",
|
|
63
|
+
/** Program was created but is not enabled yet. */
|
|
64
|
+
DRAFT = "DRAFT",
|
|
65
|
+
/** Program is active. */
|
|
66
|
+
ACTIVE = "ACTIVE",
|
|
67
|
+
/** Program was manually disabled by the user. This action can be reverted, meaning the user can set it to be active again. */
|
|
68
|
+
PAUSED = "PAUSED"
|
|
69
|
+
}
|
|
70
|
+
export interface PointsExpiration {
|
|
71
|
+
/**
|
|
72
|
+
* Status of the points expiration feature.
|
|
73
|
+
* @readonly
|
|
74
|
+
*/
|
|
75
|
+
status?: Status;
|
|
76
|
+
/** How many months a member should be inactive to lose the collected points. */
|
|
77
|
+
monthsOfInactivity?: number;
|
|
78
|
+
/** Percentage of points that a member loses after being inactive. */
|
|
79
|
+
expiringPointsPercentage?: number;
|
|
80
|
+
}
|
|
81
|
+
export declare enum Status {
|
|
82
|
+
/** Unknown points expiration status. This value is not used. */
|
|
83
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
84
|
+
/** Points expiration feature is disabled. */
|
|
85
|
+
DISABLED = "DISABLED",
|
|
86
|
+
/** Points expiration feature is enabled. */
|
|
87
|
+
ENABLED = "ENABLED"
|
|
88
|
+
}
|
|
89
|
+
export interface PremiumFeatures {
|
|
90
|
+
/**
|
|
91
|
+
* Whether there are any loyalty program premium features.
|
|
92
|
+
* @readonly
|
|
93
|
+
*/
|
|
94
|
+
loyaltyProgram?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Whether this loyalty program includes tiers.
|
|
97
|
+
* @readonly
|
|
98
|
+
*/
|
|
99
|
+
tiers?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Whether this loyalty program includes point expiration.
|
|
102
|
+
* @readonly
|
|
103
|
+
*/
|
|
104
|
+
pointsExpiration?: boolean;
|
|
105
|
+
}
|
|
106
|
+
export interface SocialMediaSettings {
|
|
107
|
+
/** List of social media channels */
|
|
108
|
+
channels?: SocialMediaChannel[];
|
|
109
|
+
}
|
|
110
|
+
export interface SocialMediaChannel {
|
|
111
|
+
/** Social media channel type */
|
|
112
|
+
type?: Type;
|
|
113
|
+
/** Enable or disable social media channel */
|
|
114
|
+
enabled?: boolean;
|
|
115
|
+
/** Social media channel ID. For example, Instagram username. */
|
|
116
|
+
_id?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Social media channel URL
|
|
119
|
+
* @readonly
|
|
120
|
+
*/
|
|
121
|
+
url?: string | null;
|
|
122
|
+
}
|
|
123
|
+
export declare enum Type {
|
|
124
|
+
/** Unknown social media channel type. */
|
|
125
|
+
UNKNOWN_CHANNEL = "UNKNOWN_CHANNEL",
|
|
126
|
+
/** Facebook social media channel. */
|
|
127
|
+
FACEBOOK = "FACEBOOK",
|
|
128
|
+
/** Instagram social media channel. */
|
|
129
|
+
INSTAGRAM = "INSTAGRAM",
|
|
130
|
+
/** LinkedIn social media channel. */
|
|
131
|
+
LINKEDIN = "LINKEDIN",
|
|
132
|
+
/** X social media channel. */
|
|
133
|
+
X = "X",
|
|
134
|
+
/** TikTok social media channel. */
|
|
135
|
+
TIKTOK = "TIKTOK"
|
|
136
|
+
}
|
|
137
|
+
export interface GetLoyaltyProgramRequest {
|
|
138
|
+
}
|
|
139
|
+
export interface GetLoyaltyProgramResponse {
|
|
140
|
+
/** Retrieved loyalty program. */
|
|
141
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
142
|
+
}
|
|
143
|
+
export interface BulkGetLoyaltyProgramRequest {
|
|
144
|
+
}
|
|
145
|
+
export interface BulkGetLoyaltyProgramResponse {
|
|
146
|
+
/** Retrieved loyalty programs. */
|
|
147
|
+
programInSites?: ProgramInSite[];
|
|
148
|
+
}
|
|
149
|
+
export interface ProgramInSite {
|
|
150
|
+
/** Metasite ID. */
|
|
151
|
+
metaSiteId?: string;
|
|
152
|
+
/** Loyalty program. */
|
|
153
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
154
|
+
}
|
|
155
|
+
export interface UpdateLoyaltyProgramRequest {
|
|
156
|
+
/** Loyalty program fields to update. */
|
|
157
|
+
loyaltyProgram: LoyaltyProgram;
|
|
158
|
+
}
|
|
159
|
+
export interface UpdateLoyaltyProgramResponse {
|
|
160
|
+
/** Updated loyalty program. */
|
|
161
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
162
|
+
}
|
|
163
|
+
export interface PointsExpirationConfigurationChanged {
|
|
164
|
+
/** Loyalty program. */
|
|
165
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
166
|
+
/** Points expiration configuration changes */
|
|
167
|
+
pointsExpirationChanges?: PointsExpirationChanges;
|
|
168
|
+
}
|
|
169
|
+
export interface PointsExpirationChanges {
|
|
170
|
+
monthsOfInactivity?: number | null;
|
|
171
|
+
expiringPointsPercentage?: number | null;
|
|
172
|
+
}
|
|
173
|
+
export interface ActivateLoyaltyProgramRequest {
|
|
174
|
+
}
|
|
175
|
+
export interface ActivateLoyaltyProgramResponse {
|
|
176
|
+
/** Activated loyalty program. */
|
|
177
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
178
|
+
}
|
|
179
|
+
export interface LoyaltyProgramActivated {
|
|
180
|
+
/** Activated loyalty program. */
|
|
181
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
182
|
+
}
|
|
183
|
+
export interface PauseLoyaltyProgramRequest {
|
|
184
|
+
}
|
|
185
|
+
export interface PauseLoyaltyProgramResponse {
|
|
186
|
+
/** Paused loyalty program. */
|
|
187
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
188
|
+
}
|
|
189
|
+
export interface GetLoyaltyProgramDescriptionRequest {
|
|
190
|
+
/** List of description fields to retrieve. Supported values: `description`, `updatedDate`. */
|
|
191
|
+
fields?: string[];
|
|
192
|
+
}
|
|
193
|
+
export interface GetLoyaltyProgramDescriptionResponse {
|
|
194
|
+
/** Retrieved loyalty program description. */
|
|
195
|
+
description?: string | null;
|
|
196
|
+
/** Date and time of the latest description update. */
|
|
197
|
+
_updatedDate?: Date | null;
|
|
198
|
+
}
|
|
199
|
+
export interface UpdateLoyaltyProgramDescriptionRequest {
|
|
200
|
+
/** Loyalty program description to update. */
|
|
201
|
+
description?: string;
|
|
202
|
+
}
|
|
203
|
+
export interface UpdateLoyaltyProgramDescriptionResponse {
|
|
204
|
+
}
|
|
205
|
+
export interface LoyaltyProgramDescriptionUpdated {
|
|
206
|
+
}
|
|
207
|
+
export interface GetLoyaltyProgramPremiumFeaturesRequest {
|
|
208
|
+
}
|
|
209
|
+
export interface GetLoyaltyProgramPremiumFeaturesResponse {
|
|
210
|
+
/**
|
|
211
|
+
* Whether there are any loyalty program premium features.
|
|
212
|
+
* @readonly
|
|
213
|
+
*/
|
|
214
|
+
loyaltyProgram?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Whether this loyalty program includes tiers.
|
|
217
|
+
* @readonly
|
|
218
|
+
*/
|
|
219
|
+
tiers?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Whether this loyalty program includes point expiration.
|
|
222
|
+
* @readonly
|
|
223
|
+
*/
|
|
224
|
+
pointsExpiration?: boolean;
|
|
225
|
+
}
|
|
226
|
+
export interface EnablePointsExpirationRequest {
|
|
227
|
+
}
|
|
228
|
+
export interface EnablePointsExpirationResponse {
|
|
229
|
+
/** Loyalty program with enabled points expiration feature. */
|
|
230
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
231
|
+
}
|
|
232
|
+
export interface PointsExpirationEnabled {
|
|
233
|
+
/** Loyalty program. */
|
|
234
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
235
|
+
}
|
|
236
|
+
export interface DisablePointsExpirationRequest {
|
|
237
|
+
}
|
|
238
|
+
export interface DisablePointsExpirationResponse {
|
|
239
|
+
/** Loyalty program with disabled points expiration feature. */
|
|
240
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
241
|
+
}
|
|
242
|
+
export interface PointsExpirationDisabled {
|
|
243
|
+
/** Loyalty program. */
|
|
244
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
245
|
+
}
|
|
246
|
+
export interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf {
|
|
247
|
+
/** Emitted on a meta site creation. */
|
|
248
|
+
siteCreated?: SiteCreated;
|
|
249
|
+
/** Emitted on a meta site transfer completion. */
|
|
250
|
+
siteTransferred?: SiteTransferred;
|
|
251
|
+
/** Emitted on a meta site deletion. */
|
|
252
|
+
siteDeleted?: SiteDeleted;
|
|
253
|
+
/** Emitted on a meta site restoration. */
|
|
254
|
+
siteUndeleted?: SiteUndeleted;
|
|
255
|
+
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
256
|
+
sitePublished?: SitePublished;
|
|
257
|
+
/** Emitted on a meta site unpublish. */
|
|
258
|
+
siteUnpublished?: SiteUnpublished;
|
|
259
|
+
/** Emitted when meta site is marked as template. */
|
|
260
|
+
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
261
|
+
/** Emitted when meta site is marked as a WixSite. */
|
|
262
|
+
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
263
|
+
/** Emitted when an application is provisioned (installed). */
|
|
264
|
+
serviceProvisioned?: ServiceProvisioned;
|
|
265
|
+
/** Emitted when an application is removed (uninstalled). */
|
|
266
|
+
serviceRemoved?: ServiceRemoved;
|
|
267
|
+
/** Emitted when meta site name (URL slug) is changed. */
|
|
268
|
+
siteRenamedPayload?: SiteRenamed;
|
|
269
|
+
/** Emitted when meta site was permanently deleted. */
|
|
270
|
+
hardDeleted?: SiteHardDeleted;
|
|
271
|
+
/** Emitted on a namespace change. */
|
|
272
|
+
namespaceChanged?: NamespaceChanged;
|
|
273
|
+
/** Emitted when Studio is attached. */
|
|
274
|
+
studioAssigned?: StudioAssigned;
|
|
275
|
+
/** Emitted when Studio is detached. */
|
|
276
|
+
studioUnassigned?: StudioUnassigned;
|
|
277
|
+
/** A meta site id. */
|
|
278
|
+
metaSiteId?: string;
|
|
279
|
+
/** A meta site version. Monotonically increasing. */
|
|
280
|
+
version?: string;
|
|
281
|
+
/** A timestamp of the event. */
|
|
282
|
+
timestamp?: string;
|
|
283
|
+
/**
|
|
284
|
+
* TODO(meta-site): Change validation once validations are disabled for consumers
|
|
285
|
+
* More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659
|
|
286
|
+
*/
|
|
287
|
+
assets?: Asset[];
|
|
288
|
+
}
|
|
289
|
+
/** @oneof */
|
|
290
|
+
export interface MetaSiteSpecialEventPayloadOneOf {
|
|
291
|
+
/** Emitted on a meta site creation. */
|
|
292
|
+
siteCreated?: SiteCreated;
|
|
293
|
+
/** Emitted on a meta site transfer completion. */
|
|
294
|
+
siteTransferred?: SiteTransferred;
|
|
295
|
+
/** Emitted on a meta site deletion. */
|
|
296
|
+
siteDeleted?: SiteDeleted;
|
|
297
|
+
/** Emitted on a meta site restoration. */
|
|
298
|
+
siteUndeleted?: SiteUndeleted;
|
|
299
|
+
/** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */
|
|
300
|
+
sitePublished?: SitePublished;
|
|
301
|
+
/** Emitted on a meta site unpublish. */
|
|
302
|
+
siteUnpublished?: SiteUnpublished;
|
|
303
|
+
/** Emitted when meta site is marked as template. */
|
|
304
|
+
siteMarkedAsTemplate?: SiteMarkedAsTemplate;
|
|
305
|
+
/** Emitted when meta site is marked as a WixSite. */
|
|
306
|
+
siteMarkedAsWixSite?: SiteMarkedAsWixSite;
|
|
307
|
+
/** Emitted when an application is provisioned (installed). */
|
|
308
|
+
serviceProvisioned?: ServiceProvisioned;
|
|
309
|
+
/** Emitted when an application is removed (uninstalled). */
|
|
310
|
+
serviceRemoved?: ServiceRemoved;
|
|
311
|
+
/** Emitted when meta site name (URL slug) is changed. */
|
|
312
|
+
siteRenamedPayload?: SiteRenamed;
|
|
313
|
+
/** Emitted when meta site was permanently deleted. */
|
|
314
|
+
hardDeleted?: SiteHardDeleted;
|
|
315
|
+
/** Emitted on a namespace change. */
|
|
316
|
+
namespaceChanged?: NamespaceChanged;
|
|
317
|
+
/** Emitted when Studio is attached. */
|
|
318
|
+
studioAssigned?: StudioAssigned;
|
|
319
|
+
/** Emitted when Studio is detached. */
|
|
320
|
+
studioUnassigned?: StudioUnassigned;
|
|
321
|
+
}
|
|
322
|
+
export interface Asset {
|
|
323
|
+
/** An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). */
|
|
324
|
+
appDefId?: string;
|
|
325
|
+
/** An instance id. For legacy reasons may be UUID or a string. */
|
|
326
|
+
instanceId?: string;
|
|
327
|
+
/** An application state. */
|
|
328
|
+
state?: State;
|
|
329
|
+
}
|
|
330
|
+
export declare enum State {
|
|
331
|
+
UNKNOWN = "UNKNOWN",
|
|
332
|
+
ENABLED = "ENABLED",
|
|
333
|
+
DISABLED = "DISABLED",
|
|
334
|
+
PENDING = "PENDING",
|
|
335
|
+
DEMO = "DEMO"
|
|
336
|
+
}
|
|
337
|
+
export interface SiteCreated {
|
|
338
|
+
/** A template identifier (empty if not created from a template). */
|
|
339
|
+
originTemplateId?: string;
|
|
340
|
+
/** An account id of the owner. */
|
|
341
|
+
ownerId?: string;
|
|
342
|
+
/** A context in which meta site was created. */
|
|
343
|
+
context?: SiteCreatedContext;
|
|
344
|
+
/**
|
|
345
|
+
* A meta site id from which this site was created.
|
|
346
|
+
*
|
|
347
|
+
* In case of a creation from a template it's a template id.
|
|
348
|
+
* In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site.
|
|
349
|
+
*/
|
|
350
|
+
originMetaSiteId?: string | null;
|
|
351
|
+
/** A meta site name (URL slug). */
|
|
352
|
+
siteName?: string;
|
|
353
|
+
/** A namespace. */
|
|
354
|
+
namespace?: Namespace;
|
|
355
|
+
}
|
|
356
|
+
export declare enum SiteCreatedContext {
|
|
357
|
+
/** A valid option, we don't expose all reasons why site might be created. */
|
|
358
|
+
OTHER = "OTHER",
|
|
359
|
+
/** A meta site was created from template. */
|
|
360
|
+
FROM_TEMPLATE = "FROM_TEMPLATE",
|
|
361
|
+
/** A meta site was created by copying of the transfferred meta site. */
|
|
362
|
+
DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER",
|
|
363
|
+
/** A copy of existing meta site. */
|
|
364
|
+
DUPLICATE = "DUPLICATE",
|
|
365
|
+
/** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */
|
|
366
|
+
OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER",
|
|
367
|
+
/** deprecated A meta site was created for Flash editor. */
|
|
368
|
+
FLASH = "FLASH"
|
|
369
|
+
}
|
|
370
|
+
export declare enum Namespace {
|
|
371
|
+
UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE",
|
|
372
|
+
/** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */
|
|
373
|
+
WIX = "WIX",
|
|
374
|
+
/** 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. */
|
|
375
|
+
SHOUT_OUT = "SHOUT_OUT",
|
|
376
|
+
/** 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. */
|
|
377
|
+
ALBUMS = "ALBUMS",
|
|
378
|
+
/** 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. */
|
|
379
|
+
WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE",
|
|
380
|
+
/** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
381
|
+
HOTELS = "HOTELS",
|
|
382
|
+
/** 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. */
|
|
383
|
+
CLUBS = "CLUBS",
|
|
384
|
+
/** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
385
|
+
ONBOARDING_DRAFT = "ONBOARDING_DRAFT",
|
|
386
|
+
/** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
387
|
+
DEV_SITE = "DEV_SITE",
|
|
388
|
+
/** 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. */
|
|
389
|
+
LOGOS = "LOGOS",
|
|
390
|
+
/** 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. */
|
|
391
|
+
VIDEO_MAKER = "VIDEO_MAKER",
|
|
392
|
+
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
393
|
+
PARTNER_DASHBOARD = "PARTNER_DASHBOARD",
|
|
394
|
+
/** MetaSites with this namespace will *not* be shown in a user's site list by default. */
|
|
395
|
+
DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY",
|
|
396
|
+
/**
|
|
397
|
+
* A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain.
|
|
398
|
+
*
|
|
399
|
+
* Meta site with this namespace will *not* be shown in a user's site list by default.
|
|
400
|
+
*/
|
|
401
|
+
HTML_DRAFT = "HTML_DRAFT",
|
|
402
|
+
/**
|
|
403
|
+
* the user-journey for Fitness users who want to start from managing their business instead of designing their website.
|
|
404
|
+
* Will be accessible from Site List and will not have a website app.
|
|
405
|
+
* Once the user attaches a site, the site will become a regular wixsite.
|
|
406
|
+
*/
|
|
407
|
+
SITELESS_BUSINESS = "SITELESS_BUSINESS",
|
|
408
|
+
/** Belongs to "strategic products" company. Supports new product in the creator's economy space. */
|
|
409
|
+
CREATOR_ECONOMY = "CREATOR_ECONOMY",
|
|
410
|
+
/** It is to be used in the Business First efforts. */
|
|
411
|
+
DASHBOARD_FIRST = "DASHBOARD_FIRST",
|
|
412
|
+
/** Bookings business flow with no site. */
|
|
413
|
+
ANYWHERE = "ANYWHERE",
|
|
414
|
+
/** Namespace for Headless Backoffice with no editor */
|
|
415
|
+
HEADLESS = "HEADLESS",
|
|
416
|
+
/**
|
|
417
|
+
* Namespace for master site that will exist in parent account that will be referenced by subaccounts
|
|
418
|
+
* The site will be used for account level CSM feature for enterprise
|
|
419
|
+
*/
|
|
420
|
+
ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS",
|
|
421
|
+
/** Rise.ai Siteless account management for Gift Cards and Store Credit. */
|
|
422
|
+
RISE = "RISE",
|
|
423
|
+
/**
|
|
424
|
+
* As part of the branded app new funnel, users now can create a meta site that will be branded app first.
|
|
425
|
+
* There's a blank site behind the scene but it's blank).
|
|
426
|
+
* The Mobile company will be the owner of this namespace.
|
|
427
|
+
*/
|
|
428
|
+
BRANDED_FIRST = "BRANDED_FIRST",
|
|
429
|
+
/** Nownia.com Siteless account management for Ai Scheduling Assistant. */
|
|
430
|
+
NOWNIA = "NOWNIA",
|
|
431
|
+
/**
|
|
432
|
+
* UGC Templates are templates that are created by users for personal use and to sale to other users.
|
|
433
|
+
* The Partners company owns this namespace.
|
|
434
|
+
*/
|
|
435
|
+
UGC_TEMPLATE = "UGC_TEMPLATE",
|
|
436
|
+
/** Codux Headless Sites */
|
|
437
|
+
CODUX = "CODUX",
|
|
438
|
+
/** Bobb - AI Design Creator. */
|
|
439
|
+
MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR",
|
|
440
|
+
/**
|
|
441
|
+
* Shared Blog Site is a unique single site across Enterprise account,
|
|
442
|
+
* This site will hold all Blog posts related to the Marketing product.
|
|
443
|
+
*/
|
|
444
|
+
SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE"
|
|
445
|
+
}
|
|
446
|
+
/** Site transferred to another user. */
|
|
447
|
+
export interface SiteTransferred {
|
|
448
|
+
/** A previous owner id (user that transfers meta site). */
|
|
449
|
+
oldOwnerId?: string;
|
|
450
|
+
/** A new owner id (user that accepts meta site). */
|
|
451
|
+
newOwnerId?: string;
|
|
452
|
+
}
|
|
453
|
+
/** Soft deletion of the meta site. Could be restored. */
|
|
454
|
+
export interface SiteDeleted {
|
|
455
|
+
/** A deletion context. */
|
|
456
|
+
deleteContext?: DeleteContext;
|
|
457
|
+
}
|
|
458
|
+
export interface DeleteContext {
|
|
459
|
+
/** When the meta site was deleted. */
|
|
460
|
+
dateDeleted?: Date | null;
|
|
461
|
+
/** A status. */
|
|
462
|
+
deleteStatus?: DeleteStatus;
|
|
463
|
+
/** A reason (flow). */
|
|
464
|
+
deleteOrigin?: string;
|
|
465
|
+
/** A service that deleted it. */
|
|
466
|
+
initiatorId?: string | null;
|
|
467
|
+
}
|
|
468
|
+
export declare enum DeleteStatus {
|
|
469
|
+
UNKNOWN = "UNKNOWN",
|
|
470
|
+
TRASH = "TRASH",
|
|
471
|
+
DELETED = "DELETED",
|
|
472
|
+
PENDING_PURGE = "PENDING_PURGE"
|
|
473
|
+
}
|
|
474
|
+
/** Restoration of the meta site. */
|
|
475
|
+
export interface SiteUndeleted {
|
|
476
|
+
}
|
|
477
|
+
/** First publish of a meta site. Or subsequent publish after unpublish. */
|
|
478
|
+
export interface SitePublished {
|
|
479
|
+
}
|
|
480
|
+
export interface SiteUnpublished {
|
|
481
|
+
/** A list of URLs previously associated with the meta site. */
|
|
482
|
+
urls?: string[];
|
|
483
|
+
}
|
|
484
|
+
export interface SiteMarkedAsTemplate {
|
|
485
|
+
}
|
|
486
|
+
export interface SiteMarkedAsWixSite {
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Represents a service provisioned a site.
|
|
490
|
+
*
|
|
491
|
+
* Note on `origin_instance_id`:
|
|
492
|
+
* There is no guarantee that you will be able to find a meta site using `origin_instance_id`.
|
|
493
|
+
* This is because of the following scenario:
|
|
494
|
+
*
|
|
495
|
+
* Imagine you have a template where a third-party application (TPA) includes some stub data,
|
|
496
|
+
* such as a product catalog. When you create a site from this template, you inherit this
|
|
497
|
+
* default product catalog. However, if the template's product catalog is modified,
|
|
498
|
+
* your site will retain the catalog as it was at the time of site creation. This ensures that
|
|
499
|
+
* your site remains consistent with what you initially received and does not include any
|
|
500
|
+
* changes made to the original template afterward.
|
|
501
|
+
* To ensure this, the TPA on the template gets a new instance_id.
|
|
502
|
+
*/
|
|
503
|
+
export interface ServiceProvisioned {
|
|
504
|
+
/** Either UUID or EmbeddedServiceType. */
|
|
505
|
+
appDefId?: string;
|
|
506
|
+
/** Not only UUID. Something here could be something weird. */
|
|
507
|
+
instanceId?: string;
|
|
508
|
+
/** An instance id from which this instance is originated. */
|
|
509
|
+
originInstanceId?: string;
|
|
510
|
+
/** A version. */
|
|
511
|
+
version?: string | null;
|
|
512
|
+
/** The origin meta site id */
|
|
513
|
+
originMetaSiteId?: string | null;
|
|
514
|
+
}
|
|
515
|
+
export interface ServiceRemoved {
|
|
516
|
+
/** Either UUID or EmbeddedServiceType. */
|
|
517
|
+
appDefId?: string;
|
|
518
|
+
/** Not only UUID. Something here could be something weird. */
|
|
519
|
+
instanceId?: string;
|
|
520
|
+
/** A version. */
|
|
521
|
+
version?: string | null;
|
|
522
|
+
}
|
|
523
|
+
/** Rename of the site. Meaning, free public url has been changed as well. */
|
|
524
|
+
export interface SiteRenamed {
|
|
525
|
+
/** A new meta site name (URL slug). */
|
|
526
|
+
newSiteName?: string;
|
|
527
|
+
/** A previous meta site name (URL slug). */
|
|
528
|
+
oldSiteName?: string;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Hard deletion of the meta site.
|
|
532
|
+
*
|
|
533
|
+
* Could not be restored. Therefore it's desirable to cleanup data.
|
|
534
|
+
*/
|
|
535
|
+
export interface SiteHardDeleted {
|
|
536
|
+
/** A deletion context. */
|
|
537
|
+
deleteContext?: DeleteContext;
|
|
538
|
+
}
|
|
539
|
+
export interface NamespaceChanged {
|
|
540
|
+
/** A previous namespace. */
|
|
541
|
+
oldNamespace?: Namespace;
|
|
542
|
+
/** A new namespace. */
|
|
543
|
+
newNamespace?: Namespace;
|
|
544
|
+
}
|
|
545
|
+
/** Assigned Studio editor */
|
|
546
|
+
export interface StudioAssigned {
|
|
547
|
+
}
|
|
548
|
+
/** Unassigned Studio editor */
|
|
549
|
+
export interface StudioUnassigned {
|
|
550
|
+
}
|
|
551
|
+
export interface Empty {
|
|
552
|
+
}
|
|
553
|
+
export interface FeatureEvent extends FeatureEventEventOneOf {
|
|
554
|
+
/**
|
|
555
|
+
* Information about an event that makes a feature eligible to the user.
|
|
556
|
+
* Triggered for example, for new features or when a feature is reassigned
|
|
557
|
+
* to an account or a site.
|
|
558
|
+
*/
|
|
559
|
+
enabled?: FeatureEnabled;
|
|
560
|
+
/**
|
|
561
|
+
* Information about an event that disables a feature for the user.
|
|
562
|
+
* Triggered for example, when a feature is unassigned from a site,
|
|
563
|
+
* reassigned to a different site, or the user switched to a different contract.
|
|
564
|
+
*/
|
|
565
|
+
disabled?: FeatureDisabled;
|
|
566
|
+
/**
|
|
567
|
+
* Information about an event that updates a feature. An `updated` event
|
|
568
|
+
* is triggered for example by the
|
|
569
|
+
* [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)
|
|
570
|
+
* and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)
|
|
571
|
+
* endpoints.
|
|
572
|
+
*/
|
|
573
|
+
updated?: FeatureUpdated;
|
|
574
|
+
/**
|
|
575
|
+
* Information about an event that cancels a feature for the user.
|
|
576
|
+
* Triggered for example, when a feature is canceled, transferred to
|
|
577
|
+
* another account, or the user switched to a different contract.
|
|
578
|
+
*/
|
|
579
|
+
cancelled?: FeatureCancelled;
|
|
580
|
+
/**
|
|
581
|
+
* Timestamp of the event in
|
|
582
|
+
* [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time).
|
|
583
|
+
*/
|
|
584
|
+
timestamp?: Date | null;
|
|
585
|
+
}
|
|
586
|
+
/** @oneof */
|
|
587
|
+
export interface FeatureEventEventOneOf {
|
|
588
|
+
/**
|
|
589
|
+
* Information about an event that makes a feature eligible to the user.
|
|
590
|
+
* Triggered for example, for new features or when a feature is reassigned
|
|
591
|
+
* to an account or a site.
|
|
592
|
+
*/
|
|
593
|
+
enabled?: FeatureEnabled;
|
|
594
|
+
/**
|
|
595
|
+
* Information about an event that disables a feature for the user.
|
|
596
|
+
* Triggered for example, when a feature is unassigned from a site,
|
|
597
|
+
* reassigned to a different site, or the user switched to a different contract.
|
|
598
|
+
*/
|
|
599
|
+
disabled?: FeatureDisabled;
|
|
600
|
+
/**
|
|
601
|
+
* Information about an event that updates a feature. An `updated` event
|
|
602
|
+
* is triggered for example by the
|
|
603
|
+
* [Report Quota Usage](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/report-quota-usage)
|
|
604
|
+
* and [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter)
|
|
605
|
+
* endpoints.
|
|
606
|
+
*/
|
|
607
|
+
updated?: FeatureUpdated;
|
|
608
|
+
/**
|
|
609
|
+
* Information about an event that cancels a feature for the user.
|
|
610
|
+
* Triggered for example, when a feature is canceled, transferred to
|
|
611
|
+
* another account, or the user switched to a different contract.
|
|
612
|
+
*/
|
|
613
|
+
cancelled?: FeatureCancelled;
|
|
614
|
+
}
|
|
615
|
+
/** Feature created or enabled after disabled state */
|
|
616
|
+
export interface FeatureEnabled extends FeatureEnabledReasonOneOf {
|
|
617
|
+
/** Information about a transfer from another account. */
|
|
618
|
+
transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;
|
|
619
|
+
/** Information about a transfer from another site. */
|
|
620
|
+
reassignedFromSite?: ReassignedFromSiteReason;
|
|
621
|
+
/** Information about a feature that hadn't been assigned to site. */
|
|
622
|
+
assignedFromFloating?: AssignedFromFloatingReason;
|
|
623
|
+
/** Information about the new feature. */
|
|
624
|
+
newFeature?: NewFeatureReason;
|
|
625
|
+
/** Information about the contract switch. */
|
|
626
|
+
contractSwitched?: ContractSwitchedReason;
|
|
627
|
+
/** Information about the manually created features. */
|
|
628
|
+
manualFeatureCreation?: ManualFeatureCreationReason;
|
|
629
|
+
/** Information about a feature that was migrated from legacy. */
|
|
630
|
+
migratedFromLegacy?: MigratedFromLegacyReason;
|
|
631
|
+
/** Enabled feature. */
|
|
632
|
+
feature?: Feature;
|
|
633
|
+
/**
|
|
634
|
+
* Information about a transfer from another account.
|
|
635
|
+
* __Deprecated__. Use `reason.transferred_from_another_account` instead.
|
|
636
|
+
*/
|
|
637
|
+
transferredFromAccount?: string | null;
|
|
638
|
+
/**
|
|
639
|
+
* Information about a transfer from another site.
|
|
640
|
+
* __Deprecated__. Use `reason.reassigned_from_site` instead.
|
|
641
|
+
*/
|
|
642
|
+
reassignedFromMetasite?: string | null;
|
|
643
|
+
}
|
|
644
|
+
/** @oneof */
|
|
645
|
+
export interface FeatureEnabledReasonOneOf {
|
|
646
|
+
/** Information about a transfer from another account. */
|
|
647
|
+
transferredFromAnotherAccount?: TransferredFromAnotherAccountReason;
|
|
648
|
+
/** Information about a transfer from another site. */
|
|
649
|
+
reassignedFromSite?: ReassignedFromSiteReason;
|
|
650
|
+
/** Information about a feature that hadn't been assigned to site. */
|
|
651
|
+
assignedFromFloating?: AssignedFromFloatingReason;
|
|
652
|
+
/** Information about the new feature. */
|
|
653
|
+
newFeature?: NewFeatureReason;
|
|
654
|
+
/** Information about the contract switch. */
|
|
655
|
+
contractSwitched?: ContractSwitchedReason;
|
|
656
|
+
/** Information about the manually created features. */
|
|
657
|
+
manualFeatureCreation?: ManualFeatureCreationReason;
|
|
658
|
+
/** Information about a feature that was migrated from legacy. */
|
|
659
|
+
migratedFromLegacy?: MigratedFromLegacyReason;
|
|
660
|
+
}
|
|
661
|
+
export interface Feature extends FeatureQuantityInfoOneOf {
|
|
662
|
+
/**
|
|
663
|
+
* Deprecated. Use `enabled` instead.
|
|
664
|
+
* @deprecated
|
|
665
|
+
*/
|
|
666
|
+
booleanFeature?: BooleanFeature;
|
|
667
|
+
/**
|
|
668
|
+
* Deprecated. Use `quotaInfo` instead.
|
|
669
|
+
* @deprecated
|
|
670
|
+
*/
|
|
671
|
+
quotaFeature?: QuotaFeature;
|
|
672
|
+
/**
|
|
673
|
+
* ID of the feature. __Note:__ Isn't unique. For example, all features that
|
|
674
|
+
* are available to free Wix accounts or site in some capacity have
|
|
675
|
+
* `{"id": "DEFAULT"}`. Use `uniqueName` as unique identifier for a feature.
|
|
676
|
+
* @readonly
|
|
677
|
+
*/
|
|
678
|
+
_id?: string;
|
|
679
|
+
/**
|
|
680
|
+
* Unique name of the feature. Only lower case letters, numbers, and dashes
|
|
681
|
+
* `-` are supported. Used in the endpoints of the
|
|
682
|
+
* [Features Manager API](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/introduction)
|
|
683
|
+
* to specify the feature. Not visible to customers. We recommend to start
|
|
684
|
+
* the unique name with a prefix describing your organization or Wix company.
|
|
685
|
+
* For example, `bookings` or `crm`.
|
|
686
|
+
*
|
|
687
|
+
* Min: 2 characters
|
|
688
|
+
* Max: 50 characters
|
|
689
|
+
*/
|
|
690
|
+
uniqueName?: string;
|
|
691
|
+
/**
|
|
692
|
+
* Information about whether the feature belongs to a Wix account or site.
|
|
693
|
+
* Account features have `context.userId`. Site features have `context.metaSiteId` in case
|
|
694
|
+
* they're assigned to a specific site. Site features that aren't assigned to
|
|
695
|
+
* a specific site have neither ID.
|
|
696
|
+
*/
|
|
697
|
+
context?: FeatureContext;
|
|
698
|
+
/**
|
|
699
|
+
* Deprecated.
|
|
700
|
+
* @readonly
|
|
701
|
+
* @deprecated
|
|
702
|
+
*/
|
|
703
|
+
createdAt?: Date | null;
|
|
704
|
+
/**
|
|
705
|
+
* Deprecated.
|
|
706
|
+
* @readonly
|
|
707
|
+
* @deprecated
|
|
708
|
+
*/
|
|
709
|
+
updatedAt?: Date | null;
|
|
710
|
+
/**
|
|
711
|
+
* Information about how often customers can use the feature during a specific
|
|
712
|
+
* period. Available only for quota features.
|
|
713
|
+
*/
|
|
714
|
+
quotaInfo?: QuotaInfo;
|
|
715
|
+
/**
|
|
716
|
+
* Whether the customer is currently allowed to use the feature.
|
|
717
|
+
* `true` means that the customer can use the feature. This means a boolean
|
|
718
|
+
* feature is active or a quota feature has remaining usage.
|
|
719
|
+
* `false` means that the customer can't use the feature.
|
|
720
|
+
* This means a boolean feature isn't active or a quota feature doesn't
|
|
721
|
+
* have remaining usage.
|
|
722
|
+
*/
|
|
723
|
+
enabled?: boolean;
|
|
724
|
+
/**
|
|
725
|
+
* ID of the [subscription](https://bo.wix.com/wix-docs/rest/premium/premium-subscriptions-manager/subscription-object)
|
|
726
|
+
* to which the feature instance belongs.
|
|
727
|
+
*/
|
|
728
|
+
subscriptionId?: string | null;
|
|
729
|
+
/**
|
|
730
|
+
* Metadata of the feature. Wix Premium uses the metadata object to indicate
|
|
731
|
+
* that customers who purchase a product with the feature also get
|
|
732
|
+
* access to an additional product. For these bundled products `metadata`
|
|
733
|
+
* looks like this: `{"tpa": "{"appDefId": "sample-app-def-id-1234567890", "vendorProductId": "sample-productId"}}"`.
|
|
734
|
+
* But you can use the `metadata` property for other purposes, too.
|
|
735
|
+
*/
|
|
736
|
+
metadata?: Record<string, string>;
|
|
737
|
+
}
|
|
738
|
+
/** @oneof */
|
|
739
|
+
export interface FeatureQuantityInfoOneOf {
|
|
740
|
+
/**
|
|
741
|
+
* Deprecated. Use `enabled` instead.
|
|
742
|
+
* @deprecated
|
|
743
|
+
*/
|
|
744
|
+
booleanFeature?: BooleanFeature;
|
|
745
|
+
/**
|
|
746
|
+
* Deprecated. Use `quotaInfo` instead.
|
|
747
|
+
* @deprecated
|
|
748
|
+
*/
|
|
749
|
+
quotaFeature?: QuotaFeature;
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Context this feature is currently connected to.
|
|
753
|
+
* Note: Do not confuse with feature scope which is configured in the product catalog
|
|
754
|
+
* and defines in which context the product can be used
|
|
755
|
+
*/
|
|
756
|
+
export interface FeatureContext {
|
|
757
|
+
/**
|
|
758
|
+
* ID of the Wix account that the feature instance belongs to.
|
|
759
|
+
* Available for both site and account level feature instances.
|
|
760
|
+
*/
|
|
761
|
+
userId?: string;
|
|
762
|
+
/**
|
|
763
|
+
* ID of the meta site that the feature instance is assigned to.
|
|
764
|
+
* Only available for site level feature instances that are assigned to a Wix
|
|
765
|
+
* site. Not available for account level and unassigned site level feature
|
|
766
|
+
* instances.
|
|
767
|
+
*/
|
|
768
|
+
metaSiteId?: string | null;
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* A feature that can be either "enabled" or "disabled". The default/freemium setting is always OFF, and the premium setting is always ON (meaning, unlimited usage without tracking).
|
|
772
|
+
* A boolean feature is similar to a quantitive feature with a default limit of 0 and UNLIMITED premium limit (although a bit simplified).
|
|
773
|
+
*/
|
|
774
|
+
export interface BooleanFeature {
|
|
775
|
+
}
|
|
776
|
+
/** A feature with a periodic usage limitation. The default limit is defined in the Feature Spec, the Premium limits are defined in the respective ProductFeature. */
|
|
777
|
+
export interface QuotaFeature {
|
|
778
|
+
/** Default (or Freemium) quota limitation. if left undefined the free feature has unlimited amount. */
|
|
779
|
+
limit?: string | null;
|
|
780
|
+
/** Periodic time-frame to reset the usage counter. You may use NO_PERIOD if counter shouldn't be reset. */
|
|
781
|
+
period?: FeaturePeriod;
|
|
782
|
+
/** Usage measurement units (seconds? MBs? unitless?). Usage reported will be counted in multiples of this basic unit. */
|
|
783
|
+
units?: string | null;
|
|
784
|
+
}
|
|
785
|
+
/** Determines the reset cycle of the feature usage. */
|
|
786
|
+
export declare enum FeaturePeriod {
|
|
787
|
+
NO_PERIOD = "NO_PERIOD",
|
|
788
|
+
MILLISECOND = "MILLISECOND",
|
|
789
|
+
SECOND = "SECOND",
|
|
790
|
+
MINUTE = "MINUTE",
|
|
791
|
+
HOUR = "HOUR",
|
|
792
|
+
DAY = "DAY",
|
|
793
|
+
WEEK = "WEEK",
|
|
794
|
+
MONTH = "MONTH",
|
|
795
|
+
YEAR = "YEAR"
|
|
796
|
+
}
|
|
797
|
+
export interface QuotaInfo {
|
|
798
|
+
/**
|
|
799
|
+
* How often the customer is allowed to use the feature during the specified
|
|
800
|
+
* period. `null` means that the customer has unlimited access to the feature.
|
|
801
|
+
*/
|
|
802
|
+
limit?: string | null;
|
|
803
|
+
/**
|
|
804
|
+
* Time frame for the usage limitation. `NO_PERIOD` means that `remainingUsage`
|
|
805
|
+
* isn't automatically reset to the feature's `limit` after a specific period.
|
|
806
|
+
* You may still manually call
|
|
807
|
+
* [Reset Usage Counter](https://bo.wix.com/wix-docs/rest/premium/premium-features-manager/reset-usage-counter).
|
|
808
|
+
*/
|
|
809
|
+
period?: FeaturePeriod;
|
|
810
|
+
/**
|
|
811
|
+
* How often the customer has used the feature during the current
|
|
812
|
+
* period.
|
|
813
|
+
*/
|
|
814
|
+
currentUsage?: string;
|
|
815
|
+
/**
|
|
816
|
+
* How often the customer can still use the feature during the current
|
|
817
|
+
* period. `null` means that the customer has unlimited access to the feature.
|
|
818
|
+
*/
|
|
819
|
+
remainingUsage?: string | null;
|
|
820
|
+
overrideSettings?: OverrideSettings;
|
|
821
|
+
}
|
|
822
|
+
export interface OverrideSettings {
|
|
823
|
+
limit?: string | null;
|
|
824
|
+
}
|
|
825
|
+
/** Subscription transferred from another account, features on the current account were enabled. */
|
|
826
|
+
export interface TransferredFromAnotherAccountReason {
|
|
827
|
+
/** Information about a transfer from another account. */
|
|
828
|
+
transferredFromAccount?: string;
|
|
829
|
+
}
|
|
830
|
+
/** Subscription moved from one site to another in the same account, features enabled on the target site */
|
|
831
|
+
export interface ReassignedFromSiteReason {
|
|
832
|
+
/** Information about a transfer from another site. */
|
|
833
|
+
reassignedFromMetasite?: string;
|
|
834
|
+
}
|
|
835
|
+
/** Subscription was floating and assigned to site, features enabled on the target site */
|
|
836
|
+
export interface AssignedFromFloatingReason {
|
|
837
|
+
}
|
|
838
|
+
/** New subscription created and features created as enabled */
|
|
839
|
+
export interface NewFeatureReason {
|
|
840
|
+
}
|
|
841
|
+
/** Subscription was upgraded or downgraded, as a result new features enabled, missing features disabled , quantities are updated */
|
|
842
|
+
export interface ContractSwitchedReason {
|
|
843
|
+
}
|
|
844
|
+
/** a call to CreateFeature in features-writer, creates feature that is not attached to subscription */
|
|
845
|
+
export interface ManualFeatureCreationReason {
|
|
846
|
+
}
|
|
847
|
+
/** Subscription created due to migration from old premium model */
|
|
848
|
+
export interface MigratedFromLegacyReason {
|
|
849
|
+
}
|
|
850
|
+
/** Feature disabled and can be enabled in the future */
|
|
851
|
+
export interface FeatureDisabled extends FeatureDisabledReasonOneOf {
|
|
852
|
+
/** Information about a feature that's no longer assigned to a site. */
|
|
853
|
+
unassingedToFloating?: UnAssingedToFloatingReason;
|
|
854
|
+
/**
|
|
855
|
+
* Information about a feature that's been replaced by a feature from a
|
|
856
|
+
* different subscription.
|
|
857
|
+
*/
|
|
858
|
+
replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;
|
|
859
|
+
/**
|
|
860
|
+
* Information about a feature that's been reassigned to a different
|
|
861
|
+
* site.
|
|
862
|
+
*/
|
|
863
|
+
reassignedToAnotherSite?: ReassignedToAnotherSiteReason;
|
|
864
|
+
/**
|
|
865
|
+
* Disabled feature. Includes information about the feature's new state,
|
|
866
|
+
* possibly its new context.
|
|
867
|
+
*/
|
|
868
|
+
feature?: Feature;
|
|
869
|
+
/** ID of the meta site for which the feature has been disabled. */
|
|
870
|
+
metaSiteId?: string | null;
|
|
871
|
+
}
|
|
872
|
+
/** @oneof */
|
|
873
|
+
export interface FeatureDisabledReasonOneOf {
|
|
874
|
+
/** Information about a feature that's no longer assigned to a site. */
|
|
875
|
+
unassingedToFloating?: UnAssingedToFloatingReason;
|
|
876
|
+
/**
|
|
877
|
+
* Information about a feature that's been replaced by a feature from a
|
|
878
|
+
* different subscription.
|
|
879
|
+
*/
|
|
880
|
+
replacedByAnotherSubscription?: ReplacedByAnotherSubscriptionReason;
|
|
881
|
+
/**
|
|
882
|
+
* Information about a feature that's been reassigned to a different
|
|
883
|
+
* site.
|
|
884
|
+
*/
|
|
885
|
+
reassignedToAnotherSite?: ReassignedToAnotherSiteReason;
|
|
886
|
+
}
|
|
887
|
+
/** Subscription was unassigned from the site and moved into floating state */
|
|
888
|
+
export interface UnAssingedToFloatingReason {
|
|
889
|
+
}
|
|
890
|
+
/** Another subscription was assigned to the site, causing existing features on this site to be disabled */
|
|
891
|
+
export interface ReplacedByAnotherSubscriptionReason {
|
|
892
|
+
}
|
|
893
|
+
/** Subscription was assigned to another site, causing features on the origin site to be disabled. */
|
|
894
|
+
export interface ReassignedToAnotherSiteReason {
|
|
895
|
+
/** Information about a transfer to the site. */
|
|
896
|
+
reassignedToMetasite?: string;
|
|
897
|
+
}
|
|
898
|
+
/** Feature updated, for example Quota was increased due to upgrade */
|
|
899
|
+
export interface FeatureUpdated extends FeatureUpdatedPreviousQuantityInfoOneOf, FeatureUpdatedReasonOneOf {
|
|
900
|
+
/** Information about a feature that doesn't have a usage quota. */
|
|
901
|
+
booleanFeature?: BooleanFeature;
|
|
902
|
+
/** Information about a feature that has a usage quota. */
|
|
903
|
+
quotaFeature?: QuotaFeature;
|
|
904
|
+
/** Information about the contract switch. */
|
|
905
|
+
contractSwitched?: ContractSwitchedReason;
|
|
906
|
+
/**
|
|
907
|
+
* Updated feature. Includes information about the feature's new state and
|
|
908
|
+
* possibly its new context.
|
|
909
|
+
*/
|
|
910
|
+
feature?: Feature;
|
|
911
|
+
}
|
|
912
|
+
/** @oneof */
|
|
913
|
+
export interface FeatureUpdatedPreviousQuantityInfoOneOf {
|
|
914
|
+
/** Information about a feature that doesn't have a usage quota. */
|
|
915
|
+
booleanFeature?: BooleanFeature;
|
|
916
|
+
/** Information about a feature that has a usage quota. */
|
|
917
|
+
quotaFeature?: QuotaFeature;
|
|
918
|
+
}
|
|
919
|
+
/** @oneof */
|
|
920
|
+
export interface FeatureUpdatedReasonOneOf {
|
|
921
|
+
/** Information about the contract switch. */
|
|
922
|
+
contractSwitched?: ContractSwitchedReason;
|
|
923
|
+
}
|
|
924
|
+
/** Feature was permanently cancelled */
|
|
925
|
+
export interface FeatureCancelled extends FeatureCancelledReasonOneOf {
|
|
926
|
+
/** Information about a transfer to the account. */
|
|
927
|
+
transferredToAnotherAccount?: TransferredToAnotherAccountReason;
|
|
928
|
+
/** Information about the contract switch. */
|
|
929
|
+
contractSwitched?: ContractSwitchedReason;
|
|
930
|
+
/** Information about the feature cancellation. */
|
|
931
|
+
cancelRequest?: CancelRequestedReason;
|
|
932
|
+
/** Canceled feature. */
|
|
933
|
+
feature?: Feature;
|
|
934
|
+
/**
|
|
935
|
+
* Information about a transfer to the account.
|
|
936
|
+
* __Deprecated__. Use `reason.transferred_to_account` instead.
|
|
937
|
+
*/
|
|
938
|
+
transferredToAccount?: string | null;
|
|
939
|
+
}
|
|
940
|
+
/** @oneof */
|
|
941
|
+
export interface FeatureCancelledReasonOneOf {
|
|
942
|
+
/** Information about a transfer to the account. */
|
|
943
|
+
transferredToAnotherAccount?: TransferredToAnotherAccountReason;
|
|
944
|
+
/** Information about the contract switch. */
|
|
945
|
+
contractSwitched?: ContractSwitchedReason;
|
|
946
|
+
/** Information about the feature cancellation. */
|
|
947
|
+
cancelRequest?: CancelRequestedReason;
|
|
948
|
+
}
|
|
949
|
+
/** Subscription was transferred to another account, features in the origin account were cancelled */
|
|
950
|
+
export interface TransferredToAnotherAccountReason {
|
|
951
|
+
/** Information about a transfer to the account. */
|
|
952
|
+
transferredToAccount?: string;
|
|
953
|
+
}
|
|
954
|
+
/** Cancellation was requested from the subscription manager api, might be a result of billing event, or direct call */
|
|
955
|
+
export interface CancelRequestedReason {
|
|
956
|
+
}
|
|
957
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
958
|
+
createdEvent?: EntityCreatedEvent;
|
|
959
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
960
|
+
deletedEvent?: EntityDeletedEvent;
|
|
961
|
+
actionEvent?: ActionEvent;
|
|
962
|
+
/**
|
|
963
|
+
* Unique event ID.
|
|
964
|
+
* Allows clients to ignore duplicate webhooks.
|
|
965
|
+
*/
|
|
966
|
+
_id?: string;
|
|
967
|
+
/**
|
|
968
|
+
* Assumes actions are also always typed to an entity_type
|
|
969
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
970
|
+
*/
|
|
971
|
+
entityFqdn?: string;
|
|
972
|
+
/**
|
|
973
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
974
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
975
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
976
|
+
*/
|
|
977
|
+
slug?: string;
|
|
978
|
+
/** ID of the entity associated with the event. */
|
|
979
|
+
entityId?: string;
|
|
980
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
981
|
+
eventTime?: Date | null;
|
|
982
|
+
/**
|
|
983
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
984
|
+
* (for example, GDPR).
|
|
985
|
+
*/
|
|
986
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
987
|
+
/** If present, indicates the action that triggered the event. */
|
|
988
|
+
originatedFrom?: string | null;
|
|
989
|
+
/**
|
|
990
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
991
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
992
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
993
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
994
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
995
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
996
|
+
*/
|
|
997
|
+
entityEventSequence?: string | null;
|
|
998
|
+
}
|
|
999
|
+
/** @oneof */
|
|
1000
|
+
export interface DomainEventBodyOneOf {
|
|
1001
|
+
createdEvent?: EntityCreatedEvent;
|
|
1002
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
1003
|
+
deletedEvent?: EntityDeletedEvent;
|
|
1004
|
+
actionEvent?: ActionEvent;
|
|
1005
|
+
}
|
|
1006
|
+
export interface EntityCreatedEvent {
|
|
1007
|
+
entity?: string;
|
|
1008
|
+
}
|
|
1009
|
+
export interface RestoreInfo {
|
|
1010
|
+
deletedDate?: Date | null;
|
|
1011
|
+
}
|
|
1012
|
+
export interface EntityUpdatedEvent {
|
|
1013
|
+
/**
|
|
1014
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1015
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
1016
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
1017
|
+
*/
|
|
1018
|
+
currentEntity?: string;
|
|
1019
|
+
}
|
|
1020
|
+
export interface EntityDeletedEvent {
|
|
1021
|
+
/** Entity that was deleted */
|
|
1022
|
+
deletedEntity?: string | null;
|
|
1023
|
+
}
|
|
1024
|
+
export interface ActionEvent {
|
|
1025
|
+
body?: string;
|
|
1026
|
+
}
|
|
1027
|
+
export interface MessageEnvelope {
|
|
1028
|
+
/** App instance ID. */
|
|
1029
|
+
instanceId?: string | null;
|
|
1030
|
+
/** Event type. */
|
|
1031
|
+
eventType?: string;
|
|
1032
|
+
/** The identification type and identity data. */
|
|
1033
|
+
identity?: IdentificationData;
|
|
1034
|
+
/** Stringify payload. */
|
|
1035
|
+
data?: string;
|
|
1036
|
+
}
|
|
1037
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1038
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1039
|
+
anonymousVisitorId?: string;
|
|
1040
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1041
|
+
memberId?: string;
|
|
1042
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1043
|
+
wixUserId?: string;
|
|
1044
|
+
/** ID of an app. */
|
|
1045
|
+
appId?: string;
|
|
1046
|
+
/** @readonly */
|
|
1047
|
+
identityType?: WebhookIdentityType;
|
|
1048
|
+
}
|
|
1049
|
+
/** @oneof */
|
|
1050
|
+
export interface IdentificationDataIdOneOf {
|
|
1051
|
+
/** ID of a site visitor that has not logged in to the site. */
|
|
1052
|
+
anonymousVisitorId?: string;
|
|
1053
|
+
/** ID of a site visitor that has logged in to the site. */
|
|
1054
|
+
memberId?: string;
|
|
1055
|
+
/** ID of a Wix user (site owner, contributor, etc.). */
|
|
1056
|
+
wixUserId?: string;
|
|
1057
|
+
/** ID of an app. */
|
|
1058
|
+
appId?: string;
|
|
1059
|
+
}
|
|
1060
|
+
export declare enum WebhookIdentityType {
|
|
1061
|
+
UNKNOWN = "UNKNOWN",
|
|
1062
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1063
|
+
MEMBER = "MEMBER",
|
|
1064
|
+
WIX_USER = "WIX_USER",
|
|
1065
|
+
APP = "APP"
|
|
1066
|
+
}
|
|
1067
|
+
interface PointDefinitionNonNullableFields {
|
|
1068
|
+
icon: string;
|
|
1069
|
+
}
|
|
1070
|
+
interface PointsExpirationNonNullableFields {
|
|
1071
|
+
status: Status;
|
|
1072
|
+
monthsOfInactivity: number;
|
|
1073
|
+
expiringPointsPercentage: number;
|
|
1074
|
+
}
|
|
1075
|
+
interface PremiumFeaturesNonNullableFields {
|
|
1076
|
+
loyaltyProgram: boolean;
|
|
1077
|
+
tiers: boolean;
|
|
1078
|
+
pointsExpiration: boolean;
|
|
1079
|
+
}
|
|
1080
|
+
interface SocialMediaChannelNonNullableFields {
|
|
1081
|
+
type: Type;
|
|
1082
|
+
enabled: boolean;
|
|
1083
|
+
_id: string;
|
|
1084
|
+
}
|
|
1085
|
+
interface SocialMediaSettingsNonNullableFields {
|
|
1086
|
+
channels: SocialMediaChannelNonNullableFields[];
|
|
1087
|
+
}
|
|
1088
|
+
interface LoyaltyProgramNonNullableFields {
|
|
1089
|
+
pointDefinition?: PointDefinitionNonNullableFields;
|
|
1090
|
+
status: ProgramStatus;
|
|
1091
|
+
pointsExpiration?: PointsExpirationNonNullableFields;
|
|
1092
|
+
premiumFeatures?: PremiumFeaturesNonNullableFields;
|
|
1093
|
+
socialMediaSettings?: SocialMediaSettingsNonNullableFields;
|
|
1094
|
+
}
|
|
1095
|
+
export interface GetLoyaltyProgramResponseNonNullableFields {
|
|
1096
|
+
loyaltyProgram?: LoyaltyProgramNonNullableFields;
|
|
1097
|
+
}
|
|
1098
|
+
interface ProgramInSiteNonNullableFields {
|
|
1099
|
+
metaSiteId: string;
|
|
1100
|
+
loyaltyProgram?: LoyaltyProgramNonNullableFields;
|
|
1101
|
+
}
|
|
1102
|
+
export interface BulkGetLoyaltyProgramResponseNonNullableFields {
|
|
1103
|
+
programInSites: ProgramInSiteNonNullableFields[];
|
|
1104
|
+
}
|
|
1105
|
+
export interface UpdateLoyaltyProgramResponseNonNullableFields {
|
|
1106
|
+
loyaltyProgram?: LoyaltyProgramNonNullableFields;
|
|
1107
|
+
}
|
|
1108
|
+
export interface ActivateLoyaltyProgramResponseNonNullableFields {
|
|
1109
|
+
loyaltyProgram?: LoyaltyProgramNonNullableFields;
|
|
1110
|
+
}
|
|
1111
|
+
export interface PauseLoyaltyProgramResponseNonNullableFields {
|
|
1112
|
+
loyaltyProgram?: LoyaltyProgramNonNullableFields;
|
|
1113
|
+
}
|
|
1114
|
+
export interface GetLoyaltyProgramPremiumFeaturesResponseNonNullableFields {
|
|
1115
|
+
loyaltyProgram: boolean;
|
|
1116
|
+
tiers: boolean;
|
|
1117
|
+
pointsExpiration: boolean;
|
|
1118
|
+
}
|
|
1119
|
+
export interface EnablePointsExpirationResponseNonNullableFields {
|
|
1120
|
+
loyaltyProgram?: LoyaltyProgramNonNullableFields;
|
|
1121
|
+
}
|
|
1122
|
+
export interface DisablePointsExpirationResponseNonNullableFields {
|
|
1123
|
+
loyaltyProgram?: LoyaltyProgramNonNullableFields;
|
|
1124
|
+
}
|
|
1125
|
+
export interface BaseEventMetadata {
|
|
1126
|
+
/** App instance ID. */
|
|
1127
|
+
instanceId?: string | null;
|
|
1128
|
+
/** Event type. */
|
|
1129
|
+
eventType?: string;
|
|
1130
|
+
/** The identification type and identity data. */
|
|
1131
|
+
identity?: IdentificationData;
|
|
1132
|
+
}
|
|
1133
|
+
export interface EventMetadata extends BaseEventMetadata {
|
|
1134
|
+
/**
|
|
1135
|
+
* Unique event ID.
|
|
1136
|
+
* Allows clients to ignore duplicate webhooks.
|
|
1137
|
+
*/
|
|
1138
|
+
_id?: string;
|
|
1139
|
+
/**
|
|
1140
|
+
* Assumes actions are also always typed to an entity_type
|
|
1141
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
1142
|
+
*/
|
|
1143
|
+
entityFqdn?: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
1146
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
1147
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
1148
|
+
*/
|
|
1149
|
+
slug?: string;
|
|
1150
|
+
/** ID of the entity associated with the event. */
|
|
1151
|
+
entityId?: string;
|
|
1152
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
1153
|
+
eventTime?: Date | null;
|
|
1154
|
+
/**
|
|
1155
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
1156
|
+
* (for example, GDPR).
|
|
1157
|
+
*/
|
|
1158
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
1159
|
+
/** If present, indicates the action that triggered the event. */
|
|
1160
|
+
originatedFrom?: string | null;
|
|
1161
|
+
/**
|
|
1162
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
1163
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
1164
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
1165
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
1166
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
1167
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
1168
|
+
*/
|
|
1169
|
+
entityEventSequence?: string | null;
|
|
1170
|
+
}
|
|
1171
|
+
export interface ProgramUpdatedEnvelope {
|
|
1172
|
+
entity: LoyaltyProgram;
|
|
1173
|
+
metadata: EventMetadata;
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* Triggered when a loyalty program is updated.
|
|
1177
|
+
* @permissionScope Read Loyalty
|
|
1178
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1179
|
+
* @permissionScope Manage Loyalty
|
|
1180
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1181
|
+
* @permissionId LOYALTY.READ_PROGRAM
|
|
1182
|
+
* @webhook
|
|
1183
|
+
* @eventType wix.loyalty.v1.program_updated
|
|
1184
|
+
*/
|
|
1185
|
+
export declare function onProgramUpdated(handler: (event: ProgramUpdatedEnvelope) => void | Promise<void>): void;
|
|
1186
|
+
/**
|
|
1187
|
+
* Retrieves the site's loyalty program.
|
|
1188
|
+
*
|
|
1189
|
+
* The `getLoyaltyProgram()` function returns a Promise that resolves to the site's loyalty program.
|
|
1190
|
+
* @public
|
|
1191
|
+
* @permissionId LOYALTY.READ_PROGRAM
|
|
1192
|
+
* @permissionScope Read Loyalty
|
|
1193
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1194
|
+
* @permissionScope Manage Loyalty
|
|
1195
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1196
|
+
* @applicableIdentity APP
|
|
1197
|
+
* @applicableIdentity VISITOR
|
|
1198
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgram
|
|
1199
|
+
*/
|
|
1200
|
+
export declare function getLoyaltyProgram(): Promise<GetLoyaltyProgramResponse & GetLoyaltyProgramResponseNonNullableFields>;
|
|
1201
|
+
/**
|
|
1202
|
+
* Retrieves loyalty programs for all metasites that the caller is a member of.
|
|
1203
|
+
*
|
|
1204
|
+
* Must be called with user identity.
|
|
1205
|
+
* @public
|
|
1206
|
+
* @documentationMaturity preview
|
|
1207
|
+
* @permissionId LOYALTY.PROGRAM_BULK_READ
|
|
1208
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.BulkGetLoyaltyProgram
|
|
1209
|
+
*/
|
|
1210
|
+
export declare function bulkGetLoyaltyProgram(): Promise<BulkGetLoyaltyProgramResponse & BulkGetLoyaltyProgramResponseNonNullableFields>;
|
|
1211
|
+
/**
|
|
1212
|
+
* Updates the site's loyalty program.
|
|
1213
|
+
*
|
|
1214
|
+
* The `updateLoyaltyProgram()` function returns a Promise that resolves when the loyalty program is updated.
|
|
1215
|
+
*
|
|
1216
|
+
* With the `updateLoyaltyProgram()` function you can update the name of the loyalty program and the details of the collectible points unit. To activate the loyalty program use the [`activateLoyaltyProgram()`](wix-loyalty-v2/programs/activateloyaltyprogram) function.
|
|
1217
|
+
*
|
|
1218
|
+
* >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can update a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.
|
|
1219
|
+
* @param loyaltyProgram - Loyalty program fields to update.
|
|
1220
|
+
* @public
|
|
1221
|
+
* @requiredField loyaltyProgram
|
|
1222
|
+
* @permissionId LOYALTY.MANAGE_PROGRAM
|
|
1223
|
+
* @permissionScope Manage Loyalty
|
|
1224
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1225
|
+
* @applicableIdentity APP
|
|
1226
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.UpdateLoyaltyProgram
|
|
1227
|
+
*/
|
|
1228
|
+
export declare function updateLoyaltyProgram(loyaltyProgram: LoyaltyProgram): Promise<UpdateLoyaltyProgramResponse & UpdateLoyaltyProgramResponseNonNullableFields>;
|
|
1229
|
+
/**
|
|
1230
|
+
* Activates a loyalty program.
|
|
1231
|
+
*
|
|
1232
|
+
* The `activateLoyaltyProgram()` function returns a Promise that resolves when the status of the loyalty program is successfully changed to `"ACTIVE"`.
|
|
1233
|
+
*
|
|
1234
|
+
* Before you begin, a Wix Loyalty Program must first be installed through your [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/) or through the [Wix App Market](https://www.wix.com/app-market/loyalty). Initially when a loyalty program is installed, the status is set to `"DRAFT"`. You can change the program's status to `"ACTIVE"` with this function or through your [dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Select%20Site&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https:%2F%2Fwww.wix.com%2Fdashboard%2F%7B%7BmetaSiteId%7D%7D%2Floyalty-accounts/wizard/). A site's customers can only earn or redeem points while the program status is `"ACTIVE"`.
|
|
1235
|
+
*
|
|
1236
|
+
* This function updates only the status of a loyalty program, to make other updates to the program, use the [`updateLoyaltyProgram()`](wix-loyalty-v2/programs/updateloyaltyprogram) function.
|
|
1237
|
+
*
|
|
1238
|
+
* To temporarily pause your loyalty program you must follow three steps:
|
|
1239
|
+
* 1. Remove all [`earnPoints()`](wix-loyalty-v2/accounts/earnpoints) functions and switch off all the "Earn Points" and "Rewards" toggles in the [Loyalty Program dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Open%20Loyalty%20Program&title=Select%20a%20Site&autoSelectOnSingleSite=true&actionUrl=https://www.wix.com/dashboard/{{metaSiteId}}/loyalty-accounts/).
|
|
1240
|
+
* 1. Hide the loyalty page from your site.
|
|
1241
|
+
* 1. Delete the My Rewards page from the Member pages.
|
|
1242
|
+
* See [Pausing Your Loyalty Program](https://support.wix.com/en/article/wix-loyalty-program-pausing-your-loyalty-program) for more information.
|
|
1243
|
+
*
|
|
1244
|
+
* >**Note:** Only visitors with **Manage Loyalty** [permissions](https://support.wix.com/en/article/roles-permissions-accessing-roles-permissions) can activate a loyalty program. You can override the permissions with the `wix-auth` [`elevate()`](wix-auth/elevate) function.
|
|
1245
|
+
* @public
|
|
1246
|
+
* @permissionId LOYALTY.MANAGE_PROGRAM
|
|
1247
|
+
* @permissionScope Manage Loyalty
|
|
1248
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1249
|
+
* @applicableIdentity APP
|
|
1250
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.ActivateLoyaltyProgram
|
|
1251
|
+
*/
|
|
1252
|
+
export declare function activateLoyaltyProgram(): Promise<ActivateLoyaltyProgramResponse & ActivateLoyaltyProgramResponseNonNullableFields>;
|
|
1253
|
+
/**
|
|
1254
|
+
* Changes the program status to `PAUSED`.
|
|
1255
|
+
* @public
|
|
1256
|
+
* @permissionId LOYALTY.MANAGE_PROGRAM
|
|
1257
|
+
* @permissionScope Manage Loyalty
|
|
1258
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1259
|
+
* @applicableIdentity APP
|
|
1260
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.PauseLoyaltyProgram
|
|
1261
|
+
*/
|
|
1262
|
+
export declare function pauseLoyaltyProgram(): Promise<PauseLoyaltyProgramResponse & PauseLoyaltyProgramResponseNonNullableFields>;
|
|
1263
|
+
/**
|
|
1264
|
+
* Retrieves information about the available loyalty program premium features.
|
|
1265
|
+
* @public
|
|
1266
|
+
* @permissionId LOYALTY.READ_PROGRAM
|
|
1267
|
+
* @permissionScope Read Loyalty
|
|
1268
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.READ-LOYALTY
|
|
1269
|
+
* @permissionScope Manage Loyalty
|
|
1270
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1271
|
+
* @applicableIdentity APP
|
|
1272
|
+
* @applicableIdentity VISITOR
|
|
1273
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.GetLoyaltyProgramPremiumFeatures
|
|
1274
|
+
*/
|
|
1275
|
+
export declare function getLoyaltyProgramPremiumFeatures(): Promise<GetLoyaltyProgramPremiumFeaturesResponse & GetLoyaltyProgramPremiumFeaturesResponseNonNullableFields>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Updates the `pointsExpiration` status to `ENABLED`.
|
|
1278
|
+
* @public
|
|
1279
|
+
* @permissionId LOYALTY.MANAGE_PROGRAM
|
|
1280
|
+
* @permissionScope Manage Loyalty
|
|
1281
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1282
|
+
* @applicableIdentity APP
|
|
1283
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.EnablePointsExpiration
|
|
1284
|
+
*/
|
|
1285
|
+
export declare function enablePointsExpiration(): Promise<EnablePointsExpirationResponse & EnablePointsExpirationResponseNonNullableFields>;
|
|
1286
|
+
/**
|
|
1287
|
+
* Updates the `pointsExpiration` status to `DISABLED`.
|
|
1288
|
+
* @public
|
|
1289
|
+
* @permissionId LOYALTY.MANAGE_PROGRAM
|
|
1290
|
+
* @permissionScope Manage Loyalty
|
|
1291
|
+
* @permissionScopeId SCOPE.DC-LOYALTY.MANAGE-LOYALTY
|
|
1292
|
+
* @applicableIdentity APP
|
|
1293
|
+
* @fqn com.wixpress.loyalty.program.LoyaltyPrograms.DisablePointsExpiration
|
|
1294
|
+
*/
|
|
1295
|
+
export declare function disablePointsExpiration(): Promise<DisablePointsExpirationResponse & DisablePointsExpirationResponseNonNullableFields>;
|
|
1296
|
+
export {};
|