Socket
Socket
Sign inDemoInstall

@cloudbase/types

Package Overview
Dependencies
Maintainers
17
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 1.2.2-alpha.0 to 1.2.3-alpha.0

44

auth.d.ts
import { ICloudbaseConfig, KV, ICloudbase } from '.';
export type ICloudbaseAuthConfig = Pick<ICloudbaseConfig,'env'|'region'|'persistence'|'debug'>;
export type ICloudbaseAuthConfig = Pick<ICloudbaseConfig, 'env' | 'region' | 'persistence' | 'debug' | '_fromApp'>;

@@ -15,3 +15,3 @@ export interface IAccessTokenInfo {

export interface IAuthProvider {
signInWithRedirect():any;
signInWithRedirect(): any;
}

@@ -41,12 +41,12 @@ export interface IUserInfo {

}
export interface IUser extends IUserInfo{
export interface IUser extends IUserInfo {
checkLocalInfo(): void;
checkLocalInfoAsync(): Promise<void>;
linkWithTicket(ticket:string): Promise<void>;
linkWithRedirect(provider:IAuthProvider):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>;
setPrimaryUid(uid: string): Promise<void>;
unlink(loginType: 'CUSTOM' | 'WECHAT-OPEN' | 'WECHAT-PUBLIC' | 'WECHAT-UNION'): Promise<void>;
update(userinfo: IUserInfo): Promise<void>;
refresh(): Promise<IUserInfo>;
}

@@ -63,4 +63,4 @@ export interface ILoginState {

export interface ICloudbaseAuth {
config:ICloudbaseConfig;
loginType:string;
config: ICloudbaseConfig;
loginType: string;
weixinAuthProvider: any;

@@ -70,19 +70,19 @@ anonymousAuthProvider: any;

getAccessToken(): IAccessTokenInfo;
getLoginState(): Promise<ILoginState|null>;
hasLoginState(): Promise<ILoginState|null>;
getLoginState(): Promise<ILoginState | null>;
hasLoginState(): Promise<ILoginState | null>;
getUserInfo(): Promise<any>;
getAuthHeader(): Promise<KV<string>>;
onLoginStateChanged(callback:Function):void;
onLoginStateExpired(callback: Function):void;
onAccessTokenRefreshed(callback: Function):void;
onAnonymousConverted(callback: Function):void;
onLoginTypeChanged(callback: Function):void;
shouldRefreshAccessToken(hook:Function):void;
onLoginStateChanged(callback: Function): void;
onLoginStateExpired(callback: Function): void;
onAccessTokenRefreshed(callback: Function): void;
onAnonymousConverted(callback: Function): void;
onLoginTypeChanged(callback: Function): void;
shouldRefreshAccessToken(hook: Function): void;
}
type IProvider = new(...args:any[]) => any;
type IProvider = new (...args: any[]) => any;
export interface ICloudbaseAuthModule {
registerAuth(app:ICloudbase):void,
registerProvider(name:string,provider:IProvider):void;
registerAuth(app: ICloudbase): void,
registerProvider(name: string, provider: IProvider): void;
}

@@ -5,2 +5,3 @@ import { CloudbaseAdapter, SDKAdapterInterface } from '@cloudbase/adapter-interface';

import { ICloudbaseCache } from "./cache";
import { ICloudbaseAuth } from './auth'

@@ -27,2 +28,3 @@ export type Persistence = 'local' | 'session' | 'none';

debug?: boolean;
_fromApp?: ICloudbase
}

@@ -44,2 +46,4 @@ // 可更新的配置字段

localCache: ICloudbaseCache;
authInstance?: ICloudbaseAuth;
oauthInstance?: any;
init(config: ICloudbaseConfig): ICloudbase;

@@ -46,0 +50,0 @@ updateConfig(config: ICloudbaseUpgradedConfig): void;

{
"name": "@cloudbase/types",
"version": "1.2.2-alpha.0",
"version": "1.2.3-alpha.0",
"description": "cloudbase javascript sdk types",

@@ -48,3 +48,3 @@ "files": [

},
"gitHead": "d158e30a395d8fcd6b7c7e78a66006b194a3eddb"
"gitHead": "eb161dd3c79b90a95a877984bf7c07cdb4563077"
}

@@ -12,3 +12,3 @@ import {

export type ICloudbaseRequestConfig = Pick<ICloudbaseConfig, 'env' | 'region' | 'timeout' | 'appSecret' | 'appSign' | 'oauthClient'>;
export type ICloudbaseRequestConfig = Pick<ICloudbaseConfig, 'env' | 'region' | 'timeout' | 'appSecret' | 'appSign' | 'oauthClient' | '_fromApp'>;

@@ -15,0 +15,0 @@ export interface IAppendedRequestInfo {

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