@wizai/agent-sip-sdk 0.1.8-alpha → 0.1.9-alpha

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.
@@ -64,6 +64,7 @@ export interface IAgentStatus {
64
64
  sipServer: null;
65
65
  statusName: string;
66
66
  ticket: string;
67
+ locked?: boolean;
67
68
  }
68
69
  export type IAgentStatusResponse = Array<IAgentStatus>;
69
70
  export interface IGetAgentSettingParams {
@@ -4,6 +4,7 @@ import { IAgentSipSDKOptions, IAgentStatusParams, IInitType, IInitFnType, IAgent
4
4
  declare class AgentSipSDK {
5
5
  private sip;
6
6
  private api;
7
+ private isSipInit;
7
8
  private agentInfo;
8
9
  private initEvent;
9
10
  private agentEvent;
@@ -23,6 +24,7 @@ declare class AgentSipSDK {
23
24
  private resetSSE;
24
25
  private createSSEAndOpensips;
25
26
  private waitSIPRegistered;
27
+ private getAgentInfo;
26
28
  getAgentStatus(): Promise<IGetAgentStatus>;
27
29
  private onlineAgent;
28
30
  private offlineAgent;
@@ -47,7 +47,12 @@ interface IGetAgentStatusFailed {
47
47
  data: null;
48
48
  message: string;
49
49
  }
50
- export type IGetAgentStatus = IGetAgentStatusSuccess | IGetAgentStatusFailed;
50
+ interface IGetAgentStatusLocked {
51
+ code: ECode.LOCKED;
52
+ data: null;
53
+ message: string;
54
+ }
55
+ export type IGetAgentStatus = IGetAgentStatusSuccess | IGetAgentStatusFailed | IGetAgentStatusLocked;
51
56
  interface IGetAgentStatusListSuccess {
52
57
  code: ECode.SUCCESS;
53
58
  data: IAgentStatusListResponse;
@@ -72,7 +77,12 @@ interface ISwitchAgentStatusFailed {
72
77
  data: null;
73
78
  message: string;
74
79
  }
75
- export type ISwitchAgentStatus = ISwitchAgentStatusSuccess | ISwitchAgentStatusFailed;
80
+ interface ISwitchAgentStatusLocked {
81
+ code: ECode.LOCKED;
82
+ data: null;
83
+ message: string;
84
+ }
85
+ export type ISwitchAgentStatus = ISwitchAgentStatusSuccess | ISwitchAgentStatusFailed | ISwitchAgentStatusLocked;
76
86
  interface IOutboundCallSuccess {
77
87
  code: ECode.SUCCESS;
78
88
  data: IOutboundCallResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wizai/agent-sip-sdk",
3
- "version": "0.1.8-alpha",
3
+ "version": "0.1.9-alpha",
4
4
  "description": "Manages SIP clients and agent status, simplifying calls and events.",
5
5
  "main": "lib/agent-sip-sdk-cjs.js",
6
6
  "module": "lib/agent-sip-sdk-es.js",