@cloudbase/js-sdk 3.6.4-alpha.1 → 3.6.5-alpha.0
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/app/dist/index.esm.js +1 -1
- package/app/dist/index.js +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/database/dist/index.d.ts +3 -0
- package/database/dist/index.esm.js +2 -0
- package/database/dist/index.esm.js.map +1 -0
- package/database/dist/index.js +2 -0
- package/database/dist/index.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +1 -1
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.esm.js +1 -1
- package/dist/index.node.esm.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/package.json +17 -17
- 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 -1
- package/types/result.d.ts +48 -0
- package/types/storage.d.ts +21 -3
- package/utilities/package.json +2 -2
- package/database/dist/commonjs/aggregate.d.ts +0 -29
- package/database/dist/commonjs/aggregate.js +0 -156
- package/database/dist/commonjs/collection.d.ts +0 -9
- package/database/dist/commonjs/collection.js +0 -49
- package/database/dist/commonjs/command.d.ts +0 -175
- package/database/dist/commonjs/command.js +0 -299
- package/database/dist/commonjs/commands/logic.d.ts +0 -24
- package/database/dist/commonjs/commands/logic.js +0 -89
- package/database/dist/commonjs/commands/query.d.ts +0 -68
- package/database/dist/commonjs/commands/query.js +0 -160
- package/database/dist/commonjs/commands/update.d.ts +0 -29
- package/database/dist/commonjs/commands/update.js +0 -51
- package/database/dist/commonjs/config/app.config.d.ts +0 -6
- package/database/dist/commonjs/config/app.config.js +0 -7
- package/database/dist/commonjs/config/error.config.d.ts +0 -3
- package/database/dist/commonjs/config/error.config.js +0 -16
- package/database/dist/commonjs/const/code.d.ts +0 -30
- package/database/dist/commonjs/const/code.js +0 -33
- package/database/dist/commonjs/constant.d.ts +0 -51
- package/database/dist/commonjs/constant.js +0 -75
- package/database/dist/commonjs/document.d.ts +0 -11
- package/database/dist/commonjs/document.js +0 -260
- package/database/dist/commonjs/geo/index.d.ts +0 -6
- package/database/dist/commonjs/geo/index.js +0 -22
- package/database/dist/commonjs/geo/interface.d.ts +0 -24
- package/database/dist/commonjs/geo/interface.js +0 -2
- package/database/dist/commonjs/geo/lineString.d.ts +0 -19
- package/database/dist/commonjs/geo/lineString.js +0 -86
- package/database/dist/commonjs/geo/multiLineString.d.ts +0 -18
- package/database/dist/commonjs/geo/multiLineString.js +0 -95
- package/database/dist/commonjs/geo/multiPoint.d.ts +0 -18
- package/database/dist/commonjs/geo/multiPoint.js +0 -79
- package/database/dist/commonjs/geo/multiPolygon.d.ts +0 -18
- package/database/dist/commonjs/geo/multiPolygon.js +0 -122
- package/database/dist/commonjs/geo/point.d.ts +0 -19
- package/database/dist/commonjs/geo/point.js +0 -50
- package/database/dist/commonjs/geo/polygon.d.ts +0 -19
- package/database/dist/commonjs/geo/polygon.js +0 -109
- package/database/dist/commonjs/helper/symbol.d.ts +0 -14
- package/database/dist/commonjs/helper/symbol.js +0 -31
- package/database/dist/commonjs/index.d.ts +0 -40
- package/database/dist/commonjs/index.js +0 -61
- package/database/dist/commonjs/lib/util.d.ts +0 -1
- package/database/dist/commonjs/lib/util.js +0 -26
- package/database/dist/commonjs/operator-map.d.ts +0 -4
- package/database/dist/commonjs/operator-map.js +0 -24
- package/database/dist/commonjs/query.d.ts +0 -22
- package/database/dist/commonjs/query.js +0 -252
- package/database/dist/commonjs/regexp/index.d.ts +0 -14
- package/database/dist/commonjs/regexp/index.js +0 -33
- package/database/dist/commonjs/serializer/common.d.ts +0 -11
- package/database/dist/commonjs/serializer/common.js +0 -127
- package/database/dist/commonjs/serializer/datatype.d.ts +0 -7
- package/database/dist/commonjs/serializer/datatype.js +0 -132
- package/database/dist/commonjs/serializer/query.d.ts +0 -7
- package/database/dist/commonjs/serializer/query.js +0 -232
- package/database/dist/commonjs/serializer/update.d.ts +0 -15
- package/database/dist/commonjs/serializer/update.js +0 -142
- package/database/dist/commonjs/serverDate/index.d.ts +0 -13
- package/database/dist/commonjs/serverDate/index.js +0 -30
- package/database/dist/commonjs/transaction/collection.d.ts +0 -7
- package/database/dist/commonjs/transaction/collection.js +0 -49
- package/database/dist/commonjs/transaction/document.d.ts +0 -27
- package/database/dist/commonjs/transaction/document.js +0 -205
- package/database/dist/commonjs/transaction/index.d.ts +0 -30
- package/database/dist/commonjs/transaction/index.js +0 -215
- package/database/dist/commonjs/transaction/query.d.ts +0 -43
- package/database/dist/commonjs/transaction/query.js +0 -261
- package/database/dist/commonjs/typings/index.d.ts +0 -40
- package/database/dist/commonjs/typings/index.js +0 -2
- package/database/dist/commonjs/typings/realtime.d.ts +0 -219
- package/database/dist/commonjs/typings/realtime.js +0 -2
- package/database/dist/commonjs/util.d.ts +0 -9
- package/database/dist/commonjs/util.js +0 -145
- package/database/dist/commonjs/utils/error.d.ts +0 -38
- package/database/dist/commonjs/utils/error.js +0 -91
- package/database/dist/commonjs/utils/msg.d.ts +0 -0
- package/database/dist/commonjs/utils/msg.js +0 -0
- package/database/dist/commonjs/utils/symbol.d.ts +0 -8
- package/database/dist/commonjs/utils/symbol.js +0 -58
- package/database/dist/commonjs/utils/type.d.ts +0 -13
- package/database/dist/commonjs/utils/type.js +0 -34
- package/database/dist/commonjs/utils/utils.d.ts +0 -4
- package/database/dist/commonjs/utils/utils.js +0 -39
- package/database/dist/commonjs/validate.d.ts +0 -1
- package/database/dist/commonjs/validate.js +0 -60
- package/database/dist/esm/aggregate.d.ts +0 -29
- package/database/dist/esm/aggregate.js +0 -154
- package/database/dist/esm/collection.d.ts +0 -9
- package/database/dist/esm/collection.js +0 -46
- package/database/dist/esm/command.d.ts +0 -175
- package/database/dist/esm/command.js +0 -296
- package/database/dist/esm/commands/logic.d.ts +0 -24
- package/database/dist/esm/commands/logic.js +0 -84
- package/database/dist/esm/commands/query.d.ts +0 -68
- package/database/dist/esm/commands/query.js +0 -154
- package/database/dist/esm/commands/update.d.ts +0 -29
- package/database/dist/esm/commands/update.js +0 -46
- package/database/dist/esm/config/app.config.d.ts +0 -6
- package/database/dist/esm/config/app.config.js +0 -5
- package/database/dist/esm/config/error.config.d.ts +0 -3
- package/database/dist/esm/config/error.config.js +0 -13
- package/database/dist/esm/const/code.d.ts +0 -30
- package/database/dist/esm/const/code.js +0 -30
- package/database/dist/esm/constant.d.ts +0 -51
- package/database/dist/esm/constant.js +0 -65
- package/database/dist/esm/document.d.ts +0 -11
- package/database/dist/esm/document.js +0 -257
- package/database/dist/esm/geo/index.d.ts +0 -6
- package/database/dist/esm/geo/index.js +0 -6
- package/database/dist/esm/geo/interface.d.ts +0 -24
- package/database/dist/esm/geo/interface.js +0 -1
- package/database/dist/esm/geo/lineString.d.ts +0 -19
- package/database/dist/esm/geo/lineString.js +0 -83
- package/database/dist/esm/geo/multiLineString.d.ts +0 -18
- package/database/dist/esm/geo/multiLineString.js +0 -92
- package/database/dist/esm/geo/multiPoint.d.ts +0 -18
- package/database/dist/esm/geo/multiPoint.js +0 -76
- package/database/dist/esm/geo/multiPolygon.d.ts +0 -18
- package/database/dist/esm/geo/multiPolygon.js +0 -119
- package/database/dist/esm/geo/point.d.ts +0 -19
- package/database/dist/esm/geo/point.js +0 -47
- package/database/dist/esm/geo/polygon.d.ts +0 -19
- package/database/dist/esm/geo/polygon.js +0 -106
- package/database/dist/esm/helper/symbol.d.ts +0 -14
- package/database/dist/esm/helper/symbol.js +0 -14
- package/database/dist/esm/index.d.ts +0 -40
- package/database/dist/esm/index.js +0 -55
- package/database/dist/esm/lib/util.d.ts +0 -1
- package/database/dist/esm/lib/util.js +0 -22
- package/database/dist/esm/operator-map.d.ts +0 -4
- package/database/dist/esm/operator-map.js +0 -20
- package/database/dist/esm/query.d.ts +0 -22
- package/database/dist/esm/query.js +0 -249
- package/database/dist/esm/regexp/index.d.ts +0 -14
- package/database/dist/esm/regexp/index.js +0 -29
- package/database/dist/esm/serializer/common.d.ts +0 -11
- package/database/dist/esm/serializer/common.js +0 -118
- package/database/dist/esm/serializer/datatype.d.ts +0 -7
- package/database/dist/esm/serializer/datatype.js +0 -127
- package/database/dist/esm/serializer/query.d.ts +0 -7
- package/database/dist/esm/serializer/query.js +0 -229
- package/database/dist/esm/serializer/update.d.ts +0 -15
- package/database/dist/esm/serializer/update.js +0 -139
- package/database/dist/esm/serverDate/index.d.ts +0 -13
- package/database/dist/esm/serverDate/index.js +0 -26
- package/database/dist/esm/transaction/collection.d.ts +0 -7
- package/database/dist/esm/transaction/collection.js +0 -46
- package/database/dist/esm/transaction/document.d.ts +0 -27
- package/database/dist/esm/transaction/document.js +0 -202
- package/database/dist/esm/transaction/index.d.ts +0 -30
- package/database/dist/esm/transaction/index.js +0 -210
- package/database/dist/esm/transaction/query.d.ts +0 -43
- package/database/dist/esm/transaction/query.js +0 -258
- package/database/dist/esm/typings/index.d.ts +0 -40
- package/database/dist/esm/typings/index.js +0 -1
- package/database/dist/esm/typings/realtime.d.ts +0 -219
- package/database/dist/esm/typings/realtime.js +0 -1
- package/database/dist/esm/util.d.ts +0 -9
- package/database/dist/esm/util.js +0 -142
- package/database/dist/esm/utils/error.d.ts +0 -38
- package/database/dist/esm/utils/error.js +0 -84
- package/database/dist/esm/utils/msg.d.ts +0 -0
- package/database/dist/esm/utils/msg.js +0 -0
- package/database/dist/esm/utils/symbol.d.ts +0 -8
- package/database/dist/esm/utils/symbol.js +0 -55
- package/database/dist/esm/utils/type.d.ts +0 -13
- package/database/dist/esm/utils/type.js +0 -20
- package/database/dist/esm/utils/utils.d.ts +0 -4
- package/database/dist/esm/utils/utils.js +0 -33
- package/database/dist/esm/validate.d.ts +0 -1
- package/database/dist/esm/validate.js +0 -57
|
@@ -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>;
|