@wizai/agent-sip-sdk 0.1.11-alpha → 0.1.13-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.
@@ -24,7 +24,7 @@ declare class Api {
24
24
  updateAgentHangup(agentId: number): Promise<IGetAgentSettingResponse>;
25
25
  updateAgentTicket(data: IUpdateAgentTicketParams): Promise<IRespones<any>>;
26
26
  registerSSE(data: IRegisterSSEParams): Promise<unknown>;
27
- closeSSE(data: ICloseSSEParams): Promise<void>;
27
+ closeSSE(data: ICloseSSEParams): Promise<IRespones<any> | undefined>;
28
28
  switchAgentStatus(data: ISwitchAgentStatusParams): Promise<IRespones<IAgentStatusResponse>>;
29
29
  outboundCall(data: IOutboundCallParams): Promise<IRespones<IOutboundCallResponse>>;
30
30
  saveAgentResponseTime(data: IAgentResponseTimeParams): Promise<IRespones<any>>;
@@ -15,5 +15,6 @@ export declare enum ECode {
15
15
  LOCKED = 423,
16
16
  SYSTEMBUSY = 450,
17
17
  FAILED = 500,
18
- NOENOUGNCHARACTER = 10001
18
+ NOENOUGNCHARACTER = 10001,
19
+ MIC_PERMISSION_DENIED = 10010
19
20
  }
@@ -24,6 +24,7 @@ declare class AgentSipSDK {
24
24
  private processSSEMessage;
25
25
  private resetSSE;
26
26
  private createSSEAndOpensips;
27
+ private closeSSEAndOpensips;
27
28
  private waitSIPRegistered;
28
29
  private getAgentInfo;
29
30
  getAgentStatus(): Promise<IGetAgentStatus>;
@@ -28,7 +28,7 @@ declare class SIP {
28
28
  *
29
29
  * @memberof AgentSipClient
30
30
  */
31
- initMicrophone(): void;
31
+ initMicrophone(): Promise<boolean>;
32
32
  destroyMicrophone(): void;
33
33
  reset(): void;
34
34
  setCallType(type: 'inboundCall' | 'outboundCall' | ''): void;
@@ -38,7 +38,7 @@ declare class SIP {
38
38
  password: string;
39
39
  uri: string;
40
40
  }): Promise<void>;
41
- start(): void;
41
+ start(): Promise<boolean>;
42
42
  stop(isManualStop?: boolean): void;
43
43
  destroy(): void;
44
44
  getSocketWS(): any;
@@ -82,7 +82,12 @@ interface ISwitchAgentStatusLocked {
82
82
  data: null;
83
83
  message: string;
84
84
  }
85
- export type ISwitchAgentStatus = ISwitchAgentStatusSuccess | ISwitchAgentStatusFailed | ISwitchAgentStatusLocked;
85
+ interface ISwitchAgentStatusMicPermissionDenied {
86
+ code: ECode.MIC_PERMISSION_DENIED;
87
+ data: null;
88
+ message: string;
89
+ }
90
+ export type ISwitchAgentStatus = ISwitchAgentStatusSuccess | ISwitchAgentStatusFailed | ISwitchAgentStatusLocked | ISwitchAgentStatusMicPermissionDenied;
86
91
  interface IOutboundCallSuccess {
87
92
  code: ECode.SUCCESS;
88
93
  data: IOutboundCallResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wizai/agent-sip-sdk",
3
- "version": "0.1.11-alpha",
3
+ "version": "0.1.13-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",