ysyt-agent-sdk 2.0.27 → 2.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,6 +67,7 @@ export type ActionType = 'call_number' | 'answer' | 'reject' | 'hangup' | 'dtmf'
67
67
  export type ActionConfigsType = Array<ActionType>;
68
68
  export interface AgentObjectType {
69
69
  agent_id: number;
70
+ app_id: string;
70
71
  agent_no: string;
71
72
  state: 0 | 1;
72
73
  agent_name: string;
@@ -40,3 +40,7 @@ export declare const earSpeak: (params: ListenAgentCallType) => Promise<any>;
40
40
  export declare const stopEarSpeak: (params: ListenAgentCallType) => Promise<any>;
41
41
  export declare const bargeinSpeak: (params: ListenAgentCallType) => Promise<any>;
42
42
  export declare const interceptSpeak: (params: ListenAgentCallType) => Promise<any>;
43
+ export declare const reportLog: (params: {
44
+ agent_no: string;
45
+ content: string;
46
+ }) => Promise<any>;
@@ -0,0 +1,29 @@
1
+ type LogLevel = 'debug' | 'info' | 'warn' | 'error';
2
+ interface LogOptions {
3
+ level?: LogLevel;
4
+ module?: string;
5
+ timestamp?: boolean;
6
+ }
7
+ declare class ReportLog {
8
+ /**
9
+ * 基础日志上报
10
+ * @param content 日志内容
11
+ * @param options 可选配置
12
+ */
13
+ static log(content: string, options?: LogOptions): void;
14
+ /** 调试级别日志 */
15
+ static debug(content: string, module?: string): void;
16
+ /** 信息级别日志 */
17
+ static info(content: string, module?: string): void;
18
+ /** 警告级别日志 */
19
+ static warn(content: string, module?: string): void;
20
+ /** 错误级别日志 */
21
+ static error(content: string, module?: string): void;
22
+ /**
23
+ * 上报错误对象
24
+ * @param error 错误对象
25
+ * @param module 模块名
26
+ */
27
+ static errorObj(error: Error, module?: string): void;
28
+ }
29
+ export default ReportLog;