@vonage/client-sdk 0.1.3-alpha.21 → 0.1.3-alpha.23

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/Client.d.ts CHANGED
@@ -9,14 +9,13 @@ export declare type VonageEvent = vonage.CoreClientEvents;
9
9
  export declare type Invite = vonage.VoiceInviteJS;
10
10
  export declare type VoiceCall = vonage.VoiceCallJS;
11
11
  export declare type Conversation = vonage.ConversationJS;
12
- export declare enum ConfigRegion {
13
- AP = 0,
14
- EU = 1,
15
- US = 2,
16
- AUTO = 3
17
- }
12
+ export declare type RTCQuality = vonage.RTCQualityJS;
13
+ export declare type ConfigRegion = vonage.CoreClientConfigRegionJS;
14
+ export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
15
+ export declare const LoggingLevel: typeof vonage.LoggingLevelJS;
16
+ export declare const setDefaultLoggingLevel: typeof vonage.setDefaultLoggingLevel;
18
17
  export declare class ClientConfig extends vonage.CoreClientConfigJS {
19
- constructor(region: ConfigRegion);
18
+ constructor(region?: ConfigRegion);
20
19
  }
21
20
  declare class VoiceClient extends vonage.CoreClientJS {
22
21
  private callbacks;
package/dist/Client.js CHANGED
@@ -1,22 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientConfig = exports.ConfigRegion = void 0;
3
+ exports.ClientConfig = exports.setDefaultLoggingLevel = exports.LoggingLevel = exports.ConfigRegion = void 0;
4
4
  const clientsdk_clientcore_js_1 = require("./kotlin/clientsdk-clientcore_js");
5
5
  require("./coreExtend");
6
6
  const HttpClient_1 = require("./HttpClient");
7
7
  const MediaClient_1 = require("./MediaClient");
8
8
  const SocketClient_1 = require("./SocketClient");
9
9
  require("./global");
10
- var ConfigRegion;
11
- (function (ConfigRegion) {
12
- ConfigRegion[ConfigRegion["AP"] = 0] = "AP";
13
- ConfigRegion[ConfigRegion["EU"] = 1] = "EU";
14
- ConfigRegion[ConfigRegion["US"] = 2] = "US";
15
- ConfigRegion[ConfigRegion["AUTO"] = 3] = "AUTO";
16
- })(ConfigRegion = exports.ConfigRegion || (exports.ConfigRegion = {}));
10
+ exports.ConfigRegion = clientsdk_clientcore_js_1.vonage.CoreClientConfigRegionJS;
11
+ exports.LoggingLevel = clientsdk_clientcore_js_1.vonage.LoggingLevelJS;
12
+ exports.setDefaultLoggingLevel = clientsdk_clientcore_js_1.vonage.setDefaultLoggingLevel;
17
13
  class ClientConfig extends clientsdk_clientcore_js_1.vonage.CoreClientConfigJS {
18
- constructor(region) {
19
- super(ConfigRegion[region]);
14
+ constructor(region = exports.ConfigRegion.US) {
15
+ super(region);
20
16
  }
21
17
  }
22
18
  exports.ClientConfig = ClientConfig;
@@ -61,7 +61,7 @@ class SocketClient {
61
61
  (_a = this.socket) === null || _a === void 0 ? void 0 : _a.disconnect();
62
62
  }
63
63
  startVerifyResponseTimer(milliseconds, callback) {
64
- console.log(`startVerifyResponseTimer: ${milliseconds}`);
64
+ // console.log(`startVerifyResponseTimer: ${milliseconds}`);
65
65
  setTimeout(() => {
66
66
  callback();
67
67
  }, milliseconds);
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import './coreExtend';
2
- export { default as VoiceClient, Invite, VoiceCall, Conversation, ConfigRegion, ClientConfig } from './Client';
2
+ export { default as VoiceClient, Invite, VoiceCall, Conversation, ConfigRegion, ClientConfig, RTCQuality, setDefaultLoggingLevel, LoggingLevel } from './Client';
3
3
  export {} from './coreExtend';
package/dist/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientConfig = exports.ConfigRegion = exports.VoiceClient = void 0;
3
+ exports.LoggingLevel = exports.setDefaultLoggingLevel = exports.ClientConfig = exports.ConfigRegion = exports.VoiceClient = void 0;
4
4
  // export { Vonage } from './kotlin/clientsdk-core_js';
5
5
  require("./coreExtend");
6
6
  var Client_1 = require("./Client");
7
7
  Object.defineProperty(exports, "VoiceClient", { enumerable: true, get: function () { return Client_1.default; } });
8
8
  Object.defineProperty(exports, "ConfigRegion", { enumerable: true, get: function () { return Client_1.ConfigRegion; } });
9
9
  Object.defineProperty(exports, "ClientConfig", { enumerable: true, get: function () { return Client_1.ClientConfig; } });
10
+ Object.defineProperty(exports, "setDefaultLoggingLevel", { enumerable: true, get: function () { return Client_1.setDefaultLoggingLevel; } });
11
+ Object.defineProperty(exports, "LoggingLevel", { enumerable: true, get: function () { return Client_1.LoggingLevel; } });
@@ -16,9 +16,10 @@
16
16
  var objectMeta = kotlin_kotlin.$_$.h6;
17
17
  var listOf = kotlin_kotlin.$_$.g4;
18
18
  var interfaceMeta = kotlin_kotlin.$_$.o5;
19
+ var THROW_ISE = kotlin_kotlin.$_$.w7;
19
20
  var Unit_getInstance = kotlin_kotlin.$_$.o2;
20
21
  var Enum = kotlin_kotlin.$_$.q7;
21
- var stackTraceToString = kotlin_kotlin.$_$.l8;
22
+ var stackTraceToString = kotlin_kotlin.$_$.m8;
22
23
  //endregion
23
24
  //region block: pre-declaration
24
25
  Companion.prototype = Object.create(Logger.prototype);
@@ -30,7 +31,7 @@
30
31
  //endregion
31
32
  function LogWriter() {
32
33
  }
33
- LogWriter.prototype.x19 = function (severity) {
34
+ LogWriter.prototype.y19 = function (severity) {
34
35
  return true;
35
36
  };
36
37
  LogWriter.$metadata$ = classMeta('LogWriter');
@@ -51,13 +52,16 @@
51
52
  }
52
53
  function Companion() {
53
54
  Companion_instance = this;
54
- var tmp = LoggerGlobal_getInstance().z19_1;
55
+ var tmp = LoggerGlobal_getInstance().a1a_1;
55
56
  Logger_init_$Init$(tmp, null, 2, null, this);
56
57
  }
57
- Companion.prototype.c1a = function () {
58
+ Companion.prototype.d1a = function () {
58
59
  return get_defaultTag();
59
60
  };
60
- Companion.prototype.d1a = function (tag) {
61
+ Companion.prototype.e1a = function (severity) {
62
+ LoggerGlobal_getInstance().a1a_1.f1a(severity);
63
+ };
64
+ Companion.prototype.g1a = function (tag) {
61
65
  set_defaultTag(tag);
62
66
  };
63
67
  Companion.$metadata$ = objectMeta('Companion', undefined, undefined, undefined, undefined, Logger.prototype);
@@ -69,51 +73,51 @@
69
73
  }
70
74
  function Logger(config, tag) {
71
75
  Companion_getInstance();
72
- this.e1a_1 = config;
73
- this.f1a_1 = tag;
76
+ this.h1a_1 = config;
77
+ this.i1a_1 = tag;
74
78
  }
75
- Logger.prototype.g1a = function () {
76
- return this.e1a_1;
79
+ Logger.prototype.j1a = function () {
80
+ return this.h1a_1;
77
81
  };
78
- Logger.prototype.c1a = function () {
79
- return this.f1a_1;
82
+ Logger.prototype.d1a = function () {
83
+ return this.i1a_1;
80
84
  };
81
- Logger.prototype.h1a = function (tag) {
82
- return new Logger(this.e1a_1, tag);
85
+ Logger.prototype.k1a = function (tag) {
86
+ return new Logger(this.h1a_1, tag);
83
87
  };
84
- Logger.prototype.i1a = function (message) {
85
- if (this.e1a_1.m1a().r3(Severity_Info_getInstance()) <= 0) {
86
- this.l1a(Severity_Info_getInstance(), this.c1a(), null, message());
88
+ Logger.prototype.l1a = function (message) {
89
+ if (this.h1a_1.p1a().r3(Severity_Info_getInstance()) <= 0) {
90
+ this.o1a(Severity_Info_getInstance(), this.d1a(), null, message());
87
91
  }
88
92
  };
89
- Logger.prototype.j1a = function (message) {
90
- if (this.e1a_1.m1a().r3(Severity_Error_getInstance()) <= 0) {
91
- this.l1a(Severity_Error_getInstance(), this.c1a(), null, message());
93
+ Logger.prototype.m1a = function (message) {
94
+ if (this.h1a_1.p1a().r3(Severity_Error_getInstance()) <= 0) {
95
+ this.o1a(Severity_Error_getInstance(), this.d1a(), null, message());
92
96
  }
93
97
  };
94
- Logger.prototype.k1a = function (message) {
95
- if (this.e1a_1.m1a().r3(Severity_Error_getInstance()) <= 0) {
96
- this.l1a(Severity_Error_getInstance(), this.c1a(), null, message);
98
+ Logger.prototype.n1a = function (message) {
99
+ if (this.h1a_1.p1a().r3(Severity_Error_getInstance()) <= 0) {
100
+ this.o1a(Severity_Error_getInstance(), this.d1a(), null, message);
97
101
  }
98
102
  };
99
- Logger.prototype.l1a = function (severity, tag, throwable, message) {
103
+ Logger.prototype.o1a = function (severity, tag, throwable, message) {
100
104
  // Inline function 'co.touchlab.kermit.Logger.processLog' call
101
105
  // Inline function 'kotlin.collections.forEach' call
102
- var tmp0_forEach = this.e1a_1.n1a();
106
+ var tmp0_forEach = this.h1a_1.q1a();
103
107
  var tmp0_iterator = tmp0_forEach.g();
104
108
  while (tmp0_iterator.h()) {
105
109
  var element = tmp0_iterator.i();
106
110
  // Inline function 'co.touchlab.kermit.Logger.processLog.<anonymous>' call
107
- if (element.x19(severity)) {
111
+ if (element.y19(severity)) {
108
112
  // Inline function 'co.touchlab.kermit.Logger.log.<anonymous>' call
109
- element.y19(severity, message, tag, throwable);
113
+ element.z19(severity, message, tag, throwable);
110
114
  }
111
115
  }
112
116
  };
113
117
  Logger.$metadata$ = classMeta('Logger');
114
118
  function LoggerGlobal() {
115
119
  LoggerGlobal_instance = this;
116
- this.z19_1 = mutableKermitConfigInit(listOf(platformLogWriter()));
120
+ this.a1a_1 = mutableKermitConfigInit(listOf(platformLogWriter()));
117
121
  }
118
122
  LoggerGlobal.$metadata$ = objectMeta('LoggerGlobal');
119
123
  var LoggerGlobal_instance;
@@ -142,6 +146,26 @@
142
146
  var Severity_Warn_instance;
143
147
  var Severity_Error_instance;
144
148
  var Severity_Assert_instance;
149
+ function valueOf(value) {
150
+ switch (value) {
151
+ case 'Verbose':
152
+ return Severity_Verbose_getInstance();
153
+ case 'Debug':
154
+ return Severity_Debug_getInstance();
155
+ case 'Info':
156
+ return Severity_Info_getInstance();
157
+ case 'Warn':
158
+ return Severity_Warn_getInstance();
159
+ case 'Error':
160
+ return Severity_Error_getInstance();
161
+ case 'Assert':
162
+ return Severity_Assert_getInstance();
163
+ default:
164
+ Severity_initEntries();
165
+ THROW_ISE();
166
+ break;
167
+ }
168
+ }
145
169
  var Severity_entriesInitialized;
146
170
  function Severity_initEntries() {
147
171
  if (Severity_entriesInitialized)
@@ -170,14 +194,22 @@
170
194
  Severity_initEntries();
171
195
  return Severity_Info_instance;
172
196
  }
197
+ function Severity_Warn_getInstance() {
198
+ Severity_initEntries();
199
+ return Severity_Warn_instance;
200
+ }
173
201
  function Severity_Error_getInstance() {
174
202
  Severity_initEntries();
175
203
  return Severity_Error_instance;
176
204
  }
205
+ function Severity_Assert_getInstance() {
206
+ Severity_initEntries();
207
+ return Severity_Assert_instance;
208
+ }
177
209
  function ConsoleWriter() {
178
210
  LogWriter.call(this);
179
211
  }
180
- ConsoleWriter.prototype.y19 = function (severity, message, tag, throwable) {
212
+ ConsoleWriter.prototype.z19 = function (severity, message, tag, throwable) {
181
213
  var output = '[' + tag + '] ' + message;
182
214
  var tmp0_safe_receiver = throwable;
183
215
  if (tmp0_safe_receiver == null)
@@ -214,14 +246,17 @@
214
246
  };
215
247
  ConsoleWriter.$metadata$ = classMeta('ConsoleWriter', undefined, undefined, undefined, undefined, LogWriter.prototype);
216
248
  function JsMutableLoggerConfig(logWriters) {
217
- this.o1a_1 = get_DEFAULT_MIN_SEVERITY();
218
- this.p1a_1 = logWriters;
249
+ this.r1a_1 = get_DEFAULT_MIN_SEVERITY();
250
+ this.s1a_1 = logWriters;
219
251
  }
220
- JsMutableLoggerConfig.prototype.m1a = function () {
221
- return this.o1a_1;
252
+ JsMutableLoggerConfig.prototype.f1a = function (_set____db54di) {
253
+ this.r1a_1 = _set____db54di;
254
+ };
255
+ JsMutableLoggerConfig.prototype.p1a = function () {
256
+ return this.r1a_1;
222
257
  };
223
- JsMutableLoggerConfig.prototype.n1a = function () {
224
- return this.p1a_1;
258
+ JsMutableLoggerConfig.prototype.q1a = function () {
259
+ return this.s1a_1;
225
260
  };
226
261
  JsMutableLoggerConfig.$metadata$ = classMeta('JsMutableLoggerConfig', [MutableLoggerConfig]);
227
262
  function set_defaultTag(_set____db54di) {
@@ -253,10 +288,11 @@
253
288
  //endregion
254
289
  //region block: exports
255
290
  _.$_$ = _.$_$ || {};
256
- _.$_$.a = Severity_Debug_getInstance;
257
- _.$_$.b = Severity_Error_getInstance;
258
- _.$_$.c = Severity_Info_getInstance;
259
- _.$_$.d = Companion_getInstance;
291
+ _.$_$.a = valueOf;
292
+ _.$_$.b = Severity_Debug_getInstance;
293
+ _.$_$.c = Severity_Error_getInstance;
294
+ _.$_$.d = Severity_Info_getInstance;
295
+ _.$_$.e = Companion_getInstance;
260
296
  //endregion
261
297
  return _;
262
298
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../LogWriter.kt","../../../../../Logger.kt","../../../../../commonMainSources/libraries/stdlib/common/src/generated/_Collections.kt","../../../../../ConsoleWriter.kt","../../../../../commonMainSources/libraries/stdlib/src/kotlin/util/Standard.kt","../../../../../JsMutableLoggerConfig.kt","../../../../../KermitConfig.kt","../../../../../platformLogWriter.kt"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgB2D,OAAJ,I;;;;;IC4L9C,2B;;;;IACM,kB;;;;QA7LV,qB;MAAA,MAEuB,Q;IAFvB,+B;;;;;cA6JsC,gC;IAApB,4C;;;IAEO,OAAV,gB;;;IAmBR,eAAa,GAAb,C;;;;;;;;;;IAnLZ,uB;IAEI,mB;IACA,gB;;;IADA,iB;;;IACK,iB;;;IAGD,OAAO,WAAO,IAAK,MAAZ,EAAoB,GAApB,C;;;QA8CH,UAAO,MAAP,qC;MACA,sCAAmB,UAAnB,EAAwB,IAAxB,EAA8B,SAA9B,C;;;;QAqCA,UAAO,MAAP,sC;MACA,uCAAoB,UAApB,EAAyB,IAAzB,EAA+B,SAA/B,C;;;;QASA,UAAO,MAAP,sC;MACA,uCAAoB,UAApB,EAAyB,IAAzB,EAA+B,OAA/B,C;;;;;;ICkEgB,mBAjBe,IAiBtB,MAAO,M;IAooDR,oC;WAAA,iB;MAAX,cAAW,iB;;UDzmDq6rD,OA3Ct6rD,KAjBP,QAiBO,C;;QA2Cs6rD,OAvD76rD,KAAI,QAAJ,EAFA,OAEA,EAJA,GAIA,EAHA,SAGA,C;;;;;;;IA8CY,qCAAwB,OAAO,mBAAP,CAAxB,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IEvLF,oB;;;IAEd,aAAc,GAAd,GAAgB,GAAhB,GAAmB,IAAnB,GAAsB,O;IACtB,kC;QAAA,kBAAW,Q;MAAA,I;;;;;MCMkC,mBAAW,GAAX,GAAiB,mBAA9C,kBAA8C,CAAjB,C;MAqFjD,8B;;IDxFU,2B;IAAA,4B;;WACO,C;WAAiB,C;QAAS,OAAQ,OAAM,MAAN,C;;;WAClC,C;QAAQ,OAAQ,MAAK,MAAL,C;;;WAChB,C;QAAQ,OAAQ,MAAK,MAAL,C;;;WAChB,C;WAAgB,C;QAAW,OAAQ,KAAI,MAAJ,C;;;;;;;IEdf,uC;IACS,uB;;;IADrC,iB;;;IACA,iB;;;;;ICAG,2B;;;;IAAA,iB;;;;;IAFiH,OAAjC,0BAAsB,UAAtB,C;;;;;;;mBAEvD,iB;;;;ICFkB,OAAf,mB;;;gBNiMX,Q;;;;;;;;;;;"}
1
+ {"version":3,"sources":["../../../../../LogWriter.kt","../../../../../Logger.kt","../../../../../commonMainSources/libraries/stdlib/common/src/generated/_Collections.kt","../../../../../ConsoleWriter.kt","../../../../../commonMainSources/libraries/stdlib/src/kotlin/util/Standard.kt","../../../../../JsMutableLoggerConfig.kt","../../../../../KermitConfig.kt","../../../../../platformLogWriter.kt"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgB2D,OAAJ,I;;;;;IC4L9C,2B;;;;IACM,kB;;;;QA7LV,qB;MAAA,MAEuB,Q;IAFvB,+B;;;;;cA6JsC,gC;IAApB,4C;;;IAEO,OAAV,gB;;;IAGK,gCAAb,KAAyC,QAA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