@cloudbase/js-sdk 3.6.4-alpha.0 → 3.6.4
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/CHANGELOG.md +4 -0
- package/ai/dist/index.esm.js +1 -1
- package/ai/dist/index.esm.js.map +1 -1
- package/ai/dist/index.js +1 -1
- package/ai/dist/index.js.map +1 -1
- package/apis/dist/index.esm.js +1 -1
- package/apis/dist/index.esm.js.map +1 -1
- package/apis/dist/index.js +1 -1
- package/apis/dist/index.js.map +1 -1
- package/app/dist/index.esm.js +1 -1
- package/app/dist/index.esm.js.map +1 -1
- package/app/dist/index.js +1 -1
- package/app/dist/index.js.map +1 -1
- package/app/dist/index.node.esm.js +1 -1
- package/app/dist/index.node.esm.js.map +1 -1
- package/app/dist/index.node.js +1 -1
- package/app/dist/index.node.js.map +1 -1
- package/auth/dist/index.esm.js +2 -1
- package/auth/dist/index.esm.js.LICENSE.txt +12 -0
- package/auth/dist/index.esm.js.map +1 -1
- package/auth/dist/index.js +2 -1
- package/auth/dist/index.js.LICENSE.txt +12 -0
- package/auth/dist/index.js.map +1 -1
- package/cloudrun/dist/index.esm.js +1 -1
- package/cloudrun/dist/index.esm.js.map +1 -1
- package/cloudrun/dist/index.js +1 -1
- package/cloudrun/dist/index.js.map +1 -1
- package/container/dist/index.esm.js +1 -1
- package/container/dist/index.esm.js.map +1 -1
- package/container/dist/index.js +1 -1
- package/container/dist/index.js.map +1 -1
- package/dist/index.cjs.js +2 -1
- package/dist/index.cjs.js.LICENSE.txt +12 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.LICENSE.txt +12 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +1 -1
- package/dist/index.node.cjs.js.LICENSE.txt +13 -0
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.esm.js +1 -1
- package/dist/index.node.esm.js.LICENSE.txt +13 -0
- package/dist/index.node.esm.js.map +1 -1
- package/functions/dist/index.esm.js +1 -1
- package/functions/dist/index.esm.js.map +1 -1
- package/functions/dist/index.js +1 -1
- package/functions/dist/index.js.map +1 -1
- package/miniprogram_dist/app/index.js +1 -1
- package/miniprogram_dist/auth/index.d.ts +12 -27
- package/miniprogram_dist/auth/index.js +1 -1
- package/miniprogram_dist/index.js +1 -1
- package/miniprogram_dist/mysql/index.js +1 -1
- package/miniprogram_dist/oauth/index.d.ts +1 -1
- package/miniprogram_dist/oauth/index.js +1 -1
- package/model/dist/index.esm.js +1 -1
- package/model/dist/index.esm.js.map +1 -1
- package/model/dist/index.js +1 -1
- package/model/dist/index.js.map +1 -1
- package/mysql/dist/index.esm.js +1 -1
- package/mysql/dist/index.esm.js.map +1 -1
- package/mysql/dist/index.js +1 -1
- package/mysql/dist/index.js.map +1 -1
- package/oauth/dist/index.esm.js +2 -1
- package/oauth/dist/index.esm.js.LICENSE.txt +12 -0
- package/oauth/dist/index.esm.js.map +1 -1
- package/oauth/dist/index.js +2 -1
- package/oauth/dist/index.js.LICENSE.txt +12 -0
- package/oauth/dist/index.js.map +1 -1
- package/package.json +1 -16
- package/realtime/dist/index.esm.js +1 -1
- package/realtime/dist/index.esm.js.map +1 -1
- package/realtime/dist/index.js +1 -1
- package/realtime/dist/index.js.map +1 -1
- package/storage/dist/index.esm.js +1 -1
- package/storage/dist/index.esm.js.map +1 -1
- package/storage/dist/index.js +1 -1
- package/storage/dist/index.js.map +1 -1
- package/types/auth.d.ts +77 -10
- package/types/error.d.ts +40 -0
- package/types/functions.d.ts +13 -4
- package/types/index.d.ts +63 -5
- package/types/package.json +5 -2
- package/types/result.d.ts +48 -0
- package/types/storage.d.ts +21 -3
- package/utilities/package.json +3 -9
|
@@ -5,8 +5,8 @@ import type { ICloudbaseAuthConfig, IUser, ILoginState } from '@cloudbase/types/
|
|
|
5
5
|
import type { AuthOptions, Credentials } from '@cloudbase/oauth';
|
|
6
6
|
import { CloudbaseOAuth, AuthError, authModels } from '@cloudbase/oauth';
|
|
7
7
|
import { AuthV1Compat, WeixinAuthProvider, CustomAuthProvider, AnonymousAuthProvider } from './v1-compat';
|
|
8
|
-
import { CommonRes, DeleteMeReq, GetClaimsRes, GetUserIdentitiesRes, GetUserRes, LinkIdentityReq, LinkIdentityRes, OnAuthStateChangeCallback, ReauthenticateRes,
|
|
9
|
-
export type { SignInRes, GetUserRes, CommonRes, SignInWithOtpRes, SignInOAuthRes, GetClaimsRes, ResetPasswordForEmailRes, GetUserIdentitiesRes, LinkIdentityRes, ReauthenticateRes, ResendRes, UpdateUserWithVerificationRes, OnAuthStateChangeCallback, SignInWithPasswordReq, SignInWithIdTokenReq, SignInWithOAuthReq, VerifyOAuthReq, VerifyOtpReq, LinkIdentityReq, UnlinkIdentityReq, UpdateUserReq, SignInWithOtpReq, ResetPasswordForOldReq, ResendReq, SetSessionReq, DeleteMeReq, SignUpRes, } from './type';
|
|
8
|
+
import { AuthOtpResponse, AuthResponse, CommonRes, DeleteMeReq, GetClaimsRes, GetUserIdentitiesRes, GetUserRes, LinkIdentityReq, LinkIdentityRes, OAuthResponse, OnAuthStateChangeCallback, ReauthenticateRes, ResendParams, ResendRes, ResetPasswordForEmailRes, ResetPasswordForOldReq, SetSessionReq, SignInAnonymouslyCredentials, SignInRes, SignInWithIdTokenReq, SignInWithOAuthCredentials, SignInWithPasswordCredentials, SignInWithPasswordlessCredentials, SignUpRes, UnlinkIdentityReq, UpdateUserWithVerificationRes, UserAttributes, UserResponse, VerifyOAuthReq, VerifyOAuthRes, VerifyOtpParams, GetAccessTokenRes } from './type';
|
|
9
|
+
export type { AuthResponse, AuthTokenResponsePassword, AuthOtpResponse, UserResponse, OAuthResponse, SignInRes, GetUserRes, CommonRes, SignInWithOtpRes, SignInOAuthRes, GetClaimsRes, ResetPasswordForEmailRes, GetUserIdentitiesRes, LinkIdentityRes, ReauthenticateRes, ResendRes, UpdateUserWithVerificationRes, OnAuthStateChangeCallback, SignInWithPasswordCredentials, SignInWithPasswordlessCredentials, SignUpWithPasswordCredentials, SignInWithOAuthCredentials, SignInAnonymouslyCredentials, VerifyOtpParams, ResendParams, UserAttributes, SignInWithPasswordReq, SignInWithIdTokenReq, SignInWithOAuthReq, VerifyOAuthReq, VerifyOtpReq, LinkIdentityReq, UnlinkIdentityReq, UpdateUserReq, SignInWithOtpReq, ResetPasswordForOldReq, ResendReq, SetSessionReq, DeleteMeReq, SignUpRes, GetAccessTokenRes, AuthResult, } from './type';
|
|
10
10
|
interface UserInfo {
|
|
11
11
|
uid?: string;
|
|
12
12
|
gender?: string;
|
|
@@ -88,7 +88,7 @@ declare class Auth extends AuthV1Compat {
|
|
|
88
88
|
private listeners;
|
|
89
89
|
private hasListenerSetUp;
|
|
90
90
|
constructor(config: IAuthConfig);
|
|
91
|
-
signInAnonymously(params:
|
|
91
|
+
signInAnonymously(params: SignInAnonymouslyCredentials): Promise<AuthResponse>;
|
|
92
92
|
signUp(params: authModels.SignUpRequest & {
|
|
93
93
|
phone?: string;
|
|
94
94
|
}): Promise<SignUpRes>;
|
|
@@ -105,39 +105,27 @@ declare class Auth extends AuthV1Compat {
|
|
|
105
105
|
};
|
|
106
106
|
};
|
|
107
107
|
};
|
|
108
|
-
signInWithPassword(params:
|
|
108
|
+
signInWithPassword(params: SignInWithPasswordCredentials): Promise<AuthResponse>;
|
|
109
109
|
signInWithIdToken(params: SignInWithIdTokenReq): Promise<SignInRes>;
|
|
110
|
-
signInWithOtp(params:
|
|
110
|
+
signInWithOtp(params: SignInWithPasswordlessCredentials): Promise<AuthOtpResponse>;
|
|
111
111
|
verifyOAuth(params?: VerifyOAuthReq): Promise<VerifyOAuthRes>;
|
|
112
|
-
signInWithOAuth(params:
|
|
112
|
+
signInWithOAuth(params: SignInWithOAuthCredentials): Promise<OAuthResponse>;
|
|
113
113
|
getClaims(): Promise<GetClaimsRes>;
|
|
114
114
|
resetPasswordForEmail(emailOrPhone: string, options?: {
|
|
115
115
|
redirectTo?: string;
|
|
116
116
|
}): Promise<ResetPasswordForEmailRes>;
|
|
117
|
-
resetPasswordForOld(params: ResetPasswordForOldReq): Promise<
|
|
118
|
-
|
|
119
|
-
user: import("./type").User;
|
|
120
|
-
session: import("./type").Session;
|
|
121
|
-
};
|
|
122
|
-
error: any;
|
|
123
|
-
} | {
|
|
124
|
-
data: {
|
|
125
|
-
user: any;
|
|
126
|
-
session: any;
|
|
127
|
-
};
|
|
128
|
-
error: AuthError;
|
|
129
|
-
}>;
|
|
130
|
-
verifyOtp(params: VerifyOtpReq): Promise<SignInRes>;
|
|
117
|
+
resetPasswordForOld(params: ResetPasswordForOldReq): Promise<SignInRes>;
|
|
118
|
+
verifyOtp(params: VerifyOtpParams): Promise<AuthResponse>;
|
|
131
119
|
getSession(): Promise<SignInRes>;
|
|
132
120
|
refreshSession(refresh_token?: string): Promise<SignInRes>;
|
|
133
121
|
getUser(isRefresh?: boolean): Promise<GetUserRes>;
|
|
134
122
|
refreshUser(): Promise<CommonRes>;
|
|
135
|
-
updateUser(params:
|
|
123
|
+
updateUser(params: UserAttributes): Promise<UserResponse | UpdateUserWithVerificationRes>;
|
|
136
124
|
getUserIdentities(): Promise<GetUserIdentitiesRes>;
|
|
137
125
|
linkIdentity(params: LinkIdentityReq): Promise<LinkIdentityRes>;
|
|
138
126
|
unlinkIdentity(params: UnlinkIdentityReq): Promise<CommonRes>;
|
|
139
127
|
reauthenticate(): Promise<ReauthenticateRes>;
|
|
140
|
-
resend(params:
|
|
128
|
+
resend(params: ResendParams): Promise<ResendRes>;
|
|
141
129
|
setSession(params: SetSessionReq): Promise<SignInRes>;
|
|
142
130
|
exchangeCodeForSession(): Promise<void>;
|
|
143
131
|
deleteUser(params: DeleteMeReq): Promise<CommonRes>;
|
|
@@ -187,17 +175,14 @@ declare class Auth extends AuthV1Compat {
|
|
|
187
175
|
setPassword(params: authModels.SetPasswordRequest): Promise<void>;
|
|
188
176
|
isUsernameRegistered(username: string): Promise<boolean>;
|
|
189
177
|
hasLoginState(): LoginState | null;
|
|
190
|
-
getLoginState(): Promise<LoginState>;
|
|
178
|
+
getLoginState(): Promise<LoginState | null>;
|
|
191
179
|
getUserInfo(): Promise<(authModels.UserInfo & Partial<User>) | null>;
|
|
192
180
|
getWedaUserInfo(): Promise<any>;
|
|
193
181
|
updateUserBasicInfo(params: authModels.ModifyUserBasicInfoRequest): Promise<void>;
|
|
194
182
|
getAuthHeader(): {};
|
|
195
183
|
bindWithProvider(params: authModels.BindWithProviderRequest): Promise<void>;
|
|
196
184
|
queryUser(queryObj: authModels.QueryUserProfileRequest): Promise<authModels.QueryUserProfileResponse>;
|
|
197
|
-
getAccessToken(): Promise<
|
|
198
|
-
accessToken: string;
|
|
199
|
-
env: string;
|
|
200
|
-
}>;
|
|
185
|
+
getAccessToken(): Promise<GetAccessTokenRes>;
|
|
201
186
|
grantProviderToken(params: authModels.GrantProviderTokenRequest): Promise<authModels.GrantProviderTokenResponse>;
|
|
202
187
|
patchProviderToken(params: authModels.PatchProviderTokenRequest): Promise<authModels.PatchProviderTokenResponse>;
|
|
203
188
|
signInWithProvider(params: authModels.SignInWithProviderRequest): Promise<LoginState>;
|