@pisell/pisellos 2.1.41 → 2.2.2
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/core/index.d.ts +8 -1
- package/dist/core/index.js +116 -42
- package/dist/modules/Customer/index.js +1 -1
- package/dist/modules/Order/index.js +4 -4
- package/dist/modules/Order/types.d.ts +0 -1
- package/dist/modules/Product/types.d.ts +19 -0
- package/dist/modules/ProductList/index.js +3 -11
- package/dist/modules/Schedule/types.d.ts +2 -0
- package/dist/plugins/request.d.ts +19 -1
- package/dist/plugins/request.js +11 -0
- package/dist/server/index.d.ts +152 -0
- package/dist/server/index.js +946 -0
- package/dist/server/modules/index.d.ts +16 -0
- package/dist/server/modules/index.js +21 -0
- package/dist/server/modules/menu/index.d.ts +63 -0
- package/dist/server/modules/menu/index.js +476 -0
- package/dist/server/modules/menu/types.d.ts +68 -0
- package/dist/server/modules/menu/types.js +16 -0
- package/dist/server/modules/products/index.d.ts +141 -0
- package/dist/server/modules/products/index.js +774 -0
- package/dist/server/modules/products/types.d.ts +94 -0
- package/dist/server/modules/products/types.js +43 -0
- package/dist/server/modules/quotation/index.d.ts +47 -0
- package/dist/server/modules/quotation/index.js +367 -0
- package/dist/server/modules/quotation/types.d.ts +50 -0
- package/dist/server/modules/quotation/types.js +20 -0
- package/dist/server/modules/schedule/index.d.ts +62 -0
- package/dist/server/modules/schedule/index.js +431 -0
- package/dist/server/modules/schedule/types.d.ts +1 -0
- package/dist/server/modules/schedule/types.js +2 -0
- package/dist/server/modules/schedule/utils.d.ts +32 -0
- package/dist/server/modules/schedule/utils.js +747 -0
- package/dist/server/types.d.ts +64 -0
- package/dist/server/types.js +1 -0
- package/dist/server/utils/index.d.ts +5 -0
- package/dist/server/utils/index.js +6 -0
- package/dist/server/utils/product.d.ts +18 -0
- package/dist/server/utils/product.js +339 -0
- package/dist/server/utils/schedule.d.ts +14 -0
- package/dist/server/utils/schedule.js +108 -0
- package/dist/server/utils/time.d.ts +18 -0
- package/dist/server/utils/time.js +53 -0
- package/dist/solution/BookingByStep/index.d.ts +2 -22
- package/dist/solution/BookingByStep/index.js +29 -502
- package/dist/solution/BookingByStep/utils/capacity.d.ts +2 -7
- package/dist/solution/BookingByStep/utils/capacity.js +8 -24
- package/dist/solution/BookingTicket/index.d.ts +8 -0
- package/dist/solution/BookingTicket/index.js +105 -71
- package/dist/solution/ShopDiscount/index.js +9 -27
- package/dist/solution/index.d.ts +0 -1
- package/dist/solution/index.js +0 -1
- package/dist/types/index.d.ts +26 -0
- package/lib/core/index.d.ts +8 -1
- package/lib/core/index.js +48 -1
- package/lib/modules/Customer/index.js +1 -1
- package/lib/modules/Order/index.js +2 -5
- package/lib/modules/Order/types.d.ts +0 -1
- package/lib/modules/Product/types.d.ts +19 -0
- package/lib/modules/ProductList/index.js +2 -10
- package/lib/modules/Schedule/types.d.ts +2 -0
- package/lib/plugins/request.d.ts +19 -1
- package/lib/plugins/request.js +11 -1
- package/lib/server/index.d.ts +152 -0
- package/lib/server/index.js +555 -0
- package/lib/server/modules/index.d.ts +16 -0
- package/lib/server/modules/index.js +47 -0
- package/lib/server/modules/menu/index.d.ts +63 -0
- package/lib/server/modules/menu/index.js +234 -0
- package/lib/server/modules/menu/types.d.ts +68 -0
- package/lib/server/modules/menu/types.js +33 -0
- package/lib/server/modules/products/index.d.ts +141 -0
- package/lib/server/modules/products/index.js +442 -0
- package/lib/server/modules/products/types.d.ts +94 -0
- package/lib/server/modules/products/types.js +35 -0
- package/lib/server/modules/quotation/index.d.ts +47 -0
- package/lib/server/modules/quotation/index.js +177 -0
- package/lib/server/modules/quotation/types.d.ts +50 -0
- package/lib/server/modules/quotation/types.js +33 -0
- package/lib/server/modules/schedule/index.d.ts +62 -0
- package/lib/server/modules/schedule/index.js +231 -0
- package/lib/server/modules/schedule/types.d.ts +1 -0
- package/lib/server/modules/schedule/types.js +23 -0
- package/lib/server/modules/schedule/utils.d.ts +32 -0
- package/lib/server/modules/schedule/utils.js +451 -0
- package/lib/server/types.d.ts +64 -0
- package/lib/server/types.js +17 -0
- package/lib/server/utils/index.d.ts +5 -0
- package/lib/server/utils/index.js +25 -0
- package/lib/server/utils/product.d.ts +18 -0
- package/lib/server/utils/product.js +262 -0
- package/lib/server/utils/schedule.d.ts +14 -0
- package/lib/server/utils/schedule.js +88 -0
- package/lib/server/utils/time.d.ts +18 -0
- package/lib/server/utils/time.js +70 -0
- package/lib/solution/BookingByStep/index.d.ts +2 -22
- package/lib/solution/BookingByStep/index.js +42 -321
- package/lib/solution/BookingByStep/utils/capacity.d.ts +2 -7
- package/lib/solution/BookingByStep/utils/capacity.js +8 -21
- package/lib/solution/BookingTicket/index.d.ts +8 -0
- package/lib/solution/BookingTicket/index.js +13 -0
- package/lib/solution/ShopDiscount/index.js +0 -9
- package/lib/solution/index.d.ts +0 -1
- package/lib/solution/index.js +0 -2
- package/lib/types/index.d.ts +26 -0
- package/package.json +2 -2
- package/dist/solution/RegisterAndLogin/config.d.ts +0 -87
- package/dist/solution/RegisterAndLogin/config.js +0 -792
- package/dist/solution/RegisterAndLogin/index.d.ts +0 -189
- package/dist/solution/RegisterAndLogin/index.js +0 -2667
- package/dist/solution/RegisterAndLogin/types.d.ts +0 -444
- package/dist/solution/RegisterAndLogin/types.js +0 -231
- package/dist/solution/RegisterAndLogin/utils.d.ts +0 -95
- package/dist/solution/RegisterAndLogin/utils.js +0 -322
- package/lib/solution/RegisterAndLogin/config.d.ts +0 -87
- package/lib/solution/RegisterAndLogin/config.js +0 -594
- package/lib/solution/RegisterAndLogin/index.d.ts +0 -189
- package/lib/solution/RegisterAndLogin/index.js +0 -1593
- package/lib/solution/RegisterAndLogin/types.d.ts +0 -444
- package/lib/solution/RegisterAndLogin/types.js +0 -78
- package/lib/solution/RegisterAndLogin/utils.d.ts +0 -95
- package/lib/solution/RegisterAndLogin/utils.js +0 -279
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { Module, PisellCore } from '../../types';
|
|
2
|
-
import { BaseModule } from '../../modules/BaseModule';
|
|
3
|
-
import { RegisterParams, LoginParams, OAuthLoginParams, SendVerificationCodeParams, VerifyCodeParams, PasswordResetParams, UserInfo, ApiResponse, LoginResponse, RegisterResponse, OAuthLoginResponse, OAuthConfig, CountryInfo, SendSmsRegisterCodeParams, VerifyEmailRegistrationLinkParams, EmailPasswordLoginParams, SendSmsLoginCodeParams, PhoneCodeLoginParams, GuestLoginResponse, CheckEmailExistsParams, CheckEmailExistsResponse, CheckEmailCodeParams, CheckMobileCodeParams, CheckCodeValidResponse, PhonePasswordLoginParams, SendPasswordResetEmailParams, SendPasswordResetSmsParams, SendResetPasswordLinkParams, CheckResetPasswordCodeParams, ResetPasswordByCodeParams, EmailCodeRegisterParams, PhoneCodeRegisterParams, CheckEmailLinkCodeParams, CheckEmailLinkCodeResponse } from './types';
|
|
4
|
-
import { ApiCaller } from './config';
|
|
5
|
-
export * from './types';
|
|
6
|
-
export * from './config';
|
|
7
|
-
/**
|
|
8
|
-
* 注册登录解决方案实现
|
|
9
|
-
*/
|
|
10
|
-
export declare class RegisterAndLoginImpl extends BaseModule implements Module {
|
|
11
|
-
protected defaultName: string;
|
|
12
|
-
protected defaultVersion: string;
|
|
13
|
-
isSolution: boolean;
|
|
14
|
-
private request;
|
|
15
|
-
private window;
|
|
16
|
-
private store;
|
|
17
|
-
private apiCaller;
|
|
18
|
-
private otherParams;
|
|
19
|
-
private channel;
|
|
20
|
-
private countriesCache;
|
|
21
|
-
constructor(name?: string, version?: string);
|
|
22
|
-
/**
|
|
23
|
-
* 重新发送邮箱注册链接
|
|
24
|
-
*/
|
|
25
|
-
resendEmailRegisterLink(): Promise<ApiResponse>;
|
|
26
|
-
/**
|
|
27
|
-
* 邮箱验证码注册
|
|
28
|
-
* @param params 注册参数
|
|
29
|
-
* @returns 注册结果
|
|
30
|
-
*/
|
|
31
|
-
emailCodeRegister(params: EmailCodeRegisterParams): Promise<ApiResponse<RegisterResponse>>;
|
|
32
|
-
/**
|
|
33
|
-
* 手机验证码注册
|
|
34
|
-
*/
|
|
35
|
-
phoneCodeRegister(params: PhoneCodeRegisterParams): Promise<ApiResponse<RegisterResponse>>;
|
|
36
|
-
initialize(core: PisellCore, options: any): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* 从本地存储恢复登录状态
|
|
39
|
-
*/
|
|
40
|
-
private restoreLoginState;
|
|
41
|
-
/**
|
|
42
|
-
* 验证 token 有效性
|
|
43
|
-
*/
|
|
44
|
-
private validateToken;
|
|
45
|
-
/**
|
|
46
|
-
* 清除登录状态
|
|
47
|
-
*/
|
|
48
|
-
private clearLoginState;
|
|
49
|
-
/**
|
|
50
|
-
* 发送邮箱验证码
|
|
51
|
-
*/
|
|
52
|
-
sendEmailVerificationCode(params: SendVerificationCodeParams): Promise<ApiResponse>;
|
|
53
|
-
/**
|
|
54
|
-
* 发送邮箱登录验证码
|
|
55
|
-
*/
|
|
56
|
-
sendEmailLoginCode(params: SendVerificationCodeParams): Promise<ApiResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* 发送手机号注册验证码
|
|
59
|
-
*/
|
|
60
|
-
sendSmsRegisterCode(params: SendSmsRegisterCodeParams): Promise<ApiResponse>;
|
|
61
|
-
/**
|
|
62
|
-
* 发送邮箱注册邀请链接
|
|
63
|
-
*/
|
|
64
|
-
sendEmailRegisterLink(email: string): Promise<ApiResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* 验证邮箱注册链接
|
|
67
|
-
*/
|
|
68
|
-
verifyEmailRegistrationLink(params: VerifyEmailRegistrationLinkParams): Promise<ApiResponse>;
|
|
69
|
-
/**
|
|
70
|
-
* 邮箱密码登录
|
|
71
|
-
*/
|
|
72
|
-
emailPasswordLogin(params: EmailPasswordLoginParams): Promise<ApiResponse<LoginResponse>>;
|
|
73
|
-
/**
|
|
74
|
-
* 验证验证码
|
|
75
|
-
*/
|
|
76
|
-
verifyCode(params: VerifyCodeParams): Promise<ApiResponse>;
|
|
77
|
-
/**
|
|
78
|
-
* 用户注册
|
|
79
|
-
*/
|
|
80
|
-
register(params: RegisterParams): Promise<ApiResponse<RegisterResponse>>;
|
|
81
|
-
/**
|
|
82
|
-
* 用户登录
|
|
83
|
-
*/
|
|
84
|
-
login(params: LoginParams): Promise<ApiResponse<LoginResponse>>;
|
|
85
|
-
/**
|
|
86
|
-
* OAuth 登录
|
|
87
|
-
*/
|
|
88
|
-
oauthLogin(params: OAuthLoginParams): Promise<ApiResponse<OAuthLoginResponse>>;
|
|
89
|
-
/**
|
|
90
|
-
* 用户登出
|
|
91
|
-
*/
|
|
92
|
-
logout(): Promise<void>;
|
|
93
|
-
/** 发送重置密码邮箱链接 */
|
|
94
|
-
sendResetPasswordLink(params: SendResetPasswordLinkParams): Promise<ApiResponse>;
|
|
95
|
-
/** 检测重置密码链接code有效性 */
|
|
96
|
-
checkResetPasswordCode(params: CheckResetPasswordCodeParams): Promise<ApiResponse>;
|
|
97
|
-
/** 校验邮件链接 code 有效性 */
|
|
98
|
-
checkEmailLinkCode(params: CheckEmailLinkCodeParams): Promise<ApiResponse<CheckEmailLinkCodeResponse>>;
|
|
99
|
-
/** 通过code重置密码 */
|
|
100
|
-
resetPasswordByCode(params: ResetPasswordByCodeParams): Promise<ApiResponse>;
|
|
101
|
-
/**
|
|
102
|
-
* 重置密码
|
|
103
|
-
*/
|
|
104
|
-
resetPassword(params: PasswordResetParams): Promise<ApiResponse>;
|
|
105
|
-
/** 发送手机登录验证码 */
|
|
106
|
-
sendSmsLoginCode(params: SendSmsLoginCodeParams): Promise<ApiResponse>;
|
|
107
|
-
/** 手机号+短信验证码登录 */
|
|
108
|
-
phoneCodeLogin(params: PhoneCodeLoginParams): Promise<ApiResponse<LoginResponse>>;
|
|
109
|
-
private formatLoginParams;
|
|
110
|
-
/** Guest 登录 */
|
|
111
|
-
guestLogin(): Promise<ApiResponse<GuestLoginResponse>>;
|
|
112
|
-
/** 检查邮箱是否已注册 */
|
|
113
|
-
checkEmailExists(params: CheckEmailExistsParams): Promise<ApiResponse<CheckEmailExistsResponse>>;
|
|
114
|
-
/** 检查邮箱验证码是否有效 */
|
|
115
|
-
checkEmailCode(params: CheckEmailCodeParams): Promise<ApiResponse<CheckCodeValidResponse>>;
|
|
116
|
-
/** 检查手机验证码是否有效 */
|
|
117
|
-
checkMobileCode(params: CheckMobileCodeParams): Promise<ApiResponse<CheckCodeValidResponse>>;
|
|
118
|
-
/** 手机号密码登录 */
|
|
119
|
-
phonePasswordLogin(params: PhonePasswordLoginParams): Promise<ApiResponse<LoginResponse>>;
|
|
120
|
-
/** 发送密码重置邮箱验证码 */
|
|
121
|
-
sendPasswordResetEmail(params: SendPasswordResetEmailParams): Promise<ApiResponse>;
|
|
122
|
-
/** 发送手机号验证码重置密码 */
|
|
123
|
-
sendPasswordResetSms(params: SendPasswordResetSmsParams): Promise<ApiResponse>;
|
|
124
|
-
/**
|
|
125
|
-
* 获取当前用户信息
|
|
126
|
-
*/
|
|
127
|
-
getCurrentUser(): UserInfo | null;
|
|
128
|
-
/**
|
|
129
|
-
* 检查是否已登录
|
|
130
|
-
*/
|
|
131
|
-
isLoggedIn(): boolean;
|
|
132
|
-
/**
|
|
133
|
-
* 获取加载状态
|
|
134
|
-
*/
|
|
135
|
-
isLoading(): boolean;
|
|
136
|
-
/**
|
|
137
|
-
* 获取错误信息
|
|
138
|
-
*/
|
|
139
|
-
getError(): string | null;
|
|
140
|
-
/**
|
|
141
|
-
* 清除错误信息
|
|
142
|
-
*/
|
|
143
|
-
clearError(): void;
|
|
144
|
-
/**
|
|
145
|
-
* 检查验证码是否已发送且未过期
|
|
146
|
-
*/
|
|
147
|
-
isVerificationCodeSent(target: string): boolean;
|
|
148
|
-
/**
|
|
149
|
-
* 获取验证码剩余时间(秒)
|
|
150
|
-
*/
|
|
151
|
-
getVerificationCodeRemainingTime(target: string): number;
|
|
152
|
-
/**
|
|
153
|
-
* 初始化 Facebook SDK
|
|
154
|
-
*/
|
|
155
|
-
initFacebookSDK(token: string): Promise<void>;
|
|
156
|
-
/**
|
|
157
|
-
* 初始化 Apple SDK
|
|
158
|
-
*/
|
|
159
|
-
initAppleSDK(): Promise<void>;
|
|
160
|
-
/**
|
|
161
|
-
* Facebook 登录
|
|
162
|
-
*/
|
|
163
|
-
loginWithFacebook(token: string): Promise<unknown>;
|
|
164
|
-
/**
|
|
165
|
-
* Apple 登录(需要在支持的环境中使用)
|
|
166
|
-
*/
|
|
167
|
-
loginWithApple(token: string): Promise<unknown>;
|
|
168
|
-
/**
|
|
169
|
-
* 更新 OAuth 配置
|
|
170
|
-
*/
|
|
171
|
-
updateOAuthConfig(config: Partial<OAuthConfig>): void;
|
|
172
|
-
/**
|
|
173
|
-
* 获取当前渠道
|
|
174
|
-
*/
|
|
175
|
-
getCurrentChannel(): string;
|
|
176
|
-
/**
|
|
177
|
-
* 获取 API 调用器(用于高级用法)
|
|
178
|
-
*/
|
|
179
|
-
getApiCaller(): ApiCaller;
|
|
180
|
-
/**
|
|
181
|
-
* 获取国家区号列表
|
|
182
|
-
*/
|
|
183
|
-
getCountries(): Promise<CountryInfo[]>;
|
|
184
|
-
/**
|
|
185
|
-
* 异步更新国家缓存数据
|
|
186
|
-
*/
|
|
187
|
-
private updateCountriesCache;
|
|
188
|
-
destroy(): Promise<void>;
|
|
189
|
-
}
|