retell-sdk 1.0.10 → 1.0.12

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.
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ export default class Retell {
2
2
  private apiKey;
3
3
  private ip;
4
4
  constructor(apiKey: string, ip?: string);
5
- NewConversation: (options: any) => any;
5
+ NewConversation: (options: any) => Promise<any>;
6
6
  CreatAgent: (options: any) => Promise<any>;
7
7
  ListAgents: (options: any) => Promise<void>;
8
8
  ListConversations: (options: any) => Promise<void>;
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ var WebSocketClient = require("websocket").client;
4
4
  const axios = require("axios");
5
5
  class Retell {
6
6
  constructor(apiKey, ip) {
7
- this.NewConversation = (options) => {
7
+ this.NewConversation = async (options) => {
8
8
  if (!options || !options.agentId) {
9
9
  console.error("no agent id");
10
10
  return;
@@ -37,7 +37,7 @@ class Retell {
37
37
  }
38
38
  sendNumber();
39
39
  });
40
- client.connect("ws://" +
40
+ await client.connect("ws://" +
41
41
  this.ip +
42
42
  "/create-socket?" +
43
43
  "apiKey=" +
package/index.ts CHANGED
@@ -10,7 +10,7 @@ export default class Retell {
10
10
  this.apiKey = apiKey;
11
11
  }
12
12
 
13
- NewConversation = (options: any) => {
13
+ NewConversation = async (options: any) => {
14
14
  if (!options || !options.agentId) {
15
15
  console.error("no agent id");
16
16
  return;
@@ -45,7 +45,7 @@ export default class Retell {
45
45
  }
46
46
  sendNumber();
47
47
  });
48
- client.connect(
48
+ await client.connect(
49
49
  "ws://" +
50
50
  this.ip +
51
51
  "/create-socket?" +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "retell-sdk",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "retell sdk",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",