@pisell/pisellos 3.0.69 → 3.0.71
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/dist/plugins/request.d.ts +1 -0
- package/dist/solution/RegisterAndLogin/config.d.ts +87 -0
- package/dist/solution/RegisterAndLogin/config.js +794 -0
- package/dist/solution/RegisterAndLogin/index.d.ts +189 -0
- package/dist/solution/RegisterAndLogin/index.js +2667 -0
- package/dist/solution/RegisterAndLogin/types.d.ts +445 -0
- package/dist/solution/RegisterAndLogin/types.js +231 -0
- package/dist/solution/RegisterAndLogin/utils.d.ts +95 -0
- package/dist/solution/RegisterAndLogin/utils.js +322 -0
- package/dist/solution/index.d.ts +1 -0
- package/dist/solution/index.js +2 -1
- package/lib/plugins/request.d.ts +1 -0
- package/lib/solution/RegisterAndLogin/config.d.ts +87 -0
- package/lib/solution/RegisterAndLogin/config.js +596 -0
- package/lib/solution/RegisterAndLogin/index.d.ts +189 -0
- package/lib/solution/RegisterAndLogin/index.js +1593 -0
- package/lib/solution/RegisterAndLogin/types.d.ts +445 -0
- package/lib/solution/RegisterAndLogin/types.js +78 -0
- package/lib/solution/RegisterAndLogin/utils.d.ts +95 -0
- package/lib/solution/RegisterAndLogin/utils.js +279 -0
- package/lib/solution/index.d.ts +1 -0
- package/lib/solution/index.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 注册登录解决方案类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 注册登录流程 hooks
|
|
6
|
+
*/
|
|
7
|
+
export declare enum RegisterAndLoginHooks {
|
|
8
|
+
onInited = "registerAndLogin:onInited",
|
|
9
|
+
onDestroy = "registerAndLogin:onDestroy",
|
|
10
|
+
onEmailVerificationSent = "registerAndLogin:onEmailVerificationSent",
|
|
11
|
+
onEmailVerificationVerified = "registerAndLogin:onEmailVerificationVerified",
|
|
12
|
+
onEmailVerificationFailed = "registerAndLogin:onEmailVerificationFailed",
|
|
13
|
+
onSmsVerificationSent = "registerAndLogin:onSmsVerificationSent",
|
|
14
|
+
onSmsVerificationVerified = "registerAndLogin:onSmsVerificationVerified",
|
|
15
|
+
onSmsVerificationFailed = "registerAndLogin:onSmsVerificationFailed",
|
|
16
|
+
onOAuthLoginStarted = "registerAndLogin:onOAuthLoginStarted",
|
|
17
|
+
onOAuthLoginSuccess = "registerAndLogin:onOAuthLoginSuccess",
|
|
18
|
+
onOAuthLoginFailed = "registerAndLogin:onOAuthLoginFailed",
|
|
19
|
+
onRegisterStarted = "registerAndLogin:onRegisterStarted",
|
|
20
|
+
onRegisterSuccess = "registerAndLogin:onRegisterSuccess",
|
|
21
|
+
onRegisterFailed = "registerAndLogin:onRegisterFailed",
|
|
22
|
+
onLoginStarted = "registerAndLogin:onLoginStarted",
|
|
23
|
+
onLoginSuccess = "registerAndLogin:onLoginSuccess",
|
|
24
|
+
onLoginFailed = "registerAndLogin:onLoginFailed",
|
|
25
|
+
onPasswordResetStarted = "registerAndLogin:onPasswordResetStarted",
|
|
26
|
+
onPasswordResetSuccess = "registerAndLogin:onPasswordResetSuccess",
|
|
27
|
+
onPasswordResetFailed = "registerAndLogin:onPasswordResetFailed"
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* OAuth 提供商类型
|
|
31
|
+
*/
|
|
32
|
+
export declare enum OAuthProvider {
|
|
33
|
+
FACEBOOK = "facebook",
|
|
34
|
+
APPLE = "apple",
|
|
35
|
+
GOOGLE = "google",
|
|
36
|
+
WECHAT = "wechat",
|
|
37
|
+
GITHUB = "github"
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 验证码类型
|
|
41
|
+
*/
|
|
42
|
+
export declare enum VerificationCodeType {
|
|
43
|
+
EMAIL = "email",
|
|
44
|
+
SMS = "sms"
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 验证码用途
|
|
48
|
+
*/
|
|
49
|
+
export declare enum VerificationPurpose {
|
|
50
|
+
REGISTER = "register",
|
|
51
|
+
LOGIN = "login",
|
|
52
|
+
PASSWORD_RESET = "password_reset",
|
|
53
|
+
CHANGE_EMAIL = "change_email",
|
|
54
|
+
CHANGE_PHONE = "change_phone"
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* 用户信息接口
|
|
58
|
+
*/
|
|
59
|
+
export interface UserInfo {
|
|
60
|
+
id: string;
|
|
61
|
+
email?: string;
|
|
62
|
+
phone?: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
avatar?: string;
|
|
65
|
+
isEmailVerified: boolean;
|
|
66
|
+
isPhoneVerified: boolean;
|
|
67
|
+
createdAt: string;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 注册参数接口
|
|
73
|
+
*/
|
|
74
|
+
export interface RegisterParams {
|
|
75
|
+
email?: string;
|
|
76
|
+
phone?: string;
|
|
77
|
+
password: string;
|
|
78
|
+
name?: string;
|
|
79
|
+
verificationCode?: string;
|
|
80
|
+
verificationCodeType?: VerificationCodeType;
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 登录参数接口
|
|
85
|
+
*/
|
|
86
|
+
export interface LoginParams {
|
|
87
|
+
email?: string;
|
|
88
|
+
phone?: string;
|
|
89
|
+
password?: string;
|
|
90
|
+
verificationCode?: string;
|
|
91
|
+
verificationCodeType?: VerificationCodeType;
|
|
92
|
+
rememberMe?: boolean;
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* OAuth 登录参数接口
|
|
97
|
+
*/
|
|
98
|
+
export interface OAuthLoginParams {
|
|
99
|
+
provider: OAuthProvider;
|
|
100
|
+
code?: string;
|
|
101
|
+
accessToken?: string;
|
|
102
|
+
redirectUri?: string;
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* 发送验证码参数接口
|
|
107
|
+
*/
|
|
108
|
+
export interface SendVerificationCodeParams {
|
|
109
|
+
type: VerificationCodeType;
|
|
110
|
+
target: string;
|
|
111
|
+
purpose: VerificationPurpose;
|
|
112
|
+
[key: string]: any;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* 验证验证码参数接口
|
|
116
|
+
*/
|
|
117
|
+
export interface VerifyCodeParams {
|
|
118
|
+
type: VerificationCodeType;
|
|
119
|
+
target: string;
|
|
120
|
+
code: string;
|
|
121
|
+
purpose: VerificationPurpose;
|
|
122
|
+
[key: string]: any;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* 密码重置参数接口
|
|
126
|
+
*/
|
|
127
|
+
export interface PasswordResetParams {
|
|
128
|
+
type: 'email' | 'phone';
|
|
129
|
+
target: {
|
|
130
|
+
email?: string;
|
|
131
|
+
phone?: string;
|
|
132
|
+
country_calling_code?: string;
|
|
133
|
+
};
|
|
134
|
+
password: string;
|
|
135
|
+
code: string;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* OAuth 配置接口
|
|
139
|
+
*/
|
|
140
|
+
export interface OAuthConfig {
|
|
141
|
+
[OAuthProvider.FACEBOOK]?: {
|
|
142
|
+
appId: string;
|
|
143
|
+
appSecret?: string;
|
|
144
|
+
redirectUri?: string;
|
|
145
|
+
scope?: string[];
|
|
146
|
+
};
|
|
147
|
+
[OAuthProvider.APPLE]?: {
|
|
148
|
+
clientId: string;
|
|
149
|
+
teamId?: string;
|
|
150
|
+
keyId?: string;
|
|
151
|
+
privateKey?: string;
|
|
152
|
+
redirectUri?: string;
|
|
153
|
+
scope?: string[];
|
|
154
|
+
};
|
|
155
|
+
[OAuthProvider.GOOGLE]?: {
|
|
156
|
+
clientId: string;
|
|
157
|
+
clientSecret?: string;
|
|
158
|
+
redirectUri?: string;
|
|
159
|
+
scope?: string[];
|
|
160
|
+
};
|
|
161
|
+
[OAuthProvider.WECHAT]?: {
|
|
162
|
+
appId: string;
|
|
163
|
+
appSecret?: string;
|
|
164
|
+
redirectUri?: string;
|
|
165
|
+
scope?: string[];
|
|
166
|
+
};
|
|
167
|
+
[OAuthProvider.GITHUB]?: {
|
|
168
|
+
clientId: string;
|
|
169
|
+
clientSecret?: string;
|
|
170
|
+
redirectUri?: string;
|
|
171
|
+
scope?: string[];
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* 注册登录状态接口
|
|
176
|
+
*/
|
|
177
|
+
export interface RegisterAndLoginState {
|
|
178
|
+
currentUser: UserInfo | null;
|
|
179
|
+
isLoggedIn: boolean;
|
|
180
|
+
isLoading: boolean;
|
|
181
|
+
verificationCodeSent: {
|
|
182
|
+
[key: string]: {
|
|
183
|
+
sent: boolean;
|
|
184
|
+
sentAt: number;
|
|
185
|
+
expiresAt: number;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
emailRegisterLinkCode: string | null;
|
|
189
|
+
oauthConfig: OAuthConfig;
|
|
190
|
+
error: string | null;
|
|
191
|
+
[key: string]: any;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* API 响应接口
|
|
195
|
+
*/
|
|
196
|
+
export interface ApiResponse<T = any> {
|
|
197
|
+
status: boolean;
|
|
198
|
+
data?: T;
|
|
199
|
+
message?: string;
|
|
200
|
+
error?: string;
|
|
201
|
+
code?: number;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* 登录响应接口
|
|
205
|
+
*/
|
|
206
|
+
export interface LoginResponse {
|
|
207
|
+
user: UserInfo;
|
|
208
|
+
token: string;
|
|
209
|
+
refreshToken?: string;
|
|
210
|
+
expiresAt: number;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* 注册响应接口
|
|
214
|
+
*/
|
|
215
|
+
export interface RegisterResponse {
|
|
216
|
+
user: UserInfo;
|
|
217
|
+
token?: string;
|
|
218
|
+
refreshToken?: string;
|
|
219
|
+
expiresAt?: number;
|
|
220
|
+
needVerification?: boolean;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* OAuth 登录响应接口
|
|
224
|
+
*/
|
|
225
|
+
export interface OAuthLoginResponse {
|
|
226
|
+
user: UserInfo;
|
|
227
|
+
token: string;
|
|
228
|
+
refreshToken?: string;
|
|
229
|
+
expiresAt: number;
|
|
230
|
+
isNewUser: boolean;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* 国家信息接口
|
|
234
|
+
*/
|
|
235
|
+
export interface CountryInfo {
|
|
236
|
+
name: string;
|
|
237
|
+
code: string;
|
|
238
|
+
calling_code: string;
|
|
239
|
+
currency_code: string;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* 获取国家区号响应接口
|
|
243
|
+
*/
|
|
244
|
+
export interface GetCountriesResponse {
|
|
245
|
+
status: boolean;
|
|
246
|
+
code: number;
|
|
247
|
+
message: string;
|
|
248
|
+
data: CountryInfo[];
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* 发送手机号注册验证码参数接口
|
|
252
|
+
*/
|
|
253
|
+
export interface SendSmsRegisterCodeParams {
|
|
254
|
+
phone: string;
|
|
255
|
+
country_calling_code: string;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* 发送邮箱注册邀请链接参数接口
|
|
259
|
+
*/
|
|
260
|
+
export interface SendEmailRegisterLinkParams {
|
|
261
|
+
email: string;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* 验证邮箱注册链接参数接口
|
|
265
|
+
*/
|
|
266
|
+
export interface VerifyEmailRegistrationLinkParams {
|
|
267
|
+
code: string;
|
|
268
|
+
password: string;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* 邮箱密码登录参数接口
|
|
272
|
+
*/
|
|
273
|
+
export interface EmailPasswordLoginParams {
|
|
274
|
+
email: string;
|
|
275
|
+
password: string;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* 发送手机登录验证码参数接口
|
|
279
|
+
*/
|
|
280
|
+
export interface SendSmsLoginCodeParams {
|
|
281
|
+
phone: string;
|
|
282
|
+
country_calling_code: string;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* 手机号验证码登录参数接口
|
|
286
|
+
*/
|
|
287
|
+
export interface PhoneCodeLoginParams {
|
|
288
|
+
phone: string;
|
|
289
|
+
country_calling_code: string;
|
|
290
|
+
code: string;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Guest 登录响应接口
|
|
294
|
+
*/
|
|
295
|
+
export interface GuestLoginResponse {
|
|
296
|
+
user: UserInfo;
|
|
297
|
+
token: string;
|
|
298
|
+
refreshToken?: string;
|
|
299
|
+
customer: any;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* 检查邮箱是否已注册参数接口
|
|
303
|
+
*/
|
|
304
|
+
export interface CheckEmailExistsParams {
|
|
305
|
+
email: string;
|
|
306
|
+
shop_id: number;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* 检查邮箱是否已注册响应接口
|
|
310
|
+
*/
|
|
311
|
+
export interface CheckEmailExistsResponse {
|
|
312
|
+
exists: boolean;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* 检查邮箱验证码是否有效参数接口
|
|
316
|
+
*/
|
|
317
|
+
export interface CheckEmailCodeParams {
|
|
318
|
+
email: string;
|
|
319
|
+
shop_id: number;
|
|
320
|
+
code: string;
|
|
321
|
+
action: string;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* 检查手机验证码是否有效参数接口
|
|
325
|
+
*/
|
|
326
|
+
export interface CheckMobileCodeParams {
|
|
327
|
+
phone: string;
|
|
328
|
+
shop_id: number;
|
|
329
|
+
code: string;
|
|
330
|
+
country_calling_code: string;
|
|
331
|
+
action: string;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* 验证码有效性检查响应接口
|
|
335
|
+
*/
|
|
336
|
+
export interface CheckCodeValidResponse {
|
|
337
|
+
valid: boolean;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* 手机号密码登录参数接口
|
|
341
|
+
*/
|
|
342
|
+
export interface PhonePasswordLoginParams {
|
|
343
|
+
phone: string;
|
|
344
|
+
password: string;
|
|
345
|
+
country_calling_code: string;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* 发送密码重置邮箱验证码参数接口
|
|
349
|
+
*/
|
|
350
|
+
export interface SendPasswordResetEmailParams {
|
|
351
|
+
email: string;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* 发送重置密码手机号验证码参数接口
|
|
355
|
+
*/
|
|
356
|
+
export interface SendPasswordResetSmsParams {
|
|
357
|
+
phone: string;
|
|
358
|
+
country_calling_code: string;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* 发送重置密码邮箱链接参数接口
|
|
362
|
+
*/
|
|
363
|
+
export interface SendResetPasswordLinkParams {
|
|
364
|
+
email: string;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* 检测重置密码链接code有效性参数接口
|
|
368
|
+
*/
|
|
369
|
+
export interface CheckResetPasswordCodeParams {
|
|
370
|
+
code: string;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* 通过code重置密码参数接口
|
|
374
|
+
*/
|
|
375
|
+
export interface ResetPasswordByCodeParams {
|
|
376
|
+
code: string;
|
|
377
|
+
password: string;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* 邮箱验证码注册参数接口
|
|
381
|
+
*/
|
|
382
|
+
export interface EmailCodeRegisterParams {
|
|
383
|
+
email: string;
|
|
384
|
+
code: string;
|
|
385
|
+
password: string;
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* 手机验证码注册参数接口
|
|
389
|
+
*/
|
|
390
|
+
export interface PhoneCodeRegisterParams {
|
|
391
|
+
phone: string;
|
|
392
|
+
password: string;
|
|
393
|
+
code: string;
|
|
394
|
+
country_calling_code: string;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* 重新发送邮箱注册链接参数接口
|
|
398
|
+
*/
|
|
399
|
+
export interface ResendEmailRegisterLinkParams {
|
|
400
|
+
code: string;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* 校验邮件链接 code 有效性参数接口
|
|
404
|
+
*/
|
|
405
|
+
export interface CheckEmailLinkCodeParams {
|
|
406
|
+
code: string;
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* 校验邮件链接 code 有效性响应接口
|
|
410
|
+
*/
|
|
411
|
+
export interface CheckEmailLinkCodeResponse {
|
|
412
|
+
valid: boolean;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Apple 登录参数
|
|
416
|
+
*/
|
|
417
|
+
export interface AppleLoginParams {
|
|
418
|
+
token: string;
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Apple 登录响应
|
|
422
|
+
*/
|
|
423
|
+
export interface AppleLoginResponse {
|
|
424
|
+
user: UserInfo;
|
|
425
|
+
token: string;
|
|
426
|
+
refreshToken?: string;
|
|
427
|
+
expiresAt: number;
|
|
428
|
+
isNewUser: boolean;
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Facebook 登录参数
|
|
432
|
+
*/
|
|
433
|
+
export interface FacebookLoginParams {
|
|
434
|
+
token: string;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Facebook 登录响应
|
|
438
|
+
*/
|
|
439
|
+
export interface FacebookLoginResponse {
|
|
440
|
+
user: UserInfo;
|
|
441
|
+
token: string;
|
|
442
|
+
refreshToken?: string;
|
|
443
|
+
expiresAt: number;
|
|
444
|
+
isNewUser: boolean;
|
|
445
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 注册登录解决方案类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 注册登录流程 hooks
|
|
7
|
+
*/
|
|
8
|
+
export var RegisterAndLoginHooks = /*#__PURE__*/function (RegisterAndLoginHooks) {
|
|
9
|
+
RegisterAndLoginHooks["onInited"] = "registerAndLogin:onInited";
|
|
10
|
+
RegisterAndLoginHooks["onDestroy"] = "registerAndLogin:onDestroy";
|
|
11
|
+
RegisterAndLoginHooks["onEmailVerificationSent"] = "registerAndLogin:onEmailVerificationSent";
|
|
12
|
+
RegisterAndLoginHooks["onEmailVerificationVerified"] = "registerAndLogin:onEmailVerificationVerified";
|
|
13
|
+
RegisterAndLoginHooks["onEmailVerificationFailed"] = "registerAndLogin:onEmailVerificationFailed";
|
|
14
|
+
RegisterAndLoginHooks["onSmsVerificationSent"] = "registerAndLogin:onSmsVerificationSent";
|
|
15
|
+
RegisterAndLoginHooks["onSmsVerificationVerified"] = "registerAndLogin:onSmsVerificationVerified";
|
|
16
|
+
RegisterAndLoginHooks["onSmsVerificationFailed"] = "registerAndLogin:onSmsVerificationFailed";
|
|
17
|
+
RegisterAndLoginHooks["onOAuthLoginStarted"] = "registerAndLogin:onOAuthLoginStarted";
|
|
18
|
+
RegisterAndLoginHooks["onOAuthLoginSuccess"] = "registerAndLogin:onOAuthLoginSuccess";
|
|
19
|
+
RegisterAndLoginHooks["onOAuthLoginFailed"] = "registerAndLogin:onOAuthLoginFailed";
|
|
20
|
+
RegisterAndLoginHooks["onRegisterStarted"] = "registerAndLogin:onRegisterStarted";
|
|
21
|
+
RegisterAndLoginHooks["onRegisterSuccess"] = "registerAndLogin:onRegisterSuccess";
|
|
22
|
+
RegisterAndLoginHooks["onRegisterFailed"] = "registerAndLogin:onRegisterFailed";
|
|
23
|
+
RegisterAndLoginHooks["onLoginStarted"] = "registerAndLogin:onLoginStarted";
|
|
24
|
+
RegisterAndLoginHooks["onLoginSuccess"] = "registerAndLogin:onLoginSuccess";
|
|
25
|
+
RegisterAndLoginHooks["onLoginFailed"] = "registerAndLogin:onLoginFailed";
|
|
26
|
+
RegisterAndLoginHooks["onPasswordResetStarted"] = "registerAndLogin:onPasswordResetStarted";
|
|
27
|
+
RegisterAndLoginHooks["onPasswordResetSuccess"] = "registerAndLogin:onPasswordResetSuccess";
|
|
28
|
+
RegisterAndLoginHooks["onPasswordResetFailed"] = "registerAndLogin:onPasswordResetFailed";
|
|
29
|
+
return RegisterAndLoginHooks;
|
|
30
|
+
}({});
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* OAuth 提供商类型
|
|
34
|
+
*/
|
|
35
|
+
export var OAuthProvider = /*#__PURE__*/function (OAuthProvider) {
|
|
36
|
+
OAuthProvider["FACEBOOK"] = "facebook";
|
|
37
|
+
OAuthProvider["APPLE"] = "apple";
|
|
38
|
+
OAuthProvider["GOOGLE"] = "google";
|
|
39
|
+
OAuthProvider["WECHAT"] = "wechat";
|
|
40
|
+
OAuthProvider["GITHUB"] = "github";
|
|
41
|
+
return OAuthProvider;
|
|
42
|
+
}({});
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 验证码类型
|
|
46
|
+
*/
|
|
47
|
+
export var VerificationCodeType = /*#__PURE__*/function (VerificationCodeType) {
|
|
48
|
+
VerificationCodeType["EMAIL"] = "email";
|
|
49
|
+
VerificationCodeType["SMS"] = "sms";
|
|
50
|
+
return VerificationCodeType;
|
|
51
|
+
}({});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 验证码用途
|
|
55
|
+
*/
|
|
56
|
+
export var VerificationPurpose = /*#__PURE__*/function (VerificationPurpose) {
|
|
57
|
+
VerificationPurpose["REGISTER"] = "register";
|
|
58
|
+
VerificationPurpose["LOGIN"] = "login";
|
|
59
|
+
VerificationPurpose["PASSWORD_RESET"] = "password_reset";
|
|
60
|
+
VerificationPurpose["CHANGE_EMAIL"] = "change_email";
|
|
61
|
+
VerificationPurpose["CHANGE_PHONE"] = "change_phone";
|
|
62
|
+
return VerificationPurpose;
|
|
63
|
+
}({});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 用户信息接口
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* 注册参数接口
|
|
71
|
+
*/
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 登录参数接口
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* OAuth 登录参数接口
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* 发送验证码参数接口
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 验证验证码参数接口
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 密码重置参数接口
|
|
91
|
+
*/
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* OAuth 配置接口
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 注册登录状态接口
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* API 响应接口
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 登录响应接口
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 注册响应接口
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* OAuth 登录响应接口
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* 国家信息接口
|
|
119
|
+
*/
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 获取国家区号响应接口
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 发送手机号注册验证码参数接口
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 发送邮箱注册邀请链接参数接口
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* 验证邮箱注册链接参数接口
|
|
135
|
+
*/
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 邮箱密码登录参数接口
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* 发送手机登录验证码参数接口
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* 手机号验证码登录参数接口
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Guest 登录响应接口
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* 检查邮箱是否已注册参数接口
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* 检查邮箱是否已注册响应接口
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* 检查邮箱验证码是否有效参数接口
|
|
163
|
+
*/
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* 检查手机验证码是否有效参数接口
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 验证码有效性检查响应接口
|
|
171
|
+
*/
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* 手机号密码登录参数接口
|
|
175
|
+
*/
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* 发送密码重置邮箱验证码参数接口
|
|
179
|
+
*/
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 发送重置密码手机号验证码参数接口
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* 发送重置密码邮箱链接参数接口
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 检测重置密码链接code有效性参数接口
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* 通过code重置密码参数接口
|
|
195
|
+
*/
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* 邮箱验证码注册参数接口
|
|
199
|
+
*/
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* 手机验证码注册参数接口
|
|
203
|
+
*/
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* 重新发送邮箱注册链接参数接口
|
|
207
|
+
*/
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* 校验邮件链接 code 有效性参数接口
|
|
211
|
+
*/
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* 校验邮件链接 code 有效性响应接口
|
|
215
|
+
*/
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Apple 登录参数
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Apple 登录响应
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Facebook 登录参数
|
|
227
|
+
*/
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Facebook 登录响应
|
|
231
|
+
*/
|