@wizai/agent-sip-sdk 0.1.14-alpha → 0.1.16-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.
@@ -23,6 +23,7 @@ declare class Api {
23
23
  getAgentSetting(params: IGetAgentSettingParams): Promise<IGetAgentSettingResponse>;
24
24
  updateAgentHangup(agentId: number): Promise<IGetAgentSettingResponse>;
25
25
  updateAgentTicket(data: IUpdateAgentTicketParams): Promise<IRespones<any>>;
26
+ sendSSEACK(agentId: number): Promise<any>;
26
27
  registerSSE(data: IRegisterSSEParams): Promise<unknown>;
27
28
  closeSSE(data: ICloseSSEParams): Promise<IRespones<any> | undefined>;
28
29
  switchAgentStatus(data: ISwitchAgentStatusParams): Promise<IRespones<IAgentStatusResponse>>;
@@ -45,5 +46,6 @@ declare class Api {
45
46
  private request;
46
47
  private executePeriodically;
47
48
  static getInstance(options?: IApiProps): Api;
49
+ heartbeat(): Promise<IRespones<Boolean>>;
48
50
  }
49
51
  export default Api;
@@ -16,6 +16,9 @@ declare class AgentSipSDK {
16
16
  private unloadingHandled;
17
17
  private baseUrl;
18
18
  private autoFinishACWTimer;
19
+ private heartbeatTimer;
20
+ private heartbeatFailCount;
21
+ private isHeartbeatRunning;
19
22
  constructor(props: IAgentSipSDKOptions);
20
23
  private init;
21
24
  getAgentStatusList(): Promise<IGetAgentStatusList>;
@@ -30,6 +33,9 @@ declare class AgentSipSDK {
30
33
  getAgentStatus(): Promise<IGetAgentStatus>;
31
34
  private onlineAgent;
32
35
  private offlineAgent;
36
+ private startHeartbeat;
37
+ private stopHeartbeat;
38
+ private executeHeartbeat;
33
39
  switchAgentStatus(data: IAgentStatusParams): Promise<ISwitchAgentStatus>;
34
40
  outboundCall(phoneNumber: string): Promise<IOutboundCall>;
35
41
  private autoFinishACW;
package/package.json CHANGED
@@ -1,53 +1,53 @@
1
- {
2
- "name": "@wizai/agent-sip-sdk",
3
- "version": "0.1.14-alpha",
4
- "description": "Manages SIP clients and agent status, simplifying calls and events.",
5
- "main": "lib/agent-sip-sdk-cjs.js",
6
- "module": "lib/agent-sip-sdk-es.js",
7
- "types": "lib/types/index.d.ts",
8
- "type": "module",
9
- "files": [
10
- "lib/"
11
- ],
12
- "scripts": {
13
- "test": "node test/index.js",
14
- "jest": "jest",
15
- "lint": "eslint --fix",
16
- "build": "rollup -c"
17
- },
18
- "keywords": [
19
- "sip",
20
- "agent",
21
- "sdk"
22
- ],
23
- "author": "Yuki Xie",
24
- "license": "ISC",
25
- "devDependencies": {
26
- "@eslint/js": "^9.6.0",
27
- "@rollup/plugin-alias": "^5.1.1",
28
- "@rollup/plugin-commonjs": "^26.0.1",
29
- "@rollup/plugin-json": "^6.1.0",
30
- "@rollup/plugin-node-resolve": "^15.2.3",
31
- "@rollup/plugin-terser": "^0.4.4",
32
- "@rollup/plugin-typescript": "^11.1.6",
33
- "@rollup/plugin-url": "^8.0.2",
34
- "@types/event-source-polyfill": "^1.0.5",
35
- "@types/jest": "^29.5.12",
36
- "@types/node": "^22.7.8",
37
- "eslint": "^9.6.0",
38
- "globals": "^15.8.0",
39
- "jest": "^29.7.0",
40
- "rollup": "^4.18.0",
41
- "rollup-plugin-polyfill-node": "^0.13.0",
42
- "ts-jest": "^29.2.2",
43
- "tslib": "^2.6.3",
44
- "typescript": "^5.5.2",
45
- "typescript-eslint": "^7.16.0"
46
- },
47
- "dependencies": {
48
- "dayjs": "^1.11.18",
49
- "event-source-polyfill": "^1.0.31",
50
- "jssip": "^3.10.1",
51
- "nanoid": "^5.0.8"
52
- }
53
- }
1
+ {
2
+ "name": "@wizai/agent-sip-sdk",
3
+ "version": "0.1.16-alpha",
4
+ "description": "Manages SIP clients and agent status, simplifying calls and events.",
5
+ "main": "lib/agent-sip-sdk-cjs.js",
6
+ "module": "lib/agent-sip-sdk-es.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "type": "module",
9
+ "files": [
10
+ "lib/"
11
+ ],
12
+ "scripts": {
13
+ "test": "node test/index.js",
14
+ "jest": "jest",
15
+ "lint": "eslint --fix",
16
+ "build": "rollup -c"
17
+ },
18
+ "keywords": [
19
+ "sip",
20
+ "agent",
21
+ "sdk"
22
+ ],
23
+ "author": "Yuki Xie",
24
+ "license": "ISC",
25
+ "devDependencies": {
26
+ "@eslint/js": "^9.6.0",
27
+ "@rollup/plugin-alias": "^5.1.1",
28
+ "@rollup/plugin-commonjs": "^26.0.1",
29
+ "@rollup/plugin-json": "^6.1.0",
30
+ "@rollup/plugin-node-resolve": "^15.2.3",
31
+ "@rollup/plugin-terser": "^0.4.4",
32
+ "@rollup/plugin-typescript": "^11.1.6",
33
+ "@rollup/plugin-url": "^8.0.2",
34
+ "@types/event-source-polyfill": "^1.0.5",
35
+ "@types/jest": "^29.5.12",
36
+ "@types/node": "^22.7.8",
37
+ "eslint": "^9.6.0",
38
+ "globals": "^15.8.0",
39
+ "jest": "^29.7.0",
40
+ "rollup": "^4.18.0",
41
+ "rollup-plugin-polyfill-node": "^0.13.0",
42
+ "ts-jest": "^29.2.2",
43
+ "tslib": "^2.6.3",
44
+ "typescript": "^5.5.2",
45
+ "typescript-eslint": "^7.16.0"
46
+ },
47
+ "dependencies": {
48
+ "dayjs": "^1.11.18",
49
+ "event-source-polyfill": "^1.0.31",
50
+ "jssip": "^3.10.1",
51
+ "nanoid": "^5.0.8"
52
+ }
53
+ }