@glodon-aiot/agent-cli-sdk
Version:
aiot agent client js sdk
35 lines (34 loc) • 1.1 kB
TypeScript
export interface BotClientConfig {
debug?: boolean;
env?: Env;
applicationId?: string;
plugins?: AgentPluginMap;
apiRoot?: string;
loadRelatedQuesions?: boolean;
}
export interface AgentPluginRegistor {
[key: string]: Function;
}
export interface AgentPluginMap {
[pluginCode: string]: AgentPluginRegistor;
}
export type Env = 'dev' | 'test' | 'prod' | 'local';
export declare enum ApiUrl {
dev = "https://aiot-dev.glodon.com/api/cvforcepd",
test = "https://aiot-dev.glodon.com/api/cvforce",
prod = "https://copilot.glodon.com/api/cvforce",
local = "http://localhost:3000/api/cvforcepd"
}
export declare let configuration: {
debug: boolean;
env: string;
apiRoot: string;
applicationId: string;
plugins: AgentPluginMap;
loadRelatedQuesions: boolean;
};
/**
* 配置SDK,可以在SDK被使用前被调用,该方法被调用后将改变是否debug模式、是否测试环境等基本配置
* @param param {debug?: boolean; env?: 'dev' | 'test' | 'prod';}
*/
export declare function configure(param?: BotClientConfig): void;