Socket
Socket
Sign inDemoInstall

@cloudbase/types

Package Overview
Dependencies
Maintainers
10
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudbase/types - npm Package Compare versions

Comparing version 0.1.0-beta.5 to 0.1.0-beta.6

56

auth.d.ts

@@ -9,10 +9,50 @@ import { ICloudbaseConfig, KV } from '.';

}
export interface ILoginStateInfo {
isAnonymous?: boolean;
credential: {
refreshToken: string;
accessToken?: string;
export interface ICredential {
refreshToken: string;
accessToken?: string;
accessTokenExpire?: string;
}
export interface IAuthProvider {
signInWithRedirect():any;
}
export interface IUserInfo {
uid: string;
loginType: string;
openid: string;
wxOpenId: string;
wxPublicId: string;
unionId: string;
qqMiniOpenId: string;
customUserId: string;
nickName: string;
gender: string;
avatarUrl: string;
location?: {
country?: string;
province?: string;
city?: string;
};
country?: string;
province?: string;
city?: string;
}
export interface IUser extends IUserInfo{
checkLocalInfo(): void;
checkLocalInfoAsync(): Promise<void>;
linkWithTicket(ticket:string): Promise<void>;
linkWithRedirect(provider:IAuthProvider):void;
getLinkedUidList(): Promise<{ hasPrimaryUid: boolean, users: IUserInfo[] }>;
setPrimaryUid(uid:string):Promise<void>;
unlink(loginType: 'CUSTOM'| 'WECHAT-OPEN' | 'WECHAT-PUBLIC' | 'WECHAT-UNION'):Promise<void>;
update(userinfo:IUserInfo):Promise<void>;
refresh():Promise<IUserInfo>;
}
export interface ILoginState {
credential: ICredential;
user: IUser;
isAnonymousAuth: boolean;
isCustomAuth: boolean;
isWeixinAuth: boolean;
loginType: string;
}
export interface ICloudbaseAuth {

@@ -25,4 +65,4 @@ config:ICloudbaseConfig;

getAccessToken(): IAccessTokenInfo;
getLoginState(): Promise<ILoginStateInfo|null>;
hasLoginState(): Promise<ILoginStateInfo|null>;
getLoginState(): Promise<ILoginState|null>;
hasLoginState(): Promise<ILoginState|null>;
getUserInfo(): Promise<any>;

@@ -29,0 +69,0 @@ getAuthHeader(): Promise<KV<string>>;

8

cache.d.ts

@@ -13,7 +13,7 @@ import { ICloudbasePlatformInfo, KV,ICloudbaseConfig } from ".";

setStore(key: string, value: string, version?: string):void;
setStoreAsync(key: string, value: string, version?: string):Promise<void>;
setStore(key: string, value: any, version?: string):void;
setStoreAsync(key: string, value: any, version?: string):Promise<void>;
getStore(key: string, version?: string):string;
getStoreAsync(key: string, version?: string):Promise<string>;
getStore(key: string, version?: string):any;
getStoreAsync(key: string, version?: string):Promise<any>;

@@ -20,0 +20,0 @@ removeStore(key:string):void;

{
"name": "@cloudbase/types",
"version": "0.1.0-beta.5",
"version": "0.1.0-beta.6",
"description": "cloudbase javascript sdk types",

@@ -5,0 +5,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc