@exotel-npm-dev/exotel-ai-assist 1.1.8 → 1.2.0

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.
@@ -1538,7 +1538,7 @@ class Utils {
1538
1538
  * @returns The base WebSocket URL.
1539
1539
  */
1540
1540
  static getWssBaseUrl(accountId) {
1541
- return `ws://localhost:3456/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
1541
+ return `wss://aiassist-uat.in.exotel.com/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
1542
1542
  }
1543
1543
  /**
1544
1544
  * Builds a WebSocket URL from the given parameters.
@@ -1685,7 +1685,8 @@ class ExotelAIAssistController extends EventEmitter {
1685
1685
  break;
1686
1686
  case "DISCONNECTED":
1687
1687
  if (this.connectionEstablished) {
1688
- if (this.readyFired) {
1688
+ const wasThrottled = this._streamState === "throttled";
1689
+ if (this.readyFired && !wasThrottled) {
1689
1690
  this.readyFired = false;
1690
1691
  this.emit("onReady", false);
1691
1692
  }
package/dist/index.js CHANGED
@@ -20956,7 +20956,7 @@ class Utils {
20956
20956
  * @returns The base WebSocket URL.
20957
20957
  */
20958
20958
  static getWssBaseUrl(accountId) {
20959
- return `ws://localhost:3456/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
20959
+ return `wss://aiassist-uat.in.exotel.com/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
20960
20960
  }
20961
20961
  /**
20962
20962
  * Builds a WebSocket URL from the given parameters.
@@ -21103,7 +21103,8 @@ class ExotelAIAssistController extends EventEmitter {
21103
21103
  break;
21104
21104
  case "DISCONNECTED":
21105
21105
  if (this.connectionEstablished) {
21106
- if (this.readyFired) {
21106
+ const wasThrottled = this._streamState === "throttled";
21107
+ if (this.readyFired && !wasThrottled) {
21107
21108
  this.readyFired = false;
21108
21109
  this.emit("onReady", false);
21109
21110
  }
@@ -6242,7 +6242,7 @@ class Utils {
6242
6242
  * @returns The base WebSocket URL.
6243
6243
  */
6244
6244
  static getWssBaseUrl(accountId) {
6245
- return `ws://localhost:3456/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
6245
+ return `wss://aiassist-uat.in.exotel.com/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
6246
6246
  }
6247
6247
  /**
6248
6248
  * Builds a WebSocket URL from the given parameters.
@@ -6389,7 +6389,8 @@ class ExotelAIAssistController extends EventEmitter {
6389
6389
  break;
6390
6390
  case "DISCONNECTED":
6391
6391
  if (this.connectionEstablished) {
6392
- if (this.readyFired) {
6392
+ const wasThrottled = this._streamState === "throttled";
6393
+ if (this.readyFired && !wasThrottled) {
6393
6394
  this.readyFired = false;
6394
6395
  this.emit("onReady", false);
6395
6396
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exotel-npm-dev/exotel-ai-assist",
3
- "version": "1.1.8",
3
+ "version": "1.2.0",
4
4
  "description": "AI-powered real-time suggestions, transcript, and sentiment for agent calls",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/index.js",
@@ -120,7 +120,8 @@ export class ExotelAIAssistController extends EventEmitter<ControllerEvents> {
120
120
 
121
121
  case "DISCONNECTED":
122
122
  if (this.connectionEstablished) {
123
- if (this.readyFired) {
123
+ const wasThrottled = this._streamState === "throttled";
124
+ if (this.readyFired && !wasThrottled) {
124
125
  this.readyFired = false;
125
126
  this.emit("onReady", false);
126
127
  }
@@ -29,7 +29,7 @@ export class Utils {
29
29
  * @returns The base WebSocket URL.
30
30
  */
31
31
  static getWssBaseUrl(accountId: string): string {
32
- return `ws://localhost:3456/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
32
+ return `wss://aiassist-uat.in.exotel.com/ai-assist/ws/v1/accounts/${accountId}/ai-assistants/conversation-events`;
33
33
  }
34
34
 
35
35
  /**