ysyt-agent-sdk 1.0.70 → 1.0.72

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.
@@ -13,8 +13,9 @@ declare class YSYTAgentSdk {
13
13
  * @param appSecret
14
14
  * @param agentNo 坐席工号
15
15
  * @param enableBrowserAlert 是否开启浏览器通知
16
+ * @param logBuiltinEnabled 是否开启日志
16
17
  */
17
- init({ actionNodeParams, url, appKey, appSecret, agentNo, enableBrowserAlert }: InitInfoType): Promise<void>;
18
+ init({ actionNodeParams, url, appKey, appSecret, agentNo, enableBrowserAlert, logBuiltinEnabled, }: InitInfoType): Promise<void>;
18
19
  on<K extends keyof Events>(event: K, handler: (data: Events[K]) => void): this;
19
20
  off<K extends keyof Events>(event: K, listener: (msg: Events[K]) => void): void;
20
21
  offAll(): void;
@@ -48,6 +49,9 @@ declare class YSYTAgentSdk {
48
49
  }>) => Promise<void>;
49
50
  getIdleAgentList: (params: RequestBodyType<unknown, AgentItemType[]>) => Promise<void>;
50
51
  getAgentState: (params: RequestBodyType<unknown, AgentStateDataType>) => Promise<void>;
52
+ setAgentExplicit: (params: RequestBodyType<{
53
+ number: string;
54
+ }>) => Promise<void>;
51
55
  };
52
56
  getAgentData(): AgentDataType;
53
57
  }
@@ -6,6 +6,7 @@ type InternalState = {
6
6
  sessionId: string;
7
7
  enableBrowserAlert: boolean;
8
8
  autoStateTimer: any;
9
+ logBuiltinEnabled: boolean;
9
10
  stateObject?: {
10
11
  state: AgentStatus;
11
12
  state_name: string;
@@ -40,6 +40,7 @@ export interface InitInfoType {
40
40
  appSecret: string;
41
41
  agentNo: string;
42
42
  enableBrowserAlert?: boolean;
43
+ logBuiltinEnabled?: boolean;
43
44
  actionNodeParams?: {
44
45
  viewHtmlElement?: HTMLElement;
45
46
  rttHTML?: HTMLElement;
@@ -0,0 +1,9 @@
1
+ type LogFunction = (...args: unknown[]) => void;
2
+ interface Logger {
3
+ log: LogFunction;
4
+ info: LogFunction;
5
+ warn: LogFunction;
6
+ error: LogFunction;
7
+ }
8
+ declare const logger: Logger;
9
+ export default logger;