@wix/auto_sdk_loyalty_programs 1.0.20 → 1.0.21
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/index.d.mts +101 -0
- package/build/index.d.ts +101 -0
- package/build/index.js +874 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +833 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/index.d.mts +101 -0
- package/build/internal/index.d.ts +101 -0
- package/build/internal/index.js +874 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +833 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{cjs/src/loyalty-v1-program-programs.types.d.ts → internal/loyalty-v1-program-programs.universal-CEkDSoxz.d.mts} +180 -155
- package/build/internal/{cjs/src/loyalty-v1-program-programs.types.d.ts → loyalty-v1-program-programs.universal-CEkDSoxz.d.ts} +180 -155
- package/build/internal/meta.d.mts +230 -0
- package/build/internal/meta.d.ts +230 -0
- package/build/internal/meta.js +557 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +523 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{internal/es/src/loyalty-v1-program-programs.types.d.ts → loyalty-v1-program-programs.universal-CEkDSoxz.d.mts} +180 -155
- package/build/{es/src/loyalty-v1-program-programs.types.d.ts → loyalty-v1-program-programs.universal-CEkDSoxz.d.ts} +180 -155
- package/build/meta.d.mts +230 -0
- package/build/meta.d.ts +230 -0
- package/build/meta.js +557 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +523 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -1
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-program-programs.context.d.ts +0 -18
- package/build/cjs/src/loyalty-v1-program-programs.context.js +0 -30
- package/build/cjs/src/loyalty-v1-program-programs.context.js.map +0 -1
- package/build/cjs/src/loyalty-v1-program-programs.http.d.ts +0 -49
- package/build/cjs/src/loyalty-v1-program-programs.http.js +0 -417
- package/build/cjs/src/loyalty-v1-program-programs.http.js.map +0 -1
- package/build/cjs/src/loyalty-v1-program-programs.meta.d.ts +0 -20
- package/build/cjs/src/loyalty-v1-program-programs.meta.js +0 -180
- package/build/cjs/src/loyalty-v1-program-programs.meta.js.map +0 -1
- package/build/cjs/src/loyalty-v1-program-programs.public.d.ts +0 -88
- package/build/cjs/src/loyalty-v1-program-programs.public.js +0 -83
- package/build/cjs/src/loyalty-v1-program-programs.public.js.map +0 -1
- package/build/cjs/src/loyalty-v1-program-programs.types.js +0 -174
- package/build/cjs/src/loyalty-v1-program-programs.types.js.map +0 -1
- package/build/cjs/src/loyalty-v1-program-programs.universal.d.ts +0 -1510
- package/build/cjs/src/loyalty-v1-program-programs.universal.js +0 -537
- package/build/cjs/src/loyalty-v1-program-programs.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -1
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/package.json +0 -3
- package/build/es/src/loyalty-v1-program-programs.context.d.ts +0 -18
- package/build/es/src/loyalty-v1-program-programs.context.js +0 -18
- package/build/es/src/loyalty-v1-program-programs.context.js.map +0 -1
- package/build/es/src/loyalty-v1-program-programs.http.d.ts +0 -49
- package/build/es/src/loyalty-v1-program-programs.http.js +0 -406
- package/build/es/src/loyalty-v1-program-programs.http.js.map +0 -1
- package/build/es/src/loyalty-v1-program-programs.meta.d.ts +0 -20
- package/build/es/src/loyalty-v1-program-programs.meta.js +0 -146
- package/build/es/src/loyalty-v1-program-programs.meta.js.map +0 -1
- package/build/es/src/loyalty-v1-program-programs.public.d.ts +0 -88
- package/build/es/src/loyalty-v1-program-programs.public.js +0 -63
- package/build/es/src/loyalty-v1-program-programs.public.js.map +0 -1
- package/build/es/src/loyalty-v1-program-programs.types.js +0 -171
- package/build/es/src/loyalty-v1-program-programs.types.js.map +0 -1
- package/build/es/src/loyalty-v1-program-programs.universal.d.ts +0 -1510
- package/build/es/src/loyalty-v1-program-programs.universal.js +0 -503
- package/build/es/src/loyalty-v1-program-programs.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -1
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-program-programs.context.d.ts +0 -18
- package/build/internal/cjs/src/loyalty-v1-program-programs.context.js +0 -30
- package/build/internal/cjs/src/loyalty-v1-program-programs.context.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-program-programs.http.d.ts +0 -49
- package/build/internal/cjs/src/loyalty-v1-program-programs.http.js +0 -417
- package/build/internal/cjs/src/loyalty-v1-program-programs.http.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-program-programs.meta.d.ts +0 -20
- package/build/internal/cjs/src/loyalty-v1-program-programs.meta.js +0 -180
- package/build/internal/cjs/src/loyalty-v1-program-programs.meta.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-program-programs.public.d.ts +0 -88
- package/build/internal/cjs/src/loyalty-v1-program-programs.public.js +0 -83
- package/build/internal/cjs/src/loyalty-v1-program-programs.public.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-program-programs.types.js +0 -174
- package/build/internal/cjs/src/loyalty-v1-program-programs.types.js.map +0 -1
- package/build/internal/cjs/src/loyalty-v1-program-programs.universal.d.ts +0 -1510
- package/build/internal/cjs/src/loyalty-v1-program-programs.universal.js +0 -537
- package/build/internal/cjs/src/loyalty-v1-program-programs.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -1
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-program-programs.context.d.ts +0 -18
- package/build/internal/es/src/loyalty-v1-program-programs.context.js +0 -18
- package/build/internal/es/src/loyalty-v1-program-programs.context.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-program-programs.http.d.ts +0 -49
- package/build/internal/es/src/loyalty-v1-program-programs.http.js +0 -406
- package/build/internal/es/src/loyalty-v1-program-programs.http.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-program-programs.meta.d.ts +0 -20
- package/build/internal/es/src/loyalty-v1-program-programs.meta.js +0 -146
- package/build/internal/es/src/loyalty-v1-program-programs.meta.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-program-programs.public.d.ts +0 -88
- package/build/internal/es/src/loyalty-v1-program-programs.public.js +0 -63
- package/build/internal/es/src/loyalty-v1-program-programs.public.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-program-programs.types.js +0 -171
- package/build/internal/es/src/loyalty-v1-program-programs.types.js.map +0 -1
- package/build/internal/es/src/loyalty-v1-program-programs.universal.d.ts +0 -1510
- package/build/internal/es/src/loyalty-v1-program-programs.universal.js +0 -503
- package/build/internal/es/src/loyalty-v1-program-programs.universal.js.map +0 -1
package/build/meta.d.mts
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { m as GetLoyaltyProgramRequest$1, G as GetLoyaltyProgramResponse$1, n as BulkGetLoyaltyProgramRequest$1, B as BulkGetLoyaltyProgramResponse$1, p as UpdateLoyaltyProgramRequest$1, U as UpdateLoyaltyProgramResponse$1, s as ActivateLoyaltyProgramRequest$1, A as ActivateLoyaltyProgramResponse$1, u as PauseLoyaltyProgramRequest$1, P as PauseLoyaltyProgramResponse$1, C as GetLoyaltyProgramPremiumFeaturesRequest$1, a as GetLoyaltyProgramPremiumFeaturesResponse$1, H as EnablePointsExpirationRequest$1, E as EnablePointsExpirationResponse$1, J as DisablePointsExpirationRequest$1, D as DisablePointsExpirationResponse$1 } from './loyalty-v1-program-programs.universal-CEkDSoxz.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A loyalty program allows sites to maintain customer reward accounts. Site owners can create a
|
|
5
|
+
* loyalty program to increase customer retention. Read more about the loyalty program in
|
|
6
|
+
* [this overview](https://support.wix.com/en/article/wix-loyalty-program-an-overview).
|
|
7
|
+
*/
|
|
8
|
+
interface LoyaltyProgram {
|
|
9
|
+
/**
|
|
10
|
+
* Program name.
|
|
11
|
+
* @minLength 2
|
|
12
|
+
* @maxLength 50
|
|
13
|
+
*/
|
|
14
|
+
name?: string | null;
|
|
15
|
+
/** Details about the program's collectible unit. */
|
|
16
|
+
pointDefinition?: PointDefinition;
|
|
17
|
+
/**
|
|
18
|
+
* Program status. Customers can only earn or redeem points while the program is `ACTIVE`.
|
|
19
|
+
*
|
|
20
|
+
* Default: `"DRAFT"`
|
|
21
|
+
* @readonly
|
|
22
|
+
*/
|
|
23
|
+
status?: ProgramStatusWithLiterals;
|
|
24
|
+
/**
|
|
25
|
+
* Date and time the program was created.
|
|
26
|
+
* @readonly
|
|
27
|
+
*/
|
|
28
|
+
createdDate?: Date | null;
|
|
29
|
+
/**
|
|
30
|
+
* Date and time the program was updated.
|
|
31
|
+
* @readonly
|
|
32
|
+
*/
|
|
33
|
+
updatedDate?: Date | null;
|
|
34
|
+
/** Configuration for the points expiration feature. */
|
|
35
|
+
pointsExpiration?: PointsExpiration;
|
|
36
|
+
/**
|
|
37
|
+
* Information about the available program premium features.
|
|
38
|
+
* @readonly
|
|
39
|
+
*/
|
|
40
|
+
premiumFeatures?: PremiumFeatures;
|
|
41
|
+
}
|
|
42
|
+
interface PointDefinition {
|
|
43
|
+
/**
|
|
44
|
+
* Display name for the program's collectible unit.
|
|
45
|
+
*
|
|
46
|
+
* It's recommended to use a plural, for example `Stars`.
|
|
47
|
+
*
|
|
48
|
+
* In contrast to a custom name, the default `"Points"` name is translated and adjusted to singular based on circumstances.
|
|
49
|
+
*
|
|
50
|
+
* Default: `Points`.
|
|
51
|
+
* @maxLength 20
|
|
52
|
+
*/
|
|
53
|
+
customName?: string | null;
|
|
54
|
+
/** Details about the points icon. */
|
|
55
|
+
icon?: Image;
|
|
56
|
+
}
|
|
57
|
+
interface Image {
|
|
58
|
+
/** WixMedia image ID. */
|
|
59
|
+
id?: string;
|
|
60
|
+
/** Image URL. */
|
|
61
|
+
url?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Original image height.
|
|
64
|
+
* @readonly
|
|
65
|
+
*/
|
|
66
|
+
height?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Original image width.
|
|
69
|
+
* @readonly
|
|
70
|
+
*/
|
|
71
|
+
width?: number;
|
|
72
|
+
/** Image alt text. */
|
|
73
|
+
altText?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Image filename.
|
|
76
|
+
* @readonly
|
|
77
|
+
*/
|
|
78
|
+
filename?: string | null;
|
|
79
|
+
}
|
|
80
|
+
declare enum ProgramStatus {
|
|
81
|
+
/** Unknown program status. */
|
|
82
|
+
UNKNOWN = "UNKNOWN",
|
|
83
|
+
/** Program was created but is not enabled yet. */
|
|
84
|
+
DRAFT = "DRAFT",
|
|
85
|
+
/** Program is active. */
|
|
86
|
+
ACTIVE = "ACTIVE",
|
|
87
|
+
/** Program was manually disabled by the user. This action can be reverted, meaning the user can set it to be active again. */
|
|
88
|
+
PAUSED = "PAUSED"
|
|
89
|
+
}
|
|
90
|
+
/** @enumType */
|
|
91
|
+
type ProgramStatusWithLiterals = ProgramStatus | 'UNKNOWN' | 'DRAFT' | 'ACTIVE' | 'PAUSED';
|
|
92
|
+
interface PointsExpiration {
|
|
93
|
+
/**
|
|
94
|
+
* Status of the points expiration feature.
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
status?: StatusWithLiterals;
|
|
98
|
+
/**
|
|
99
|
+
* How many months a member should be inactive to lose the collected points.
|
|
100
|
+
* @min 1
|
|
101
|
+
* @max 12
|
|
102
|
+
*/
|
|
103
|
+
monthsOfInactivity?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Percentage of points that a member loses after being inactive.
|
|
106
|
+
* @min 1
|
|
107
|
+
* @max 100
|
|
108
|
+
*/
|
|
109
|
+
expiringPointsPercentage?: number;
|
|
110
|
+
}
|
|
111
|
+
declare enum Status {
|
|
112
|
+
/** Unknown points expiration status. This value is not used. */
|
|
113
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
114
|
+
/** Points expiration feature is disabled. */
|
|
115
|
+
DISABLED = "DISABLED",
|
|
116
|
+
/** Points expiration feature is enabled. */
|
|
117
|
+
ENABLED = "ENABLED"
|
|
118
|
+
}
|
|
119
|
+
/** @enumType */
|
|
120
|
+
type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'DISABLED' | 'ENABLED';
|
|
121
|
+
interface PremiumFeatures {
|
|
122
|
+
/**
|
|
123
|
+
* Whether there are any loyalty program premium features.
|
|
124
|
+
* @readonly
|
|
125
|
+
*/
|
|
126
|
+
loyaltyProgram?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Whether this loyalty program includes tiers.
|
|
129
|
+
* @readonly
|
|
130
|
+
*/
|
|
131
|
+
tiers?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Whether this loyalty program includes point expiration.
|
|
134
|
+
* @readonly
|
|
135
|
+
*/
|
|
136
|
+
pointsExpiration?: boolean;
|
|
137
|
+
}
|
|
138
|
+
interface GetLoyaltyProgramRequest {
|
|
139
|
+
}
|
|
140
|
+
interface GetLoyaltyProgramResponse {
|
|
141
|
+
/** Retrieved loyalty program. */
|
|
142
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
143
|
+
}
|
|
144
|
+
interface BulkGetLoyaltyProgramRequest {
|
|
145
|
+
}
|
|
146
|
+
interface BulkGetLoyaltyProgramResponse {
|
|
147
|
+
/** Retrieved loyalty programs. */
|
|
148
|
+
programInSites?: ProgramInSite[];
|
|
149
|
+
}
|
|
150
|
+
interface ProgramInSite {
|
|
151
|
+
/**
|
|
152
|
+
* Metasite ID.
|
|
153
|
+
* @format GUID
|
|
154
|
+
*/
|
|
155
|
+
metaSiteId?: string;
|
|
156
|
+
/** Loyalty program. */
|
|
157
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
158
|
+
}
|
|
159
|
+
interface UpdateLoyaltyProgramRequest {
|
|
160
|
+
/** Loyalty program fields to update. */
|
|
161
|
+
loyaltyProgram: LoyaltyProgram;
|
|
162
|
+
}
|
|
163
|
+
interface UpdateLoyaltyProgramResponse {
|
|
164
|
+
/** Updated loyalty program. */
|
|
165
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
166
|
+
}
|
|
167
|
+
interface ActivateLoyaltyProgramRequest {
|
|
168
|
+
}
|
|
169
|
+
interface ActivateLoyaltyProgramResponse {
|
|
170
|
+
/** Activated loyalty program. */
|
|
171
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
172
|
+
}
|
|
173
|
+
interface PauseLoyaltyProgramRequest {
|
|
174
|
+
}
|
|
175
|
+
interface PauseLoyaltyProgramResponse {
|
|
176
|
+
/** Paused loyalty program. */
|
|
177
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
178
|
+
}
|
|
179
|
+
interface GetLoyaltyProgramPremiumFeaturesRequest {
|
|
180
|
+
}
|
|
181
|
+
interface GetLoyaltyProgramPremiumFeaturesResponse {
|
|
182
|
+
/**
|
|
183
|
+
* Whether there are any loyalty program premium features.
|
|
184
|
+
* @readonly
|
|
185
|
+
*/
|
|
186
|
+
loyaltyProgram?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Whether this loyalty program includes tiers.
|
|
189
|
+
* @readonly
|
|
190
|
+
*/
|
|
191
|
+
tiers?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Whether this loyalty program includes point expiration.
|
|
194
|
+
* @readonly
|
|
195
|
+
*/
|
|
196
|
+
pointsExpiration?: boolean;
|
|
197
|
+
}
|
|
198
|
+
interface EnablePointsExpirationRequest {
|
|
199
|
+
}
|
|
200
|
+
interface EnablePointsExpirationResponse {
|
|
201
|
+
/** Loyalty program with enabled points expiration feature. */
|
|
202
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
203
|
+
}
|
|
204
|
+
interface DisablePointsExpirationRequest {
|
|
205
|
+
}
|
|
206
|
+
interface DisablePointsExpirationResponse {
|
|
207
|
+
/** Loyalty program with disabled points expiration feature. */
|
|
208
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
212
|
+
getUrl: (context: any) => string;
|
|
213
|
+
httpMethod: K;
|
|
214
|
+
path: string;
|
|
215
|
+
pathParams: M;
|
|
216
|
+
__requestType: T;
|
|
217
|
+
__originalRequestType: S;
|
|
218
|
+
__responseType: Q;
|
|
219
|
+
__originalResponseType: R;
|
|
220
|
+
};
|
|
221
|
+
declare function getLoyaltyProgram(): __PublicMethodMetaInfo<'GET', {}, GetLoyaltyProgramRequest$1, GetLoyaltyProgramRequest, GetLoyaltyProgramResponse$1, GetLoyaltyProgramResponse>;
|
|
222
|
+
declare function bulkGetLoyaltyProgram(): __PublicMethodMetaInfo<'GET', {}, BulkGetLoyaltyProgramRequest$1, BulkGetLoyaltyProgramRequest, BulkGetLoyaltyProgramResponse$1, BulkGetLoyaltyProgramResponse>;
|
|
223
|
+
declare function updateLoyaltyProgram(): __PublicMethodMetaInfo<'PATCH', {}, UpdateLoyaltyProgramRequest$1, UpdateLoyaltyProgramRequest, UpdateLoyaltyProgramResponse$1, UpdateLoyaltyProgramResponse>;
|
|
224
|
+
declare function activateLoyaltyProgram(): __PublicMethodMetaInfo<'POST', {}, ActivateLoyaltyProgramRequest$1, ActivateLoyaltyProgramRequest, ActivateLoyaltyProgramResponse$1, ActivateLoyaltyProgramResponse>;
|
|
225
|
+
declare function pauseLoyaltyProgram(): __PublicMethodMetaInfo<'POST', {}, PauseLoyaltyProgramRequest$1, PauseLoyaltyProgramRequest, PauseLoyaltyProgramResponse$1, PauseLoyaltyProgramResponse>;
|
|
226
|
+
declare function getLoyaltyProgramPremiumFeatures(): __PublicMethodMetaInfo<'GET', {}, GetLoyaltyProgramPremiumFeaturesRequest$1, GetLoyaltyProgramPremiumFeaturesRequest, GetLoyaltyProgramPremiumFeaturesResponse$1, GetLoyaltyProgramPremiumFeaturesResponse>;
|
|
227
|
+
declare function enablePointsExpiration(): __PublicMethodMetaInfo<'POST', {}, EnablePointsExpirationRequest$1, EnablePointsExpirationRequest, EnablePointsExpirationResponse$1, EnablePointsExpirationResponse>;
|
|
228
|
+
declare function disablePointsExpiration(): __PublicMethodMetaInfo<'POST', {}, DisablePointsExpirationRequest$1, DisablePointsExpirationRequest, DisablePointsExpirationResponse$1, DisablePointsExpirationResponse>;
|
|
229
|
+
|
|
230
|
+
export { type __PublicMethodMetaInfo, activateLoyaltyProgram, bulkGetLoyaltyProgram, disablePointsExpiration, enablePointsExpiration, getLoyaltyProgram, getLoyaltyProgramPremiumFeatures, pauseLoyaltyProgram, updateLoyaltyProgram };
|
package/build/meta.d.ts
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { m as GetLoyaltyProgramRequest$1, G as GetLoyaltyProgramResponse$1, n as BulkGetLoyaltyProgramRequest$1, B as BulkGetLoyaltyProgramResponse$1, p as UpdateLoyaltyProgramRequest$1, U as UpdateLoyaltyProgramResponse$1, s as ActivateLoyaltyProgramRequest$1, A as ActivateLoyaltyProgramResponse$1, u as PauseLoyaltyProgramRequest$1, P as PauseLoyaltyProgramResponse$1, C as GetLoyaltyProgramPremiumFeaturesRequest$1, a as GetLoyaltyProgramPremiumFeaturesResponse$1, H as EnablePointsExpirationRequest$1, E as EnablePointsExpirationResponse$1, J as DisablePointsExpirationRequest$1, D as DisablePointsExpirationResponse$1 } from './loyalty-v1-program-programs.universal-CEkDSoxz.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A loyalty program allows sites to maintain customer reward accounts. Site owners can create a
|
|
5
|
+
* loyalty program to increase customer retention. Read more about the loyalty program in
|
|
6
|
+
* [this overview](https://support.wix.com/en/article/wix-loyalty-program-an-overview).
|
|
7
|
+
*/
|
|
8
|
+
interface LoyaltyProgram {
|
|
9
|
+
/**
|
|
10
|
+
* Program name.
|
|
11
|
+
* @minLength 2
|
|
12
|
+
* @maxLength 50
|
|
13
|
+
*/
|
|
14
|
+
name?: string | null;
|
|
15
|
+
/** Details about the program's collectible unit. */
|
|
16
|
+
pointDefinition?: PointDefinition;
|
|
17
|
+
/**
|
|
18
|
+
* Program status. Customers can only earn or redeem points while the program is `ACTIVE`.
|
|
19
|
+
*
|
|
20
|
+
* Default: `"DRAFT"`
|
|
21
|
+
* @readonly
|
|
22
|
+
*/
|
|
23
|
+
status?: ProgramStatusWithLiterals;
|
|
24
|
+
/**
|
|
25
|
+
* Date and time the program was created.
|
|
26
|
+
* @readonly
|
|
27
|
+
*/
|
|
28
|
+
createdDate?: Date | null;
|
|
29
|
+
/**
|
|
30
|
+
* Date and time the program was updated.
|
|
31
|
+
* @readonly
|
|
32
|
+
*/
|
|
33
|
+
updatedDate?: Date | null;
|
|
34
|
+
/** Configuration for the points expiration feature. */
|
|
35
|
+
pointsExpiration?: PointsExpiration;
|
|
36
|
+
/**
|
|
37
|
+
* Information about the available program premium features.
|
|
38
|
+
* @readonly
|
|
39
|
+
*/
|
|
40
|
+
premiumFeatures?: PremiumFeatures;
|
|
41
|
+
}
|
|
42
|
+
interface PointDefinition {
|
|
43
|
+
/**
|
|
44
|
+
* Display name for the program's collectible unit.
|
|
45
|
+
*
|
|
46
|
+
* It's recommended to use a plural, for example `Stars`.
|
|
47
|
+
*
|
|
48
|
+
* In contrast to a custom name, the default `"Points"` name is translated and adjusted to singular based on circumstances.
|
|
49
|
+
*
|
|
50
|
+
* Default: `Points`.
|
|
51
|
+
* @maxLength 20
|
|
52
|
+
*/
|
|
53
|
+
customName?: string | null;
|
|
54
|
+
/** Details about the points icon. */
|
|
55
|
+
icon?: Image;
|
|
56
|
+
}
|
|
57
|
+
interface Image {
|
|
58
|
+
/** WixMedia image ID. */
|
|
59
|
+
id?: string;
|
|
60
|
+
/** Image URL. */
|
|
61
|
+
url?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Original image height.
|
|
64
|
+
* @readonly
|
|
65
|
+
*/
|
|
66
|
+
height?: number;
|
|
67
|
+
/**
|
|
68
|
+
* Original image width.
|
|
69
|
+
* @readonly
|
|
70
|
+
*/
|
|
71
|
+
width?: number;
|
|
72
|
+
/** Image alt text. */
|
|
73
|
+
altText?: string | null;
|
|
74
|
+
/**
|
|
75
|
+
* Image filename.
|
|
76
|
+
* @readonly
|
|
77
|
+
*/
|
|
78
|
+
filename?: string | null;
|
|
79
|
+
}
|
|
80
|
+
declare enum ProgramStatus {
|
|
81
|
+
/** Unknown program status. */
|
|
82
|
+
UNKNOWN = "UNKNOWN",
|
|
83
|
+
/** Program was created but is not enabled yet. */
|
|
84
|
+
DRAFT = "DRAFT",
|
|
85
|
+
/** Program is active. */
|
|
86
|
+
ACTIVE = "ACTIVE",
|
|
87
|
+
/** Program was manually disabled by the user. This action can be reverted, meaning the user can set it to be active again. */
|
|
88
|
+
PAUSED = "PAUSED"
|
|
89
|
+
}
|
|
90
|
+
/** @enumType */
|
|
91
|
+
type ProgramStatusWithLiterals = ProgramStatus | 'UNKNOWN' | 'DRAFT' | 'ACTIVE' | 'PAUSED';
|
|
92
|
+
interface PointsExpiration {
|
|
93
|
+
/**
|
|
94
|
+
* Status of the points expiration feature.
|
|
95
|
+
* @readonly
|
|
96
|
+
*/
|
|
97
|
+
status?: StatusWithLiterals;
|
|
98
|
+
/**
|
|
99
|
+
* How many months a member should be inactive to lose the collected points.
|
|
100
|
+
* @min 1
|
|
101
|
+
* @max 12
|
|
102
|
+
*/
|
|
103
|
+
monthsOfInactivity?: number;
|
|
104
|
+
/**
|
|
105
|
+
* Percentage of points that a member loses after being inactive.
|
|
106
|
+
* @min 1
|
|
107
|
+
* @max 100
|
|
108
|
+
*/
|
|
109
|
+
expiringPointsPercentage?: number;
|
|
110
|
+
}
|
|
111
|
+
declare enum Status {
|
|
112
|
+
/** Unknown points expiration status. This value is not used. */
|
|
113
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
114
|
+
/** Points expiration feature is disabled. */
|
|
115
|
+
DISABLED = "DISABLED",
|
|
116
|
+
/** Points expiration feature is enabled. */
|
|
117
|
+
ENABLED = "ENABLED"
|
|
118
|
+
}
|
|
119
|
+
/** @enumType */
|
|
120
|
+
type StatusWithLiterals = Status | 'UNKNOWN_STATUS' | 'DISABLED' | 'ENABLED';
|
|
121
|
+
interface PremiumFeatures {
|
|
122
|
+
/**
|
|
123
|
+
* Whether there are any loyalty program premium features.
|
|
124
|
+
* @readonly
|
|
125
|
+
*/
|
|
126
|
+
loyaltyProgram?: boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Whether this loyalty program includes tiers.
|
|
129
|
+
* @readonly
|
|
130
|
+
*/
|
|
131
|
+
tiers?: boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Whether this loyalty program includes point expiration.
|
|
134
|
+
* @readonly
|
|
135
|
+
*/
|
|
136
|
+
pointsExpiration?: boolean;
|
|
137
|
+
}
|
|
138
|
+
interface GetLoyaltyProgramRequest {
|
|
139
|
+
}
|
|
140
|
+
interface GetLoyaltyProgramResponse {
|
|
141
|
+
/** Retrieved loyalty program. */
|
|
142
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
143
|
+
}
|
|
144
|
+
interface BulkGetLoyaltyProgramRequest {
|
|
145
|
+
}
|
|
146
|
+
interface BulkGetLoyaltyProgramResponse {
|
|
147
|
+
/** Retrieved loyalty programs. */
|
|
148
|
+
programInSites?: ProgramInSite[];
|
|
149
|
+
}
|
|
150
|
+
interface ProgramInSite {
|
|
151
|
+
/**
|
|
152
|
+
* Metasite ID.
|
|
153
|
+
* @format GUID
|
|
154
|
+
*/
|
|
155
|
+
metaSiteId?: string;
|
|
156
|
+
/** Loyalty program. */
|
|
157
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
158
|
+
}
|
|
159
|
+
interface UpdateLoyaltyProgramRequest {
|
|
160
|
+
/** Loyalty program fields to update. */
|
|
161
|
+
loyaltyProgram: LoyaltyProgram;
|
|
162
|
+
}
|
|
163
|
+
interface UpdateLoyaltyProgramResponse {
|
|
164
|
+
/** Updated loyalty program. */
|
|
165
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
166
|
+
}
|
|
167
|
+
interface ActivateLoyaltyProgramRequest {
|
|
168
|
+
}
|
|
169
|
+
interface ActivateLoyaltyProgramResponse {
|
|
170
|
+
/** Activated loyalty program. */
|
|
171
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
172
|
+
}
|
|
173
|
+
interface PauseLoyaltyProgramRequest {
|
|
174
|
+
}
|
|
175
|
+
interface PauseLoyaltyProgramResponse {
|
|
176
|
+
/** Paused loyalty program. */
|
|
177
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
178
|
+
}
|
|
179
|
+
interface GetLoyaltyProgramPremiumFeaturesRequest {
|
|
180
|
+
}
|
|
181
|
+
interface GetLoyaltyProgramPremiumFeaturesResponse {
|
|
182
|
+
/**
|
|
183
|
+
* Whether there are any loyalty program premium features.
|
|
184
|
+
* @readonly
|
|
185
|
+
*/
|
|
186
|
+
loyaltyProgram?: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Whether this loyalty program includes tiers.
|
|
189
|
+
* @readonly
|
|
190
|
+
*/
|
|
191
|
+
tiers?: boolean;
|
|
192
|
+
/**
|
|
193
|
+
* Whether this loyalty program includes point expiration.
|
|
194
|
+
* @readonly
|
|
195
|
+
*/
|
|
196
|
+
pointsExpiration?: boolean;
|
|
197
|
+
}
|
|
198
|
+
interface EnablePointsExpirationRequest {
|
|
199
|
+
}
|
|
200
|
+
interface EnablePointsExpirationResponse {
|
|
201
|
+
/** Loyalty program with enabled points expiration feature. */
|
|
202
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
203
|
+
}
|
|
204
|
+
interface DisablePointsExpirationRequest {
|
|
205
|
+
}
|
|
206
|
+
interface DisablePointsExpirationResponse {
|
|
207
|
+
/** Loyalty program with disabled points expiration feature. */
|
|
208
|
+
loyaltyProgram?: LoyaltyProgram;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
212
|
+
getUrl: (context: any) => string;
|
|
213
|
+
httpMethod: K;
|
|
214
|
+
path: string;
|
|
215
|
+
pathParams: M;
|
|
216
|
+
__requestType: T;
|
|
217
|
+
__originalRequestType: S;
|
|
218
|
+
__responseType: Q;
|
|
219
|
+
__originalResponseType: R;
|
|
220
|
+
};
|
|
221
|
+
declare function getLoyaltyProgram(): __PublicMethodMetaInfo<'GET', {}, GetLoyaltyProgramRequest$1, GetLoyaltyProgramRequest, GetLoyaltyProgramResponse$1, GetLoyaltyProgramResponse>;
|
|
222
|
+
declare function bulkGetLoyaltyProgram(): __PublicMethodMetaInfo<'GET', {}, BulkGetLoyaltyProgramRequest$1, BulkGetLoyaltyProgramRequest, BulkGetLoyaltyProgramResponse$1, BulkGetLoyaltyProgramResponse>;
|
|
223
|
+
declare function updateLoyaltyProgram(): __PublicMethodMetaInfo<'PATCH', {}, UpdateLoyaltyProgramRequest$1, UpdateLoyaltyProgramRequest, UpdateLoyaltyProgramResponse$1, UpdateLoyaltyProgramResponse>;
|
|
224
|
+
declare function activateLoyaltyProgram(): __PublicMethodMetaInfo<'POST', {}, ActivateLoyaltyProgramRequest$1, ActivateLoyaltyProgramRequest, ActivateLoyaltyProgramResponse$1, ActivateLoyaltyProgramResponse>;
|
|
225
|
+
declare function pauseLoyaltyProgram(): __PublicMethodMetaInfo<'POST', {}, PauseLoyaltyProgramRequest$1, PauseLoyaltyProgramRequest, PauseLoyaltyProgramResponse$1, PauseLoyaltyProgramResponse>;
|
|
226
|
+
declare function getLoyaltyProgramPremiumFeatures(): __PublicMethodMetaInfo<'GET', {}, GetLoyaltyProgramPremiumFeaturesRequest$1, GetLoyaltyProgramPremiumFeaturesRequest, GetLoyaltyProgramPremiumFeaturesResponse$1, GetLoyaltyProgramPremiumFeaturesResponse>;
|
|
227
|
+
declare function enablePointsExpiration(): __PublicMethodMetaInfo<'POST', {}, EnablePointsExpirationRequest$1, EnablePointsExpirationRequest, EnablePointsExpirationResponse$1, EnablePointsExpirationResponse>;
|
|
228
|
+
declare function disablePointsExpiration(): __PublicMethodMetaInfo<'POST', {}, DisablePointsExpirationRequest$1, DisablePointsExpirationRequest, DisablePointsExpirationResponse$1, DisablePointsExpirationResponse>;
|
|
229
|
+
|
|
230
|
+
export { type __PublicMethodMetaInfo, activateLoyaltyProgram, bulkGetLoyaltyProgram, disablePointsExpiration, enablePointsExpiration, getLoyaltyProgram, getLoyaltyProgramPremiumFeatures, pauseLoyaltyProgram, updateLoyaltyProgram };
|