@lcap/nasl
Version:
NetEase Application Specific Language
23 lines • 1.24 kB
TypeScript
import { Meta } from '@lcap/nasl-types';
export type Protocol = 'http' | 'file' | 'mock';
/** Nasl 当前版本 */
export declare const version: string;
export declare const config: Meta.NaslConfig;
/**
* 连接存储层
* 可以是远程服务,也可以是本地文件
* @param protocol 'http'表示远程服务,'file'表示本地文件
* @param basePath 基础路径。协议为'http'的示例如:'/proxy/file-storage'、'http://dogfood.lcap.163yun.com';协议为'file'的示例如:'./demo-app.json'、'/root/some/path/app123.json'
*/
export declare function connect(protocol: Protocol, basePath: string): Promise<void>;
export declare function connect(protocol: Protocol, basePath: string, cookie: string): Promise<void>;
export declare function connect(protocol: Protocol, basePath: string, username: string, password: string): Promise<void>;
/**
* 便捷登录,只支持普通登录
* @required 需要先配置好 config.baseURL
* @param username 用户名
* @param password 密码
*/
export declare function login(username: string, password: string): Promise<string>;
export declare const HTTP_TIMEOUT_ORIGIN_MESSAGE = "the local timeout is greater than the system timeout";
//# sourceMappingURL=config.d.ts.map