Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cloudbase/types

Package Overview
Dependencies
Maintainers
17
Versions
105
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.1.3-alpha.0 to 1.2.1-alpha.0

38

index.d.ts

@@ -23,28 +23,30 @@ import { CloudbaseAdapter, SDKAdapterInterface } from '@cloudbase/adapter-interface';

appSecret?: ICloudbaseAppSecret;
oauthClient?: any
appSign?: string;
debug?:boolean;
debug?: boolean;
}
// 可更新的配置字段
export type ICloudbaseUpgradedConfig = Pick<ICloudbaseConfig, 'persistence'|'region'|'debug'>;
export type ICloudbaseUpgradedConfig = Pick<ICloudbaseConfig, 'persistence' | 'region' | 'debug'>;
export interface ICloudbaseExtension {
name: string;
invoke(opts:any,app:ICloudbase):Promise<any>;
invoke(opts: any, app: ICloudbase): Promise<any>;
}
export interface ICloudbase{
config:ICloudbaseConfig;
platform:ICloudbasePlatformInfo;
cache:ICloudbaseCache;
request:ICloudbaseRequest;
localCache:ICloudbaseCache;
init(config: ICloudbaseConfig):ICloudbase;
updateConfig(config: ICloudbaseUpgradedConfig):void;
registerExtension(ext:ICloudbaseExtension):void;
invokeExtension(name:string,opts:any):Promise<any>;
useAdapters(adapters: CloudbaseAdapter|CloudbaseAdapter[]):void;
registerComponent(component:ICloudbaseComponent):void;
registerHook(hook:ICloudbaseHook):void;
registerVersion(version:string):void;
fire?(...args:any[]):void;
export interface ICloudbase {
config: ICloudbaseConfig;
platform: ICloudbasePlatformInfo;
cache: ICloudbaseCache;
request: ICloudbaseRequest;
oauthClient: any;
localCache: ICloudbaseCache;
init(config: ICloudbaseConfig): ICloudbase;
updateConfig(config: ICloudbaseUpgradedConfig): void;
registerExtension(ext: ICloudbaseExtension): void;
invokeExtension(name: string, opts: any): Promise<any>;
useAdapters(adapters: CloudbaseAdapter | CloudbaseAdapter[]): void;
registerComponent(component: ICloudbaseComponent): void;
registerHook(hook: ICloudbaseHook): void;
registerVersion(version: string): void;
fire?(...args: any[]): void;
}

@@ -51,0 +53,0 @@

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

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

},
"gitHead": "c406b2e966b705b12e552cc9a8ef569b732b1118"
"gitHead": "c462902b6702463670d27acb88ebccf93dbd51cd"
}

@@ -1,4 +0,7 @@

import { IRequestOptions, ResponseObject, IUploadRequestOptions } from '@cloudbase/adapter-interface';
import { ICloudbaseConfig,KV } from ".";
import {
IRequestOptions, IUploadRequestOptions, ResponseObject
} from '@cloudbase/adapter-interface';
import { ICloudbaseConfig, KV } from '.';
export interface IGetAccessTokenResult {

@@ -9,19 +12,18 @@ accessToken: string;

export type ICloudbaseRequestConfig = Pick<ICloudbaseConfig, 'env'|'region'|'timeout'|'appSecret'|'appSign'>;
export type ICloudbaseRequestConfig = Pick<ICloudbaseConfig, 'env' | 'region' | 'timeout' | 'appSecret' | 'appSign' | 'oauthClient'>;
export type IAppendedRequestInfo = {
export interface IAppendedRequestInfo {
data: KV<any>;
headers: KV<string>;
}
export interface IRequestBeforeHook {
(...args: any[]): IAppendedRequestInfo;
}
export type IRequestBeforeHook = (...args: any[]) => IAppendedRequestInfo;
export interface ICloudbaseRequest {
post(options: IRequestOptions): Promise<ResponseObject>;
upload(options: IUploadRequestOptions): Promise<ResponseObject>;
download(options: IRequestOptions): Promise<ResponseObject>;
refreshAccessToken(): Promise<IGetAccessTokenResult>;
getAccessToken(): Promise<IGetAccessTokenResult>;
request(action: string, params: KV<any>, options?: KV<any>): Promise<ResponseObject>;
send(action: string, data: KV<any>): Promise<any>;
fetch: (urlOrPath: string, init?: RequestInit) => Promise<Response>;
post: (options: IRequestOptions) => Promise<ResponseObject>;
upload: (options: IUploadRequestOptions) => Promise<ResponseObject>;
download: (options: IRequestOptions) => Promise<ResponseObject>;
refreshAccessToken: () => Promise<IGetAccessTokenResult>;
getAccessToken: () => Promise<IGetAccessTokenResult>;
request: (action: string, params: KV<any>, options?: KV<any>) => Promise<ResponseObject>;
send: (action: string, data: KV<any>) => Promise<any>;
}
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