@cloudbase/auth 3.1.9 → 3.1.10
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/cjs/index.d.ts +61 -61
- package/dist/cjs/index.js +1675 -1676
- package/dist/esm/index.d.ts +61 -61
- package/dist/esm/index.js +1675 -1676
- package/dist/miniprogram/index.js +1 -1
- package/package.json +5 -5
- package/src/index.ts +1615 -1639
package/dist/cjs/index.d.ts
CHANGED
|
@@ -87,6 +87,67 @@ declare class Auth extends AuthV1Compat {
|
|
|
87
87
|
private listeners;
|
|
88
88
|
private hasListenerSetUp;
|
|
89
89
|
constructor(config: IAuthConfig);
|
|
90
|
+
signInAnonymously(params: SignInAnonymouslyReq): Promise<SignInRes>;
|
|
91
|
+
signUp(params: authModels.SignUpRequest & {
|
|
92
|
+
phone?: string;
|
|
93
|
+
}): Promise<SignUpRes>;
|
|
94
|
+
signOut(params?: authModels.SignoutRequest): Promise<authModels.SignoutResponse & {
|
|
95
|
+
data: Object;
|
|
96
|
+
error: AuthError;
|
|
97
|
+
}>;
|
|
98
|
+
onAuthStateChange(callback: OnAuthStateChangeCallback): {
|
|
99
|
+
data: {
|
|
100
|
+
subscription: {
|
|
101
|
+
id: string;
|
|
102
|
+
callback: OnAuthStateChangeCallback;
|
|
103
|
+
unsubscribe: () => void;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
signInWithPassword(params: SignInWithPasswordReq): Promise<SignInRes>;
|
|
108
|
+
signInWithIdToken(params: SignInWithIdTokenReq): Promise<SignInRes>;
|
|
109
|
+
signInWithOtp(params: SignInWithOtpReq): Promise<SignInWithOtpRes>;
|
|
110
|
+
verifyOAuth(params?: VerifyOAuthReq): Promise<VerifyOAuthRes>;
|
|
111
|
+
signInWithOAuth(params: SignInWithOAuthReq): Promise<SignInOAuthRes>;
|
|
112
|
+
getClaims(): Promise<GetClaimsRes>;
|
|
113
|
+
resetPasswordForEmail(emailOrPhone: string, options?: {
|
|
114
|
+
redirectTo?: string;
|
|
115
|
+
}): Promise<ResetPasswordForEmailRes>;
|
|
116
|
+
resetPasswordForOld(params: ResetPasswordForOldReq): Promise<{
|
|
117
|
+
data: {
|
|
118
|
+
user: import("./type").User;
|
|
119
|
+
session: import("./type").Session;
|
|
120
|
+
};
|
|
121
|
+
error: any;
|
|
122
|
+
} | {
|
|
123
|
+
data: {
|
|
124
|
+
user?: undefined;
|
|
125
|
+
session?: undefined;
|
|
126
|
+
};
|
|
127
|
+
error: AuthError;
|
|
128
|
+
}>;
|
|
129
|
+
verifyOtp(params: VerifyOtpReq): Promise<SignInRes>;
|
|
130
|
+
getSession(): Promise<SignInRes>;
|
|
131
|
+
refreshSession(refresh_token?: string): Promise<SignInRes>;
|
|
132
|
+
getUser(): Promise<GetUserRes>;
|
|
133
|
+
refreshUser(): Promise<CommonRes>;
|
|
134
|
+
updateUser(params: UpdateUserReq): Promise<GetUserRes | UpdateUserWithVerificationRes>;
|
|
135
|
+
getUserIdentities(): Promise<GetUserIdentitiesRes>;
|
|
136
|
+
linkIdentity(params: LinkIdentityReq): Promise<LinkIdentityRes>;
|
|
137
|
+
unlinkIdentity(params: UnlinkIdentityReq): Promise<CommonRes>;
|
|
138
|
+
reauthenticate(): Promise<ReauthenticateRes>;
|
|
139
|
+
resend(params: ResendReq): Promise<ResendRes>;
|
|
140
|
+
setSession(params: SetSessionReq): Promise<SignInRes>;
|
|
141
|
+
exchangeCodeForSession(): Promise<void>;
|
|
142
|
+
deleteUser(params: DeleteMeReq): Promise<CommonRes>;
|
|
143
|
+
toDefaultLoginPage(params?: authModels.ToDefaultLoginPage): Promise<CommonRes>;
|
|
144
|
+
signInWithCustomTicket(getTickFn?: authModels.GetCustomSignTicketFn): Promise<SignInRes>;
|
|
145
|
+
signInWithOpenId({ useWxCloud }?: {
|
|
146
|
+
useWxCloud?: boolean;
|
|
147
|
+
}): Promise<SignInRes>;
|
|
148
|
+
signInWithPhoneAuth({ phoneCode }: {
|
|
149
|
+
phoneCode?: string;
|
|
150
|
+
}): Promise<SignInRes>;
|
|
90
151
|
bindPhoneNumber(params: authModels.BindPhoneRequest): Promise<void>;
|
|
91
152
|
unbindProvider(params: authModels.UnbindProviderRequest): Promise<void>;
|
|
92
153
|
bindEmail(params: authModels.BindEmailRequest): Promise<void>;
|
|
@@ -189,67 +250,6 @@ declare class Auth extends AuthV1Compat {
|
|
|
189
250
|
userInfo?: any;
|
|
190
251
|
}): Promise<LoginState>;
|
|
191
252
|
setAccessKey(): Promise<void>;
|
|
192
|
-
signInAnonymously(params: SignInAnonymouslyReq): Promise<SignInRes>;
|
|
193
|
-
signUp(params: authModels.SignUpRequest & {
|
|
194
|
-
phone?: string;
|
|
195
|
-
}): Promise<SignUpRes>;
|
|
196
|
-
signOut(params?: authModels.SignoutRequest): Promise<authModels.SignoutResponse & {
|
|
197
|
-
data: Object;
|
|
198
|
-
error: AuthError;
|
|
199
|
-
}>;
|
|
200
|
-
onAuthStateChange(callback: OnAuthStateChangeCallback): {
|
|
201
|
-
data: {
|
|
202
|
-
subscription: {
|
|
203
|
-
id: string;
|
|
204
|
-
callback: OnAuthStateChangeCallback;
|
|
205
|
-
unsubscribe: () => void;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
signInWithPassword(params: SignInWithPasswordReq): Promise<SignInRes>;
|
|
210
|
-
signInWithIdToken(params: SignInWithIdTokenReq): Promise<SignInRes>;
|
|
211
|
-
signInWithOtp(params: SignInWithOtpReq): Promise<SignInWithOtpRes>;
|
|
212
|
-
verifyOAuth(params?: VerifyOAuthReq): Promise<VerifyOAuthRes>;
|
|
213
|
-
signInWithOAuth(params: SignInWithOAuthReq): Promise<SignInOAuthRes>;
|
|
214
|
-
getClaims(): Promise<GetClaimsRes>;
|
|
215
|
-
resetPasswordForEmail(emailOrPhone: string, options?: {
|
|
216
|
-
redirectTo?: string;
|
|
217
|
-
}): Promise<ResetPasswordForEmailRes>;
|
|
218
|
-
resetPasswordForOld(params: ResetPasswordForOldReq): Promise<{
|
|
219
|
-
data: {
|
|
220
|
-
user: import("./type").User;
|
|
221
|
-
session: import("./type").Session;
|
|
222
|
-
};
|
|
223
|
-
error: any;
|
|
224
|
-
} | {
|
|
225
|
-
data: {
|
|
226
|
-
user?: undefined;
|
|
227
|
-
session?: undefined;
|
|
228
|
-
};
|
|
229
|
-
error: AuthError;
|
|
230
|
-
}>;
|
|
231
|
-
verifyOtp(params: VerifyOtpReq): Promise<SignInRes>;
|
|
232
|
-
getSession(): Promise<SignInRes>;
|
|
233
|
-
refreshSession(refresh_token?: string): Promise<SignInRes>;
|
|
234
|
-
getUser(): Promise<GetUserRes>;
|
|
235
|
-
refreshUser(): Promise<CommonRes>;
|
|
236
|
-
updateUser(params: UpdateUserReq): Promise<GetUserRes | UpdateUserWithVerificationRes>;
|
|
237
|
-
getUserIdentities(): Promise<GetUserIdentitiesRes>;
|
|
238
|
-
linkIdentity(params: LinkIdentityReq): Promise<LinkIdentityRes>;
|
|
239
|
-
unlinkIdentity(params: UnlinkIdentityReq): Promise<CommonRes>;
|
|
240
|
-
reauthenticate(): Promise<ReauthenticateRes>;
|
|
241
|
-
resend(params: ResendReq): Promise<ResendRes>;
|
|
242
|
-
setSession(params: SetSessionReq): Promise<SignInRes>;
|
|
243
|
-
exchangeCodeForSession(): Promise<void>;
|
|
244
|
-
deleteUser(params: DeleteMeReq): Promise<CommonRes>;
|
|
245
|
-
toDefaultLoginPage(params?: authModels.ToDefaultLoginPage): Promise<CommonRes>;
|
|
246
|
-
signInWithCustomTicket(getTickFn?: authModels.GetCustomSignTicketFn): Promise<SignInRes>;
|
|
247
|
-
signInWithOpenId({ useWxCloud }?: {
|
|
248
|
-
useWxCloud?: boolean;
|
|
249
|
-
}): Promise<SignInRes>;
|
|
250
|
-
signInWithPhoneAuth({ phoneCode }: {
|
|
251
|
-
phoneCode?: string;
|
|
252
|
-
}): Promise<SignInRes>;
|
|
253
253
|
protected formatPhone(phone: string): string;
|
|
254
254
|
private notifyListeners;
|
|
255
255
|
private setupListeners;
|