@vonage/client-sdk 0.1.3-alpha.17 → 0.1.3-alpha.19

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,6 +9,15 @@ 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
+ }
18
+ export declare class ClientConfig extends vonage.CoreClientConfigJS {
19
+ constructor(region: ConfigRegion);
20
+ }
12
21
  declare class VoiceClient extends vonage.CoreClientJS {
13
22
  private callbacks;
14
23
  constructor();
package/dist/Client.js CHANGED
@@ -1,11 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClientConfig = exports.ConfigRegion = void 0;
3
4
  const clientsdk_clientcore_js_1 = require("./kotlin/clientsdk-clientcore_js");
4
5
  require("./coreExtend");
5
6
  const HttpClient_1 = require("./HttpClient");
6
7
  const MediaClient_1 = require("./MediaClient");
7
8
  const SocketClient_1 = require("./SocketClient");
8
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 = {}));
17
+ class ClientConfig extends clientsdk_clientcore_js_1.vonage.CoreClientConfigJS {
18
+ constructor(region) {
19
+ super(ConfigRegion[region]);
20
+ }
21
+ }
22
+ exports.ClientConfig = ClientConfig;
9
23
  class VoiceClient extends clientsdk_clientcore_js_1.vonage.CoreClientJS {
10
24
  constructor() {
11
25
  super(new HttpClient_1.default(), new SocketClient_1.default(), new MediaClient_1.default());
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import './coreExtend';
2
- export { default as VoiceClient, Invite, VoiceCall, Conversation } from './Client';
2
+ export { default as VoiceClient, Invite, VoiceCall, Conversation, ConfigRegion, ClientConfig } from './Client';
3
3
  export {} from './coreExtend';
package/dist/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VoiceClient = void 0;
3
+ 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
+ Object.defineProperty(exports, "ConfigRegion", { enumerable: true, get: function () { return Client_1.ConfigRegion; } });
9
+ Object.defineProperty(exports, "ClientConfig", { enumerable: true, get: function () { return Client_1.ClientConfig; } });
@@ -30,7 +30,7 @@
30
30
  //endregion
31
31
  function LogWriter() {
32
32
  }
33
- LogWriter.prototype.h1a = function (severity) {
33
+ LogWriter.prototype.x19 = function (severity) {
34
34
  return true;
35
35
  };
36
36
  LogWriter.$metadata$ = classMeta('LogWriter');
@@ -51,13 +51,13 @@
51
51
  }
52
52
  function Companion() {
53
53
  Companion_instance = this;
54
- var tmp = LoggerGlobal_getInstance().j1a_1;
54
+ var tmp = LoggerGlobal_getInstance().z19_1;
55
55
  Logger_init_$Init$(tmp, null, 2, null, this);
56
56
  }
57
- Companion.prototype.m1a = function () {
57
+ Companion.prototype.c1a = function () {
58
58
  return get_defaultTag();
59
59
  };
60
- Companion.prototype.n1a = function (tag) {
60
+ Companion.prototype.d1a = function (tag) {
61
61
  set_defaultTag(tag);
62
62
  };
63
63
  Companion.$metadata$ = objectMeta('Companion', undefined, undefined, undefined, undefined, Logger.prototype);
@@ -69,52 +69,51 @@
69
69
  }
70
70
  function Logger(config, tag) {
71
71
  Companion_getInstance();
72
- this.o1a_1 = config;
73
- this.p1a_1 = tag;
72
+ this.e1a_1 = config;
73
+ this.f1a_1 = tag;
74
74
  }
75
- Logger.prototype.q1a = function () {
76
- return this.o1a_1;
75
+ Logger.prototype.g1a = function () {
76
+ return this.e1a_1;
77
77
  };
78
- Logger.prototype.m1a = function () {
79
- return this.p1a_1;
78
+ Logger.prototype.c1a = function () {
79
+ return this.f1a_1;
80
80
  };
81
- Logger.prototype.r1a = function (tag) {
82
- return new Logger(this.o1a_1, tag);
81
+ Logger.prototype.h1a = function (tag) {
82
+ return new Logger(this.e1a_1, tag);
83
83
  };
84
- Logger.prototype.s1a = function (message) {
85
- if (this.o1a_1.w1a().q3(Severity_Info_getInstance()) <= 0)
86
- this.v1a(Severity_Info_getInstance(), this.m1a(), null, message());
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());
87
+ }
87
88
  };
88
- Logger.prototype.t1a = function (message) {
89
- if (this.o1a_1.w1a().q3(Severity_Error_getInstance()) <= 0)
90
- this.v1a(Severity_Error_getInstance(), this.m1a(), null, message());
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());
92
+ }
91
93
  };
92
- Logger.prototype.u1a = function (message) {
93
- if (this.o1a_1.w1a().q3(Severity_Error_getInstance()) <= 0)
94
- this.v1a(Severity_Error_getInstance(), this.m1a(), null, message);
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);
97
+ }
95
98
  };
96
- Logger.prototype.v1a = function (severity, tag, throwable, message) {
97
- {
98
- {
99
- var tmp0_forEach = this.o1a_1.x1a();
100
- var tmp0_iterator = tmp0_forEach.g();
101
- while (tmp0_iterator.h()) {
102
- var element = tmp0_iterator.i();
103
- {
104
- if (element.h1a(severity)) {
105
- {
106
- element.i1a(severity, message, tag, throwable);
107
- }
108
- }
109
- }
110
- }
99
+ Logger.prototype.l1a = function (severity, tag, throwable, message) {
100
+ // Inline function 'co.touchlab.kermit.Logger.processLog' call
101
+ // Inline function 'kotlin.collections.forEach' call
102
+ var tmp0_forEach = this.e1a_1.n1a();
103
+ var tmp0_iterator = tmp0_forEach.g();
104
+ while (tmp0_iterator.h()) {
105
+ var element = tmp0_iterator.i();
106
+ // Inline function 'co.touchlab.kermit.Logger.processLog.<anonymous>' call
107
+ if (element.x19(severity)) {
108
+ // Inline function 'co.touchlab.kermit.Logger.log.<anonymous>' call
109
+ element.y19(severity, message, tag, throwable);
111
110
  }
112
111
  }
113
112
  };
114
113
  Logger.$metadata$ = classMeta('Logger');
115
114
  function LoggerGlobal() {
116
115
  LoggerGlobal_instance = this;
117
- this.j1a_1 = mutableKermitConfigInit(listOf(platformLogWriter()));
116
+ this.z19_1 = mutableKermitConfigInit(listOf(platformLogWriter()));
118
117
  }
119
118
  LoggerGlobal.$metadata$ = objectMeta('LoggerGlobal');
120
119
  var LoggerGlobal_instance;
@@ -178,49 +177,51 @@
178
177
  function ConsoleWriter() {
179
178
  LogWriter.call(this);
180
179
  }
181
- ConsoleWriter.prototype.i1a = function (severity, message, tag, throwable) {
180
+ ConsoleWriter.prototype.y19 = function (severity, message, tag, throwable) {
182
181
  var output = '[' + tag + '] ' + message;
183
182
  var tmp0_safe_receiver = throwable;
184
183
  if (tmp0_safe_receiver == null)
185
184
  null;
186
185
  else {
187
186
  var tmp$ret$0;
188
- {
189
- {
190
- }
191
- output = output + (' ' + stackTraceToString(tmp0_safe_receiver));
192
- tmp$ret$0 = Unit_getInstance();
193
- }
187
+ // Inline function 'kotlin.let' call
188
+ // Inline function 'kotlin.contracts.contract' call
189
+ output = output + (' ' + stackTraceToString(tmp0_safe_receiver));
190
+ tmp$ret$0 = Unit_getInstance();
194
191
  }
195
192
  var tmp1_subject = severity;
196
- var tmp0 = tmp1_subject.ue();
193
+ var tmp0 = tmp1_subject.p3_1;
197
194
  switch (tmp0) {
198
195
  case 5:
199
196
  case 4:
200
197
  console.error(output);
198
+ ;
201
199
  break;
202
200
  case 3:
203
201
  console.warn(output);
202
+ ;
204
203
  break;
205
204
  case 2:
206
205
  console.info(output);
206
+ ;
207
207
  break;
208
208
  case 1:
209
209
  case 0:
210
210
  console.log(output);
211
+ ;
211
212
  break;
212
213
  }
213
214
  };
214
215
  ConsoleWriter.$metadata$ = classMeta('ConsoleWriter', undefined, undefined, undefined, undefined, LogWriter.prototype);
215
216
  function JsMutableLoggerConfig(logWriters) {
216
- this.y1a_1 = get_DEFAULT_MIN_SEVERITY();
217
- this.z1a_1 = logWriters;
217
+ this.o1a_1 = get_DEFAULT_MIN_SEVERITY();
218
+ this.p1a_1 = logWriters;
218
219
  }
219
- JsMutableLoggerConfig.prototype.w1a = function () {
220
- return this.y1a_1;
220
+ JsMutableLoggerConfig.prototype.m1a = function () {
221
+ return this.o1a_1;
221
222
  };
222
- JsMutableLoggerConfig.prototype.x1a = function () {
223
- return this.z1a_1;
223
+ JsMutableLoggerConfig.prototype.n1a = function () {
224
+ return this.p1a_1;
224
225
  };
225
226
  JsMutableLoggerConfig.$metadata$ = classMeta('JsMutableLoggerConfig', [MutableLoggerConfig]);
226
227
  function set_defaultTag(_set____db54di) {
@@ -260,4 +261,4 @@
260
261
  return _;
261
262
  }));
262
263
 
263
- //# sourceMappingURL=Kermit-kermit-js-ir.js.map
264
+ //# sourceMappingURL=Kermit-kermit-js-ir.js.map
@@ -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;;;;;QCkEgB,mBAjBe,IAiBtB,MAAO,M;QAooDR,oC;eAAA,iB;UAAX,cAAW,iB;;gBDzmDq6rD,OA3Ct6rD,KAjBP,QAiBO,C;;gBA2Cs6rD,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;;;;;;QCMkC,mBAAW,GAAX,GAAiB,mBAA9C,kBAA8C,CAAjB,C;QAqFjD,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;;;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;;;;;;;;;;;"}