agrasya-voice-sdk 1.0.13 → 1.0.14

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.mts CHANGED
@@ -50,7 +50,7 @@ declare class AgrasyaVoiceSDK {
50
50
  private model;
51
51
  private callDuration;
52
52
  private durationInterval;
53
- constructor(config: AgrasyaSDKConfig, events?: AgrasyaEvents);
53
+ constructor(configOverrides: AgrasyaSDKConfig, events?: AgrasyaEvents);
54
54
  private log;
55
55
  private setStatus;
56
56
  private startTimer;
package/dist/index.d.ts CHANGED
@@ -50,7 +50,7 @@ declare class AgrasyaVoiceSDK {
50
50
  private model;
51
51
  private callDuration;
52
52
  private durationInterval;
53
- constructor(config: AgrasyaSDKConfig, events?: AgrasyaEvents);
53
+ constructor(configOverrides: AgrasyaSDKConfig, events?: AgrasyaEvents);
54
54
  private log;
55
55
  private setStatus;
56
56
  private startTimer;
package/dist/index.js CHANGED
@@ -34,6 +34,15 @@ __export(index_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(index_exports);
36
36
  var import_socket = __toESM(require("socket.io-client"));
37
+
38
+ // src/config.ts
39
+ var config = {
40
+ baseUrl: "http://localhost:4001"
41
+ // Replace with your actual base URL
42
+ };
43
+ var config_default = config;
44
+
45
+ // src/index.ts
37
46
  var AgrasyaVoiceSDK = class {
38
47
  config;
39
48
  events;
@@ -47,12 +56,13 @@ var AgrasyaVoiceSDK = class {
47
56
  model = null;
48
57
  callDuration = 0;
49
58
  durationInterval = null;
50
- constructor(config, events = {}) {
59
+ constructor(configOverrides, events = {}) {
51
60
  this.config = {
52
- baseUrl: "http://localhost:4001",
61
+ baseUrl: config_default.baseUrl,
62
+ // Use baseUrl from config.ts
53
63
  language: "",
54
64
  debug: false,
55
- ...config
65
+ ...configOverrides
56
66
  };
57
67
  this.events = events;
58
68
  }
package/dist/index.mjs CHANGED
@@ -1,5 +1,14 @@
1
1
  // src/index.ts
2
2
  import io from "socket.io-client";
3
+
4
+ // src/config.ts
5
+ var config = {
6
+ baseUrl: "http://localhost:4001"
7
+ // Replace with your actual base URL
8
+ };
9
+ var config_default = config;
10
+
11
+ // src/index.ts
3
12
  var AgrasyaVoiceSDK = class {
4
13
  config;
5
14
  events;
@@ -13,12 +22,13 @@ var AgrasyaVoiceSDK = class {
13
22
  model = null;
14
23
  callDuration = 0;
15
24
  durationInterval = null;
16
- constructor(config, events = {}) {
25
+ constructor(configOverrides, events = {}) {
17
26
  this.config = {
18
- baseUrl: "http://localhost:4001",
27
+ baseUrl: config_default.baseUrl,
28
+ // Use baseUrl from config.ts
19
29
  language: "",
20
30
  debug: false,
21
- ...config
31
+ ...configOverrides
22
32
  };
23
33
  this.events = events;
24
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrasya-voice-sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",