@vonage/client-sdk 1.1.1-alpha.0 → 1.1.1-alpha.2
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/README.md +2 -2
- package/dist/client/index.cjs +16 -22
- package/dist/client/index.mjs +16 -22
- package/dist/coreExtend.d.ts +2 -2
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +6 -6
- package/dist/vonageClientSDK.js +16 -22
- package/dist/vonageClientSDK.min.js +2 -2
- package/dist/vonageClientSDK.min.mjs +2 -2
- package/dist/vonageClientSDK.mjs +16 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,7 +137,7 @@ console.log(call);
|
|
|
137
137
|
client.on(
|
|
138
138
|
'callInvite',
|
|
139
139
|
async (callId: string, from: string, channelType: string) => {
|
|
140
|
-
client.
|
|
140
|
+
client.answer(callId);
|
|
141
141
|
console.log(callId, from, channelType);
|
|
142
142
|
}
|
|
143
143
|
);
|
|
@@ -148,7 +148,7 @@ client.on(
|
|
|
148
148
|
client.on(
|
|
149
149
|
'callInvite',
|
|
150
150
|
async (callId: string, from: string, channelType: string) => {
|
|
151
|
-
client.
|
|
151
|
+
client.reject(callId);
|
|
152
152
|
console.log(callId, from, channelType);
|
|
153
153
|
}
|
|
154
154
|
);
|
package/dist/client/index.cjs
CHANGED
|
@@ -61878,13 +61878,13 @@ function requireClientsdkClientcore () {
|
|
|
61878
61878
|
function getLeg(legId) {
|
|
61879
61879
|
return new Promise(IVoiceClientJS$getLeg$lambda(this, legId));
|
|
61880
61880
|
}
|
|
61881
|
-
function
|
|
61882
|
-
return new Promise(IVoiceClientJS$
|
|
61881
|
+
function answer(callId) {
|
|
61882
|
+
return new Promise(IVoiceClientJS$answer$lambda(this, callId));
|
|
61883
61883
|
}
|
|
61884
|
-
function
|
|
61885
|
-
return new Promise(IVoiceClientJS$
|
|
61884
|
+
function reject(callId) {
|
|
61885
|
+
return new Promise(IVoiceClientJS$reject$lambda(this, callId));
|
|
61886
61886
|
}
|
|
61887
|
-
function
|
|
61887
|
+
function hangup(callId, reasonText, reasonCode) {
|
|
61888
61888
|
return new Promise(IVoiceClientJS$hangup$lambda(this, callId, reasonText, reasonCode));
|
|
61889
61889
|
}
|
|
61890
61890
|
function say(callId, params) {
|
|
@@ -65472,7 +65472,7 @@ function requireClientsdkClientcore () {
|
|
|
65472
65472
|
return Unit_getInstance();
|
|
65473
65473
|
};
|
|
65474
65474
|
}
|
|
65475
|
-
function IVoiceClientJS$
|
|
65475
|
+
function IVoiceClientJS$answer$lambda$lambda($reject, $resolve) {
|
|
65476
65476
|
return function (it) {
|
|
65477
65477
|
var tmp;
|
|
65478
65478
|
if (!(it == null)) {
|
|
@@ -65483,14 +65483,14 @@ function requireClientsdkClientcore () {
|
|
|
65483
65483
|
return Unit_getInstance();
|
|
65484
65484
|
};
|
|
65485
65485
|
}
|
|
65486
|
-
function IVoiceClientJS$
|
|
65486
|
+
function IVoiceClientJS$answer$lambda(this$0, $callId) {
|
|
65487
65487
|
return function (resolve, reject) {
|
|
65488
65488
|
var tmp = this$0.core;
|
|
65489
|
-
tmp.i1b($callId, IVoiceClientJS$
|
|
65489
|
+
tmp.i1b($callId, IVoiceClientJS$answer$lambda$lambda(reject, resolve));
|
|
65490
65490
|
return Unit_getInstance();
|
|
65491
65491
|
};
|
|
65492
65492
|
}
|
|
65493
|
-
function IVoiceClientJS$
|
|
65493
|
+
function IVoiceClientJS$reject$lambda$lambda($reject, $resolve) {
|
|
65494
65494
|
return function (it) {
|
|
65495
65495
|
var tmp;
|
|
65496
65496
|
if (!(it == null)) {
|
|
@@ -65501,10 +65501,10 @@ function requireClientsdkClientcore () {
|
|
|
65501
65501
|
return Unit_getInstance();
|
|
65502
65502
|
};
|
|
65503
65503
|
}
|
|
65504
|
-
function IVoiceClientJS$
|
|
65504
|
+
function IVoiceClientJS$reject$lambda(this$0, $callId) {
|
|
65505
65505
|
return function (resolve, reject) {
|
|
65506
65506
|
var tmp = this$0.core;
|
|
65507
|
-
tmp.h1b($callId, IVoiceClientJS$
|
|
65507
|
+
tmp.h1b($callId, IVoiceClientJS$reject$lambda$lambda(reject, resolve));
|
|
65508
65508
|
return Unit_getInstance();
|
|
65509
65509
|
};
|
|
65510
65510
|
}
|
|
@@ -66772,9 +66772,9 @@ function requireClientsdkClientcore () {
|
|
|
66772
66772
|
CombinedClientJS.prototype.serverCall = serverCall;
|
|
66773
66773
|
CombinedClientJS.prototype.reconnectCall = reconnectCall;
|
|
66774
66774
|
CombinedClientJS.prototype.getLeg = getLeg;
|
|
66775
|
-
CombinedClientJS.prototype.
|
|
66776
|
-
CombinedClientJS.prototype.
|
|
66777
|
-
CombinedClientJS.prototype.
|
|
66775
|
+
CombinedClientJS.prototype.answer = answer;
|
|
66776
|
+
CombinedClientJS.prototype.reject = reject;
|
|
66777
|
+
CombinedClientJS.prototype.hangup = hangup;
|
|
66778
66778
|
CombinedClientJS.prototype.say = say;
|
|
66779
66779
|
CombinedClientJS.prototype.mute = mute;
|
|
66780
66780
|
CombinedClientJS.prototype.unmute = unmute;
|
|
@@ -67715,12 +67715,6 @@ class VonageClient extends clientsdkClientcore_jsExports.vonage.CombinedClientJS
|
|
|
67715
67715
|
set emitter(value) {
|
|
67716
67716
|
super.emitter = value;
|
|
67717
67717
|
}
|
|
67718
|
-
/**
|
|
67719
|
-
* @internal
|
|
67720
|
-
*/
|
|
67721
|
-
hangupWithReason(callId, reasonText, reasonCode) {
|
|
67722
|
-
return super.hangupWithReason(callId, reasonText, reasonCode);
|
|
67723
|
-
}
|
|
67724
67718
|
constructor() {
|
|
67725
67719
|
super(new HttpClient(), new SocketClient(), new MediaClient());
|
|
67726
67720
|
/**
|
|
@@ -67893,10 +67887,10 @@ class VonageClient extends clientsdkClientcore_jsExports.vonage.CombinedClientJS
|
|
|
67893
67887
|
*/
|
|
67894
67888
|
hangup(callId, reasonText, reasonCode) {
|
|
67895
67889
|
const _super = Object.create(null, {
|
|
67896
|
-
|
|
67890
|
+
hangup: { get: () => super.hangup }
|
|
67897
67891
|
});
|
|
67898
67892
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67899
|
-
return _super.
|
|
67893
|
+
return _super.hangup.call(this, callId, reasonText || null, reasonCode || null);
|
|
67900
67894
|
});
|
|
67901
67895
|
}
|
|
67902
67896
|
say(callId, params) {
|
package/dist/client/index.mjs
CHANGED
|
@@ -61854,13 +61854,13 @@ function requireClientsdkClientcore () {
|
|
|
61854
61854
|
function getLeg(legId) {
|
|
61855
61855
|
return new Promise(IVoiceClientJS$getLeg$lambda(this, legId));
|
|
61856
61856
|
}
|
|
61857
|
-
function
|
|
61858
|
-
return new Promise(IVoiceClientJS$
|
|
61857
|
+
function answer(callId) {
|
|
61858
|
+
return new Promise(IVoiceClientJS$answer$lambda(this, callId));
|
|
61859
61859
|
}
|
|
61860
|
-
function
|
|
61861
|
-
return new Promise(IVoiceClientJS$
|
|
61860
|
+
function reject(callId) {
|
|
61861
|
+
return new Promise(IVoiceClientJS$reject$lambda(this, callId));
|
|
61862
61862
|
}
|
|
61863
|
-
function
|
|
61863
|
+
function hangup(callId, reasonText, reasonCode) {
|
|
61864
61864
|
return new Promise(IVoiceClientJS$hangup$lambda(this, callId, reasonText, reasonCode));
|
|
61865
61865
|
}
|
|
61866
61866
|
function say(callId, params) {
|
|
@@ -65448,7 +65448,7 @@ function requireClientsdkClientcore () {
|
|
|
65448
65448
|
return Unit_getInstance();
|
|
65449
65449
|
};
|
|
65450
65450
|
}
|
|
65451
|
-
function IVoiceClientJS$
|
|
65451
|
+
function IVoiceClientJS$answer$lambda$lambda($reject, $resolve) {
|
|
65452
65452
|
return function (it) {
|
|
65453
65453
|
var tmp;
|
|
65454
65454
|
if (!(it == null)) {
|
|
@@ -65459,14 +65459,14 @@ function requireClientsdkClientcore () {
|
|
|
65459
65459
|
return Unit_getInstance();
|
|
65460
65460
|
};
|
|
65461
65461
|
}
|
|
65462
|
-
function IVoiceClientJS$
|
|
65462
|
+
function IVoiceClientJS$answer$lambda(this$0, $callId) {
|
|
65463
65463
|
return function (resolve, reject) {
|
|
65464
65464
|
var tmp = this$0.core;
|
|
65465
|
-
tmp.i1b($callId, IVoiceClientJS$
|
|
65465
|
+
tmp.i1b($callId, IVoiceClientJS$answer$lambda$lambda(reject, resolve));
|
|
65466
65466
|
return Unit_getInstance();
|
|
65467
65467
|
};
|
|
65468
65468
|
}
|
|
65469
|
-
function IVoiceClientJS$
|
|
65469
|
+
function IVoiceClientJS$reject$lambda$lambda($reject, $resolve) {
|
|
65470
65470
|
return function (it) {
|
|
65471
65471
|
var tmp;
|
|
65472
65472
|
if (!(it == null)) {
|
|
@@ -65477,10 +65477,10 @@ function requireClientsdkClientcore () {
|
|
|
65477
65477
|
return Unit_getInstance();
|
|
65478
65478
|
};
|
|
65479
65479
|
}
|
|
65480
|
-
function IVoiceClientJS$
|
|
65480
|
+
function IVoiceClientJS$reject$lambda(this$0, $callId) {
|
|
65481
65481
|
return function (resolve, reject) {
|
|
65482
65482
|
var tmp = this$0.core;
|
|
65483
|
-
tmp.h1b($callId, IVoiceClientJS$
|
|
65483
|
+
tmp.h1b($callId, IVoiceClientJS$reject$lambda$lambda(reject, resolve));
|
|
65484
65484
|
return Unit_getInstance();
|
|
65485
65485
|
};
|
|
65486
65486
|
}
|
|
@@ -66748,9 +66748,9 @@ function requireClientsdkClientcore () {
|
|
|
66748
66748
|
CombinedClientJS.prototype.serverCall = serverCall;
|
|
66749
66749
|
CombinedClientJS.prototype.reconnectCall = reconnectCall;
|
|
66750
66750
|
CombinedClientJS.prototype.getLeg = getLeg;
|
|
66751
|
-
CombinedClientJS.prototype.
|
|
66752
|
-
CombinedClientJS.prototype.
|
|
66753
|
-
CombinedClientJS.prototype.
|
|
66751
|
+
CombinedClientJS.prototype.answer = answer;
|
|
66752
|
+
CombinedClientJS.prototype.reject = reject;
|
|
66753
|
+
CombinedClientJS.prototype.hangup = hangup;
|
|
66754
66754
|
CombinedClientJS.prototype.say = say;
|
|
66755
66755
|
CombinedClientJS.prototype.mute = mute;
|
|
66756
66756
|
CombinedClientJS.prototype.unmute = unmute;
|
|
@@ -67691,12 +67691,6 @@ class VonageClient extends clientsdkClientcore_jsExports.vonage.CombinedClientJS
|
|
|
67691
67691
|
set emitter(value) {
|
|
67692
67692
|
super.emitter = value;
|
|
67693
67693
|
}
|
|
67694
|
-
/**
|
|
67695
|
-
* @internal
|
|
67696
|
-
*/
|
|
67697
|
-
hangupWithReason(callId, reasonText, reasonCode) {
|
|
67698
|
-
return super.hangupWithReason(callId, reasonText, reasonCode);
|
|
67699
|
-
}
|
|
67700
67694
|
constructor() {
|
|
67701
67695
|
super(new HttpClient(), new SocketClient(), new MediaClient());
|
|
67702
67696
|
/**
|
|
@@ -67869,10 +67863,10 @@ class VonageClient extends clientsdkClientcore_jsExports.vonage.CombinedClientJS
|
|
|
67869
67863
|
*/
|
|
67870
67864
|
hangup(callId, reasonText, reasonCode) {
|
|
67871
67865
|
const _super = Object.create(null, {
|
|
67872
|
-
|
|
67866
|
+
hangup: { get: () => super.hangup }
|
|
67873
67867
|
});
|
|
67874
67868
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67875
|
-
return _super.
|
|
67869
|
+
return _super.hangup.call(this, callId, reasonText || null, reasonCode || null);
|
|
67876
67870
|
});
|
|
67877
67871
|
}
|
|
67878
67872
|
say(callId, params) {
|
package/dist/coreExtend.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
|
|
|
60
60
|
* @returns void
|
|
61
61
|
* @group Voice
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
answer(callId: string): Promise<void>;
|
|
64
64
|
/**
|
|
65
65
|
* Reject a call
|
|
66
66
|
*
|
|
@@ -71,7 +71,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
|
|
|
71
71
|
* @returns void
|
|
72
72
|
* @group Voice
|
|
73
73
|
*/
|
|
74
|
-
|
|
74
|
+
reject(callId: string): Promise<void>;
|
|
75
75
|
/**
|
|
76
76
|
* Reconnect a call
|
|
77
77
|
*
|
|
@@ -45,9 +45,9 @@ export namespace vonage {
|
|
|
45
45
|
serverCall(context: Nullable<Json>): Promise<string>;
|
|
46
46
|
reconnectCall(legId: string): Promise<any>;
|
|
47
47
|
getLeg(legId: string): Promise<vonage.LegJS>;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
answer(callId: string): Promise<any>;
|
|
49
|
+
reject(callId: string): Promise<any>;
|
|
50
|
+
hangup(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>): Promise<any>;
|
|
51
51
|
say(callId: string, params: vonage.CallSayParams): Promise<any>;
|
|
52
52
|
mute(callId: string): Promise<any>;
|
|
53
53
|
unmute(callId: string): Promise<any>;
|
|
@@ -676,9 +676,9 @@ export namespace vonage {
|
|
|
676
676
|
serverCall(context: Nullable<Json>): Promise<string>;
|
|
677
677
|
reconnectCall(legId: string): Promise<any>;
|
|
678
678
|
getLeg(legId: string): Promise<vonage.LegJS>;
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
679
|
+
answer(callId: string): Promise<any>;
|
|
680
|
+
reject(callId: string): Promise<any>;
|
|
681
|
+
hangup(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>): Promise<any>;
|
|
682
682
|
say(callId: string, params: vonage.CallSayParams): Promise<any>;
|
|
683
683
|
mute(callId: string): Promise<any>;
|
|
684
684
|
unmute(callId: string): Promise<any>;
|
package/dist/vonageClientSDK.js
CHANGED
|
@@ -58505,13 +58505,13 @@
|
|
|
58505
58505
|
function getLeg(legId) {
|
|
58506
58506
|
return new Promise(IVoiceClientJS$getLeg$lambda(this, legId));
|
|
58507
58507
|
}
|
|
58508
|
-
function
|
|
58509
|
-
return new Promise(IVoiceClientJS$
|
|
58508
|
+
function answer(callId) {
|
|
58509
|
+
return new Promise(IVoiceClientJS$answer$lambda(this, callId));
|
|
58510
58510
|
}
|
|
58511
|
-
function
|
|
58512
|
-
return new Promise(IVoiceClientJS$
|
|
58511
|
+
function reject(callId) {
|
|
58512
|
+
return new Promise(IVoiceClientJS$reject$lambda(this, callId));
|
|
58513
58513
|
}
|
|
58514
|
-
function
|
|
58514
|
+
function hangup(callId, reasonText, reasonCode) {
|
|
58515
58515
|
return new Promise(IVoiceClientJS$hangup$lambda(this, callId, reasonText, reasonCode));
|
|
58516
58516
|
}
|
|
58517
58517
|
function say(callId, params) {
|
|
@@ -62050,7 +62050,7 @@
|
|
|
62050
62050
|
return Unit_getInstance();
|
|
62051
62051
|
};
|
|
62052
62052
|
}
|
|
62053
|
-
function IVoiceClientJS$
|
|
62053
|
+
function IVoiceClientJS$answer$lambda$lambda($reject, $resolve) {
|
|
62054
62054
|
return function (it) {
|
|
62055
62055
|
if (!(it == null)) {
|
|
62056
62056
|
$reject(it instanceof Error ? it : THROW_CCE());
|
|
@@ -62060,14 +62060,14 @@
|
|
|
62060
62060
|
return Unit_getInstance();
|
|
62061
62061
|
};
|
|
62062
62062
|
}
|
|
62063
|
-
function IVoiceClientJS$
|
|
62063
|
+
function IVoiceClientJS$answer$lambda(this$0, $callId) {
|
|
62064
62064
|
return function (resolve, reject) {
|
|
62065
62065
|
var tmp = this$0.core;
|
|
62066
|
-
tmp.i1b($callId, IVoiceClientJS$
|
|
62066
|
+
tmp.i1b($callId, IVoiceClientJS$answer$lambda$lambda(reject, resolve));
|
|
62067
62067
|
return Unit_getInstance();
|
|
62068
62068
|
};
|
|
62069
62069
|
}
|
|
62070
|
-
function IVoiceClientJS$
|
|
62070
|
+
function IVoiceClientJS$reject$lambda$lambda($reject, $resolve) {
|
|
62071
62071
|
return function (it) {
|
|
62072
62072
|
if (!(it == null)) {
|
|
62073
62073
|
$reject(it instanceof Error ? it : THROW_CCE());
|
|
@@ -62077,10 +62077,10 @@
|
|
|
62077
62077
|
return Unit_getInstance();
|
|
62078
62078
|
};
|
|
62079
62079
|
}
|
|
62080
|
-
function IVoiceClientJS$
|
|
62080
|
+
function IVoiceClientJS$reject$lambda(this$0, $callId) {
|
|
62081
62081
|
return function (resolve, reject) {
|
|
62082
62082
|
var tmp = this$0.core;
|
|
62083
|
-
tmp.h1b($callId, IVoiceClientJS$
|
|
62083
|
+
tmp.h1b($callId, IVoiceClientJS$reject$lambda$lambda(reject, resolve));
|
|
62084
62084
|
return Unit_getInstance();
|
|
62085
62085
|
};
|
|
62086
62086
|
}
|
|
@@ -63275,9 +63275,9 @@
|
|
|
63275
63275
|
CombinedClientJS.prototype.serverCall = serverCall;
|
|
63276
63276
|
CombinedClientJS.prototype.reconnectCall = reconnectCall;
|
|
63277
63277
|
CombinedClientJS.prototype.getLeg = getLeg;
|
|
63278
|
-
CombinedClientJS.prototype.
|
|
63279
|
-
CombinedClientJS.prototype.
|
|
63280
|
-
CombinedClientJS.prototype.
|
|
63278
|
+
CombinedClientJS.prototype.answer = answer;
|
|
63279
|
+
CombinedClientJS.prototype.reject = reject;
|
|
63280
|
+
CombinedClientJS.prototype.hangup = hangup;
|
|
63281
63281
|
CombinedClientJS.prototype.say = say;
|
|
63282
63282
|
CombinedClientJS.prototype.mute = mute;
|
|
63283
63283
|
CombinedClientJS.prototype.unmute = unmute;
|
|
@@ -79071,12 +79071,6 @@
|
|
|
79071
79071
|
set emitter(value) {
|
|
79072
79072
|
super.emitter = value;
|
|
79073
79073
|
}
|
|
79074
|
-
/**
|
|
79075
|
-
* @internal
|
|
79076
|
-
*/
|
|
79077
|
-
hangupWithReason(callId, reasonText, reasonCode) {
|
|
79078
|
-
return super.hangupWithReason(callId, reasonText, reasonCode);
|
|
79079
|
-
}
|
|
79080
79074
|
constructor() {
|
|
79081
79075
|
super(new HttpClient(), new SocketClient(), new MediaClient());
|
|
79082
79076
|
/**
|
|
@@ -79249,10 +79243,10 @@
|
|
|
79249
79243
|
*/
|
|
79250
79244
|
hangup(callId, reasonText, reasonCode) {
|
|
79251
79245
|
const _super = Object.create(null, {
|
|
79252
|
-
|
|
79246
|
+
hangup: { get: () => super.hangup }
|
|
79253
79247
|
});
|
|
79254
79248
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79255
|
-
return _super.
|
|
79249
|
+
return _super.hangup.call(this, callId, reasonText || null, reasonCode || null);
|
|
79256
79250
|
});
|
|
79257
79251
|
}
|
|
79258
79252
|
say(callId, params) {
|