@vonage/client-sdk 1.5.1-rc.0 → 1.5.2-beta.0
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 +17 -14
- package/api_docs/ts/assets/navigation.js +1 -1
- package/api_docs/ts/assets/search.js +1 -1
- package/api_docs/ts/classes/ClientConfig.html +1 -1
- package/api_docs/ts/classes/ClientInitConfig.html +1 -1
- package/api_docs/ts/classes/VonageClient.html +9 -9
- package/api_docs/ts/enums/CallDisconnectReason.html +3 -0
- package/api_docs/ts/{interfaces/VonageEvent.html → enums/CancelReason.html} +6 -2
- package/api_docs/ts/enums/ChannelType.html +13 -0
- package/api_docs/ts/enums/HangupReason.html +7 -0
- package/api_docs/ts/enums/LegStatus.html +5 -0
- package/api_docs/ts/enums/LoggingLevel.html +10 -0
- package/api_docs/ts/enums/OrderBy.html +1 -1
- package/api_docs/ts/enums/PresentingOrder.html +1 -1
- package/api_docs/ts/enums/VoiceChannelType.html +6 -0
- package/api_docs/ts/functions/none.html +1 -1
- package/api_docs/ts/functions/setDefaultLoggingLevel.html +3 -3
- package/api_docs/ts/functions/setVonageClientLoggingLevel.html +3 -3
- package/api_docs/ts/functions/some.html +1 -1
- package/api_docs/ts/index.html +1 -1
- package/api_docs/ts/interfaces/CallSayParams.html +1 -1
- package/api_docs/ts/interfaces/Channel.html +1 -1
- package/api_docs/ts/interfaces/Conversation.html +1 -1
- package/api_docs/ts/interfaces/ConversationProperties.html +1 -1
- package/api_docs/ts/interfaces/ConversationTimestamp.html +1 -1
- package/api_docs/ts/interfaces/ConversationsPage.html +1 -1
- package/api_docs/ts/interfaces/CreateConversationParameters.html +1 -1
- package/api_docs/ts/interfaces/EphemeralConversationEvent.html +3 -3
- package/api_docs/ts/interfaces/EventsPage.html +1 -1
- package/api_docs/ts/interfaces/GetCallLegsParameters.html +1 -1
- package/api_docs/ts/interfaces/GetConversationEventsParameters.html +1 -1
- package/api_docs/ts/interfaces/GetConversationMembersParameters.html +1 -1
- package/api_docs/ts/interfaces/GetConversationsParameters.html +1 -1
- package/api_docs/ts/interfaces/Leg.html +1 -1
- package/api_docs/ts/interfaces/LegChannel.html +1 -1
- package/api_docs/ts/interfaces/LegsPage.html +1 -1
- package/api_docs/ts/interfaces/Location.html +1 -1
- package/api_docs/ts/interfaces/Member.html +11 -11
- package/api_docs/ts/interfaces/MemberChannel.html +7 -7
- package/api_docs/ts/interfaces/MemberEventBody.html +2 -2
- package/api_docs/ts/interfaces/MemberTimestamp.html +1 -1
- package/api_docs/ts/interfaces/MembersPage.html +1 -1
- package/api_docs/ts/interfaces/MessageAudioEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageCustomEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageFileEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageImageEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageLocationEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageTemplateEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageTextEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageVCardEventBody.html +2 -2
- package/api_docs/ts/interfaces/MessageVideoEventBody.html +2 -2
- package/api_docs/ts/interfaces/RTCQuality.html +1 -1
- package/api_docs/ts/interfaces/RtcStats.html +1 -1
- package/api_docs/ts/interfaces/Template.html +1 -1
- package/api_docs/ts/interfaces/UpdateConversationParameters.html +1 -1
- package/api_docs/ts/interfaces/User.html +1 -1
- package/api_docs/ts/interfaces/UserChannels.html +1 -1
- package/api_docs/ts/interfaces/UserTimestamp.html +1 -1
- package/api_docs/ts/interfaces/Whatsapp.html +1 -1
- package/api_docs/ts/modules.html +13 -33
- package/api_docs/ts/types/ClientConfigObject.html +6 -0
- package/api_docs/ts/types/ClientInitConfigObject.html +6 -0
- package/api_docs/ts/types/ConfigRegion.html +2 -2
- package/api_docs/ts/types/ConversationEvent.html +2 -2
- package/api_docs/ts/types/CustomData.html +1 -1
- package/api_docs/ts/types/Json.html +1 -1
- package/api_docs/ts/types/JsonValue.html +1 -1
- package/api_docs/ts/types/MemberStatus.html +1 -1
- package/api_docs/ts/types/Option.html +1 -1
- package/api_docs/ts/types/PersistentConversationEvent.html +2 -2
- package/api_docs/ts/types/Topics.html +2 -2
- package/api_docs/ts/types/VonageEvent.html +2 -0
- package/api_docs/ts/types/VonageLogger.html +4 -0
- package/api_docs/ts/variables/Topics-1.html +2 -2
- package/dist/client/VonageClient.d.ts +14 -24
- package/dist/client/index.cjs +884 -860
- package/dist/client/index.mjs +884 -861
- package/dist/coreExtend.d.ts +14 -0
- package/dist/kotlin/JsUnions.d.ts +24 -0
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +67 -141
- package/dist/utils/ClientConfig.d.ts +0 -2
- package/dist/utils/ConversationModels.d.ts +22 -5
- package/dist/utils/Enums.d.ts +53 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/logging.d.ts +10 -2
- package/dist/vonageClientSDK.js +884 -860
- package/dist/vonageClientSDK.min.js +20 -20
- package/dist/vonageClientSDK.min.mjs +20 -20
- package/dist/vonageClientSDK.mjs +884 -861
- package/package.json +1 -1
- package/api_docs/ts/interfaces/ClientConfigObject.html +0 -18
- package/api_docs/ts/interfaces/ClientInitConfigObject.html +0 -24
- package/api_docs/ts/interfaces/CustomConversationEvent.html +0 -16
- package/api_docs/ts/interfaces/EmbeddedInfo.html +0 -8
- package/api_docs/ts/interfaces/EventDeleteConversationEvent.html +0 -14
- package/api_docs/ts/interfaces/MemberInvitedEvent.html +0 -14
- package/api_docs/ts/interfaces/MemberJoinedEvent.html +0 -14
- package/api_docs/ts/interfaces/MemberLeftEvent.html +0 -14
- package/api_docs/ts/interfaces/MessageAudioEvent.html +0 -16
- package/api_docs/ts/interfaces/MessageCustomEvent.html +0 -16
- package/api_docs/ts/interfaces/MessageDeliveredEvent.html +0 -14
- package/api_docs/ts/interfaces/MessageFileEvent.html +0 -16
- package/api_docs/ts/interfaces/MessageImageEvent.html +0 -16
- package/api_docs/ts/interfaces/MessageLocationEvent.html +0 -16
- package/api_docs/ts/interfaces/MessageRejectedEvent.html +0 -14
- package/api_docs/ts/interfaces/MessageSeenEvent.html +0 -14
- package/api_docs/ts/interfaces/MessageSubmittedEvent.html +0 -14
- package/api_docs/ts/interfaces/MessageTemplateEvent.html +0 -17
- package/api_docs/ts/interfaces/MessageTextEvent.html +0 -16
- package/api_docs/ts/interfaces/MessageUndeliverableEvent.html +0 -14
- package/api_docs/ts/interfaces/MessageVCardEvent.html +0 -16
- package/api_docs/ts/interfaces/MessageVideoEvent.html +0 -16
- package/api_docs/ts/interfaces/System.html +0 -4
- package/api_docs/ts/interfaces/VonageLogger.html +0 -10
- package/api_docs/ts/types/ChannelType.html +0 -2
- package/api_docs/ts/types/ConversationState.html +0 -2
- package/api_docs/ts/types/From.html +0 -2
- package/api_docs/ts/types/LoggingLevel.html +0 -4
- package/api_docs/ts/types/MemberState.html +0 -2
- package/api_docs/ts/types/NonPersistentConversationEvent.html +0 -2
package/dist/coreExtend.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './kotlin/clientsdk-clientcore_js';
|
|
2
2
|
import { Json as InternalJson } from './utils/JsonUtils';
|
|
3
|
+
import { Member } from './utils';
|
|
3
4
|
declare module './kotlin/clientsdk-clientcore_js' {
|
|
4
5
|
type Json = InternalJson;
|
|
5
6
|
namespace vonage {
|
|
@@ -89,6 +90,19 @@ declare module './kotlin/clientsdk-clientcore_js' {
|
|
|
89
90
|
* @group Voice
|
|
90
91
|
*/
|
|
91
92
|
reconnectCall(callId: string): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Get a Member of a Conversation
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* [[include: snippet_GetConversationMember.txt]]
|
|
98
|
+
*
|
|
99
|
+
* @group Chat
|
|
100
|
+
* @beta
|
|
101
|
+
* @param cid - the Conversation's id
|
|
102
|
+
* @param mid - the Member's id
|
|
103
|
+
* @returns the `Member`
|
|
104
|
+
*/
|
|
105
|
+
getConversationMember(cid: string, mid: string): Promise<Member>;
|
|
92
106
|
}
|
|
93
107
|
}
|
|
94
108
|
}
|
|
@@ -388,6 +388,10 @@ export type MessageVideoEvent = Omit<vonage.MessageVideoEventJS, 'kind' | 'from'
|
|
|
388
388
|
* @group Chat
|
|
389
389
|
*/
|
|
390
390
|
export type PersistentConversationEvent = CustomConversationEvent | EventDeleteConversationEvent | MemberInvitedEvent | MemberJoinedEvent | MemberLeftEvent | MessageAudioEvent | MessageCustomEvent | MessageDeliveredEvent | MessageFileEvent | MessageImageEvent | MessageLocationEvent | MessageRejectedEvent | MessageSeenEvent | MessageSubmittedEvent | MessageTemplateEvent | MessageTextEvent | MessageUndeliverableEvent | MessageVCardEvent | MessageVideoEvent;
|
|
391
|
+
/**
|
|
392
|
+
* A VoiceChannelTypeJS is a union of 'app', 'phone', 'sip', 'websocket'
|
|
393
|
+
*/
|
|
394
|
+
export type VoiceChannelTypeJS = 'app' | 'phone' | 'sip' | 'websocket';
|
|
391
395
|
/**
|
|
392
396
|
* A ConversationEvent is a union of {@link NonPersistentConversationEvent}, {@link PersistentConversationEvent}
|
|
393
397
|
* @group Chat
|
|
@@ -401,3 +405,23 @@ export type ConversationState = 'ACTIVE' | 'INACTIVE' | 'DELETED';
|
|
|
401
405
|
* A MemberState is a union of 'INVITED', 'JOINED', 'LEFT', 'UNKNOWN'
|
|
402
406
|
*/
|
|
403
407
|
export type MemberState = 'INVITED' | 'JOINED' | 'LEFT' | 'UNKNOWN';
|
|
408
|
+
/**
|
|
409
|
+
* A ConversationChannelType is a union of 'APP', 'PHONE', 'PSTN', 'sip', 'VBC', 'WEBSOCKET', 'SMS', 'MMS', 'WHATSAPP', 'VIBER', 'MESSENGER'
|
|
410
|
+
*/
|
|
411
|
+
export type ConversationChannelType = 'APP' | 'PHONE' | 'PSTN' | 'sip' | 'VBC' | 'WEBSOCKET' | 'SMS' | 'MMS' | 'WHATSAPP' | 'VIBER' | 'MESSENGER';
|
|
412
|
+
/**
|
|
413
|
+
* A LegStatusJS is a union of 'RINGING', 'ANSWERED', 'COMPLETED'
|
|
414
|
+
*/
|
|
415
|
+
export type LegStatusJS = 'RINGING' | 'ANSWERED' | 'COMPLETED';
|
|
416
|
+
/**
|
|
417
|
+
* A CallDisconnectReasonJS is a 'networkChange'
|
|
418
|
+
*/
|
|
419
|
+
export type CallDisconnectReasonJS = 'networkChange';
|
|
420
|
+
/**
|
|
421
|
+
* A HangupReasonJS is a union of 'REMOTE_HANGUP', 'REMOTE_REJECT', 'REMOTE_NO_ANSWER_TIMEOUT', 'LOCAL_HANGUP', 'MEDIA_TIMEOUT'
|
|
422
|
+
*/
|
|
423
|
+
export type HangupReasonJS = 'REMOTE_HANGUP' | 'REMOTE_REJECT' | 'REMOTE_NO_ANSWER_TIMEOUT' | 'LOCAL_HANGUP' | 'MEDIA_TIMEOUT';
|
|
424
|
+
/**
|
|
425
|
+
* A CancelReasonJS is a union of 'RemoteCancel', 'AnsweredElsewhere', 'RejectedElsewhere', 'RemoteTimeout'
|
|
426
|
+
*/
|
|
427
|
+
export type CancelReasonJS = 'RemoteCancel' | 'AnsweredElsewhere' | 'RejectedElsewhere' | 'RemoteTimeout';
|
|
@@ -2,16 +2,16 @@ type Nullable<T> = T | null | undefined
|
|
|
2
2
|
export declare namespace vonage {
|
|
3
3
|
interface CombinedEvents extends vonage.VoiceEvents, vonage.ChatEvents {
|
|
4
4
|
callInvite(callId: string, from: string, channelType: string): void;
|
|
5
|
-
callInviteCancel(callId: string, reason:
|
|
5
|
+
callInviteCancel(callId: string, reason: string): void;
|
|
6
6
|
callTransfer(callId: string, conversationId: string): void;
|
|
7
7
|
mute(callId: string, legId: string, isMuted: boolean): void;
|
|
8
8
|
earmuff(callId: string, legId: string, earmuffStatus: boolean): void;
|
|
9
9
|
dtmf(callId: string, legId: string, digits: string): void;
|
|
10
|
-
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason:
|
|
11
|
-
legStatusUpdate(callId: string, legId: string, status:
|
|
10
|
+
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: string): void;
|
|
11
|
+
legStatusUpdate(callId: string, legId: string, status: string): void;
|
|
12
12
|
callMediaReconnecting(callId: string): void;
|
|
13
13
|
callMediaReconnection(callId: string): void;
|
|
14
|
-
callMediaDisconnect(callId: string, reason:
|
|
14
|
+
callMediaDisconnect(callId: string, reason: string): void;
|
|
15
15
|
rtcStatsUpdate(rtcStats: vonage.RTCStatsJS, legId: string): void;
|
|
16
16
|
callMediaError(callId: string, error: vonage.VonageErrorJS): void;
|
|
17
17
|
reconnecting(): void;
|
|
@@ -21,6 +21,15 @@ export declare namespace vonage {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
export declare namespace vonage {
|
|
24
|
+
const VoiceChannelTypeObject: {
|
|
25
|
+
get app(): string;
|
|
26
|
+
get phone(): string;
|
|
27
|
+
get sip(): string;
|
|
28
|
+
get websocket(): string;
|
|
29
|
+
toString(): string;
|
|
30
|
+
hashCode(): number;
|
|
31
|
+
equals(other: Nullable<any>): boolean;
|
|
32
|
+
};
|
|
24
33
|
class CombinedClientJS implements vonage.IChatClientJS, vonage.IVoiceClientJS {
|
|
25
34
|
constructor(config: vonage.InitConfigObjectJS, http: vonage.HttpClientJS, socket: vonage.SocketClientJS, media: vonage.MediaClientJS);
|
|
26
35
|
get media(): vonage.MediaClientJS;
|
|
@@ -584,7 +593,7 @@ export declare namespace vonage {
|
|
|
584
593
|
}
|
|
585
594
|
class MemberChannelJS {
|
|
586
595
|
private constructor();
|
|
587
|
-
get type():
|
|
596
|
+
get type(): string;
|
|
588
597
|
get from(): Nullable<vonage.ChannelJS>;
|
|
589
598
|
get to(): Nullable<vonage.ChannelJS>;
|
|
590
599
|
}
|
|
@@ -627,57 +636,22 @@ export declare namespace vonage {
|
|
|
627
636
|
get previousCursor(): Nullable<string>;
|
|
628
637
|
get nextCursor(): Nullable<string>;
|
|
629
638
|
}
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
get ordinal(): 3;
|
|
647
|
-
};
|
|
648
|
-
static get VBC(): vonage.ChannelTypeJS & {
|
|
649
|
-
get name(): "VBC";
|
|
650
|
-
get ordinal(): 4;
|
|
651
|
-
};
|
|
652
|
-
static get WEBSOCKET(): vonage.ChannelTypeJS & {
|
|
653
|
-
get name(): "WEBSOCKET";
|
|
654
|
-
get ordinal(): 5;
|
|
655
|
-
};
|
|
656
|
-
static get SMS(): vonage.ChannelTypeJS & {
|
|
657
|
-
get name(): "SMS";
|
|
658
|
-
get ordinal(): 6;
|
|
659
|
-
};
|
|
660
|
-
static get MMS(): vonage.ChannelTypeJS & {
|
|
661
|
-
get name(): "MMS";
|
|
662
|
-
get ordinal(): 7;
|
|
663
|
-
};
|
|
664
|
-
static get WHATSAPP(): vonage.ChannelTypeJS & {
|
|
665
|
-
get name(): "WHATSAPP";
|
|
666
|
-
get ordinal(): 8;
|
|
667
|
-
};
|
|
668
|
-
static get VIBER(): vonage.ChannelTypeJS & {
|
|
669
|
-
get name(): "VIBER";
|
|
670
|
-
get ordinal(): 9;
|
|
671
|
-
};
|
|
672
|
-
static get MESSENGER(): vonage.ChannelTypeJS & {
|
|
673
|
-
get name(): "MESSENGER";
|
|
674
|
-
get ordinal(): 10;
|
|
675
|
-
};
|
|
676
|
-
static values(): Array<vonage.ChannelTypeJS>;
|
|
677
|
-
static valueOf(value: string): vonage.ChannelTypeJS;
|
|
678
|
-
get name(): "APP" | "PHONE" | "PSTN" | "sip" | "VBC" | "WEBSOCKET" | "SMS" | "MMS" | "WHATSAPP" | "VIBER" | "MESSENGER";
|
|
679
|
-
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
680
|
-
}
|
|
639
|
+
const ChannelTypeObj: {
|
|
640
|
+
get APP(): string;
|
|
641
|
+
get PHONE(): string;
|
|
642
|
+
get PSTN(): string;
|
|
643
|
+
get SIP(): string;
|
|
644
|
+
get VBC(): string;
|
|
645
|
+
get WEBSOCKET(): string;
|
|
646
|
+
get SMS(): string;
|
|
647
|
+
get MMS(): string;
|
|
648
|
+
get WHATSAPP(): string;
|
|
649
|
+
get VIBER(): string;
|
|
650
|
+
get MESSENGER(): string;
|
|
651
|
+
toString(): string;
|
|
652
|
+
hashCode(): number;
|
|
653
|
+
equals(other: Nullable<any>): boolean;
|
|
654
|
+
};
|
|
681
655
|
}
|
|
682
656
|
export declare namespace vonage {
|
|
683
657
|
const CSErrorCodesJS: {
|
|
@@ -1014,16 +988,16 @@ export declare namespace vonage {
|
|
|
1014
988
|
export declare namespace vonage {
|
|
1015
989
|
interface VoiceEvents extends vonage.CoreClientEvents {
|
|
1016
990
|
callInvite(callId: string, from: string, channelType: string): void;
|
|
1017
|
-
callInviteCancel(callId: string, reason:
|
|
991
|
+
callInviteCancel(callId: string, reason: string): void;
|
|
1018
992
|
callTransfer(callId: string, conversationId: string): void;
|
|
1019
993
|
mute(callId: string, legId: string, isMuted: boolean): void;
|
|
1020
994
|
earmuff(callId: string, legId: string, earmuffStatus: boolean): void;
|
|
1021
995
|
dtmf(callId: string, legId: string, digits: string): void;
|
|
1022
|
-
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason:
|
|
1023
|
-
legStatusUpdate(callId: string, legId: string, status:
|
|
996
|
+
callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: string): void;
|
|
997
|
+
legStatusUpdate(callId: string, legId: string, status: string): void;
|
|
1024
998
|
callMediaReconnecting(callId: string): void;
|
|
1025
999
|
callMediaReconnection(callId: string): void;
|
|
1026
|
-
callMediaDisconnect(callId: string, reason:
|
|
1000
|
+
callMediaDisconnect(callId: string, reason: string): void;
|
|
1027
1001
|
rtcStatsUpdate(rtcStats: vonage.RTCStatsJS, legId: string): void;
|
|
1028
1002
|
callMediaError(callId: string, error: vonage.VonageErrorJS): void;
|
|
1029
1003
|
reconnecting(): void;
|
|
@@ -1040,63 +1014,30 @@ export declare namespace vonage {
|
|
|
1040
1014
|
}
|
|
1041
1015
|
}
|
|
1042
1016
|
export declare namespace vonage {
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
get
|
|
1060
|
-
get
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
};
|
|
1068
|
-
static values(): Array<vonage.CallDisconnectReasonJS>;
|
|
1069
|
-
static valueOf(value: string): vonage.CallDisconnectReasonJS;
|
|
1070
|
-
get name(): "networkChange";
|
|
1071
|
-
get ordinal(): 0;
|
|
1072
|
-
}
|
|
1073
|
-
abstract class HangupReasonJS {
|
|
1074
|
-
private constructor();
|
|
1075
|
-
static get REMOTE_HANGUP(): vonage.HangupReasonJS & {
|
|
1076
|
-
get name(): "REMOTE_HANGUP";
|
|
1077
|
-
get ordinal(): 0;
|
|
1078
|
-
};
|
|
1079
|
-
static get REMOTE_REJECT(): vonage.HangupReasonJS & {
|
|
1080
|
-
get name(): "REMOTE_REJECT";
|
|
1081
|
-
get ordinal(): 1;
|
|
1082
|
-
};
|
|
1083
|
-
static get REMOTE_NO_ANSWER_TIMEOUT(): vonage.HangupReasonJS & {
|
|
1084
|
-
get name(): "REMOTE_NO_ANSWER_TIMEOUT";
|
|
1085
|
-
get ordinal(): 2;
|
|
1086
|
-
};
|
|
1087
|
-
static get LOCAL_HANGUP(): vonage.HangupReasonJS & {
|
|
1088
|
-
get name(): "LOCAL_HANGUP";
|
|
1089
|
-
get ordinal(): 3;
|
|
1090
|
-
};
|
|
1091
|
-
static get MEDIA_TIMEOUT(): vonage.HangupReasonJS & {
|
|
1092
|
-
get name(): "MEDIA_TIMEOUT";
|
|
1093
|
-
get ordinal(): 4;
|
|
1094
|
-
};
|
|
1095
|
-
static values(): Array<vonage.HangupReasonJS>;
|
|
1096
|
-
static valueOf(value: string): vonage.HangupReasonJS;
|
|
1097
|
-
get name(): "REMOTE_HANGUP" | "REMOTE_REJECT" | "REMOTE_NO_ANSWER_TIMEOUT" | "LOCAL_HANGUP" | "MEDIA_TIMEOUT";
|
|
1098
|
-
get ordinal(): 0 | 1 | 2 | 3 | 4;
|
|
1099
|
-
}
|
|
1017
|
+
const LegStatusJSObject: {
|
|
1018
|
+
get RINGING(): string;
|
|
1019
|
+
get ANSWERED(): string;
|
|
1020
|
+
get COMPLETED(): string;
|
|
1021
|
+
toString(): string;
|
|
1022
|
+
hashCode(): number;
|
|
1023
|
+
equals(other: Nullable<any>): boolean;
|
|
1024
|
+
};
|
|
1025
|
+
const CallDisconnectReasonJSObject: {
|
|
1026
|
+
get NetworkChange(): string;
|
|
1027
|
+
toString(): string;
|
|
1028
|
+
hashCode(): number;
|
|
1029
|
+
equals(other: Nullable<any>): boolean;
|
|
1030
|
+
};
|
|
1031
|
+
const HangupReasonJSObject: {
|
|
1032
|
+
get REMOTE_HANGUP(): string;
|
|
1033
|
+
get REMOTE_REJECT(): string;
|
|
1034
|
+
get REMOTE_NO_ANSWER_TIMEOUT(): string;
|
|
1035
|
+
get LOCAL_HANGUP(): string;
|
|
1036
|
+
get MEDIA_TIMEOUT(): string;
|
|
1037
|
+
toString(): string;
|
|
1038
|
+
hashCode(): number;
|
|
1039
|
+
equals(other: Nullable<any>): boolean;
|
|
1040
|
+
};
|
|
1100
1041
|
interface IVoiceClientJS extends vonage.ICoreClientJS {
|
|
1101
1042
|
readonly media: vonage.MediaClientJS;
|
|
1102
1043
|
readonly core: any/* com.vonage.clientcore.core.CoreClientWithMedia */;
|
|
@@ -1194,30 +1135,15 @@ export declare namespace vonage {
|
|
|
1194
1135
|
const REASON_CLIENT_DISCONNECTED: string;
|
|
1195
1136
|
const REASON_CLIENT_NETWORK_ERROR: string;
|
|
1196
1137
|
const REASON_PING_TIMEOUT: string;
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
get
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
get ordinal(): 1;
|
|
1207
|
-
};
|
|
1208
|
-
static get RejectedElsewhere(): vonage.CancelReasonJS & {
|
|
1209
|
-
get name(): "RejectedElsewhere";
|
|
1210
|
-
get ordinal(): 2;
|
|
1211
|
-
};
|
|
1212
|
-
static get RemoteTimeout(): vonage.CancelReasonJS & {
|
|
1213
|
-
get name(): "RemoteTimeout";
|
|
1214
|
-
get ordinal(): 3;
|
|
1215
|
-
};
|
|
1216
|
-
static values(): Array<vonage.CancelReasonJS>;
|
|
1217
|
-
static valueOf(value: string): vonage.CancelReasonJS;
|
|
1218
|
-
get name(): "RemoteCancel" | "AnsweredElsewhere" | "RejectedElsewhere" | "RemoteTimeout";
|
|
1219
|
-
get ordinal(): 0 | 1 | 2 | 3;
|
|
1220
|
-
}
|
|
1138
|
+
const CancelReasonJSObject: {
|
|
1139
|
+
get RemoteCancel(): string;
|
|
1140
|
+
get AnsweredElsewhere(): string;
|
|
1141
|
+
get RejectedElsewhere(): string;
|
|
1142
|
+
get RemoteTimeout(): string;
|
|
1143
|
+
toString(): string;
|
|
1144
|
+
hashCode(): number;
|
|
1145
|
+
equals(other: Nullable<any>): boolean;
|
|
1146
|
+
};
|
|
1221
1147
|
class RTCQualityJS {
|
|
1222
1148
|
private constructor();
|
|
1223
1149
|
get mos_score(): number;
|
|
@@ -23,7 +23,6 @@ export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
|
|
|
23
23
|
* @property websocketPath The Path component appended to the Websocket URL
|
|
24
24
|
* @property rtcStatsTelemetry Allow users to enable RTCStats
|
|
25
25
|
* @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes
|
|
26
|
-
* @interface
|
|
27
26
|
*
|
|
28
27
|
* @example
|
|
29
28
|
* [[include:snippet_SetClientConfig.txt]]
|
|
@@ -46,7 +45,6 @@ export type ClientConfigObject = ConfigObjectJS | ({
|
|
|
46
45
|
* @property websocketPath The Path component appended to the Websocket URL
|
|
47
46
|
* @property rtcStatsTelemetry Allow users to enable RTCStats
|
|
48
47
|
* @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes
|
|
49
|
-
* @interface
|
|
50
48
|
*
|
|
51
49
|
* @example
|
|
52
50
|
* [[include:snippet_Logging.txt]]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import vonage from '../utils/vonage';
|
|
2
|
-
import { ConversationState, MemberState, PersistentConversationEvent } from '../kotlin/JsUnions';
|
|
2
|
+
import { ConversationChannelType, ConversationState, MemberState, PersistentConversationEvent } from '../kotlin/JsUnions';
|
|
3
3
|
import { Leg } from '../client';
|
|
4
4
|
/**
|
|
5
5
|
* Represents a conversation
|
|
@@ -83,8 +83,9 @@ export type EventsPage = vonage.EventsPageJS & {
|
|
|
83
83
|
* @property timestamp The member timestamp
|
|
84
84
|
* @interface
|
|
85
85
|
*/
|
|
86
|
-
export type Member = vonage.MemberJS & {
|
|
86
|
+
export type Member = Omit<vonage.MemberJS, 'state' | 'channel'> & {
|
|
87
87
|
state?: MemberState;
|
|
88
|
+
channel?: MemberChannel;
|
|
88
89
|
};
|
|
89
90
|
/**
|
|
90
91
|
* Represents a {@link Member} timestamps
|
|
@@ -126,9 +127,23 @@ export type User = vonage.UserJS;
|
|
|
126
127
|
export type UserTimestamp = vonage.UserTimestampJS;
|
|
127
128
|
/**
|
|
128
129
|
* The type of a {@link MemberChannel}
|
|
130
|
+
*
|
|
131
|
+
* @enum
|
|
129
132
|
*/
|
|
130
|
-
export
|
|
131
|
-
|
|
133
|
+
export declare const ChannelType: {
|
|
134
|
+
readonly APP: "APP";
|
|
135
|
+
readonly PHONE: "PHONE";
|
|
136
|
+
readonly PSTN: "PSTN";
|
|
137
|
+
readonly sip: "sip";
|
|
138
|
+
readonly VBC: "VBC";
|
|
139
|
+
readonly WEBSOCKET: "WEBSOCKET";
|
|
140
|
+
readonly SMS: "SMS";
|
|
141
|
+
readonly MMS: "MMS";
|
|
142
|
+
readonly WHATSAPP: "WHATSAPP";
|
|
143
|
+
readonly VIBER: "VIBER";
|
|
144
|
+
readonly MESSENGER: "MESSENGER";
|
|
145
|
+
};
|
|
146
|
+
export type ChannelType = ConversationChannelType;
|
|
132
147
|
/**
|
|
133
148
|
* Represents a Member Channel
|
|
134
149
|
*
|
|
@@ -137,7 +152,9 @@ export declare const ChannelType: typeof vonage.ChannelTypeJS;
|
|
|
137
152
|
* @property to The to {@link Channel}
|
|
138
153
|
* @interface
|
|
139
154
|
*/
|
|
140
|
-
export type MemberChannel = vonage.MemberChannelJS
|
|
155
|
+
export type MemberChannel = Omit<vonage.MemberChannelJS, 'type'> & {
|
|
156
|
+
type: ChannelType;
|
|
157
|
+
};
|
|
141
158
|
/**
|
|
142
159
|
* Represents a Channel.
|
|
143
160
|
* It will hold either an id or a number, depending on the Channel,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { HangupReasonJS, LegStatusJS, CallDisconnectReasonJS, CancelReasonJS, VoiceChannelTypeJS } from '../kotlin/JsUnions';
|
|
2
|
+
/**
|
|
3
|
+
* Hangup reasons for a call
|
|
4
|
+
* @enum
|
|
5
|
+
*/
|
|
6
|
+
export declare const HangupReason: {
|
|
7
|
+
readonly REMOTE_HANGUP: "REMOTE_HANGUP";
|
|
8
|
+
readonly REMOTE_REJECT: "REMOTE_REJECT";
|
|
9
|
+
readonly REMOTE_NO_ANSWER_TIMEOUT: "REMOTE_NO_ANSWER_TIMEOUT";
|
|
10
|
+
readonly LOCAL_HANGUP: "LOCAL_HANGUP";
|
|
11
|
+
readonly MEDIA_TIMEOUT: "MEDIA_TIMEOUT";
|
|
12
|
+
};
|
|
13
|
+
export type HangupReason = HangupReasonJS;
|
|
14
|
+
/**
|
|
15
|
+
* Leg status for a call
|
|
16
|
+
* @enum
|
|
17
|
+
*/
|
|
18
|
+
export declare const LegStatus: {
|
|
19
|
+
readonly RINGING: "RINGING";
|
|
20
|
+
readonly ANSWERED: "ANSWERED";
|
|
21
|
+
readonly COMPLETED: "COMPLETED";
|
|
22
|
+
};
|
|
23
|
+
export type LegStatus = LegStatusJS;
|
|
24
|
+
/**
|
|
25
|
+
* Call disconnect reasons
|
|
26
|
+
* @enum
|
|
27
|
+
*/
|
|
28
|
+
export declare const CallDisconnectReason: {
|
|
29
|
+
readonly networkChange: "networkChange";
|
|
30
|
+
};
|
|
31
|
+
export type CallDisconnectReason = CallDisconnectReasonJS;
|
|
32
|
+
/**
|
|
33
|
+
* Call Invite cancel reasons
|
|
34
|
+
* @enum
|
|
35
|
+
*/
|
|
36
|
+
export declare const CancelReason: {
|
|
37
|
+
readonly RemoteCancel: "RemoteCancel";
|
|
38
|
+
readonly RejectedElsewhere: "RejectedElsewhere";
|
|
39
|
+
readonly RemoteTimeout: "RemoteTimeout";
|
|
40
|
+
readonly AnsweredElsewhere: "AnsweredElsewhere";
|
|
41
|
+
};
|
|
42
|
+
export type CancelReason = CancelReasonJS;
|
|
43
|
+
/**
|
|
44
|
+
* Voice Channel Types
|
|
45
|
+
* @enum
|
|
46
|
+
*/
|
|
47
|
+
export declare const VoiceChannelType: {
|
|
48
|
+
readonly app: "app";
|
|
49
|
+
readonly phone: "phone";
|
|
50
|
+
readonly sip: "sip";
|
|
51
|
+
readonly websocket: "websocket";
|
|
52
|
+
};
|
|
53
|
+
export type VoiceChannelType = VoiceChannelTypeJS;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ export { ClientConfig, ClientInitConfig, ClientConfigObject, ClientInitConfigObj
|
|
|
2
2
|
export { type Topic, type VonageLogger, LoggingLevel, Topics, createVonageLogger, setDefaultLoggingLevel, setVonageClientLoggingLevel } from './logging';
|
|
3
3
|
export * from './JsonUtils';
|
|
4
4
|
export * from './ConversationModels';
|
|
5
|
-
export * from '../kotlin/JsUnions';
|
|
6
5
|
export * from './ErrorModels';
|
|
7
6
|
export * from './RequestParameterModels';
|
|
8
7
|
export * from './Option';
|
|
9
8
|
export * from './ConversationEventBodies';
|
|
9
|
+
export * from './Enums';
|
|
10
|
+
export { ConversationEvent, EphemeralConversationEvent, PersistentConversationEvent } from '../kotlin/JsUnions';
|
package/dist/utils/logging.d.ts
CHANGED
|
@@ -16,9 +16,18 @@ export type LoggingLevelName = typeof vonage.LoggingLevelJS.prototype.name;
|
|
|
16
16
|
*
|
|
17
17
|
* It can be set for the internal logger via {@link ClientInitConfigObject.loggingLevel}
|
|
18
18
|
* as well as for a custom logger via {@link VonageLogger.minLogLevel}.
|
|
19
|
+
*
|
|
20
|
+
* @enum
|
|
19
21
|
*/
|
|
22
|
+
export declare const LoggingLevel: {
|
|
23
|
+
readonly Verbose: "Verbose";
|
|
24
|
+
readonly Debug: "Debug";
|
|
25
|
+
readonly Info: "Info";
|
|
26
|
+
readonly Warn: "Warn";
|
|
27
|
+
readonly Error: "Error";
|
|
28
|
+
readonly Assert: "Assert";
|
|
29
|
+
};
|
|
20
30
|
export type LoggingLevel = vonage.LoggingLevelJS | LoggingLevelName;
|
|
21
|
-
export declare const LoggingLevel: typeof vonage.LoggingLevelJS;
|
|
22
31
|
/**
|
|
23
32
|
* @deprecated Use {@link ClientInitConfigObject.loggingLevel} instead.
|
|
24
33
|
* @param level - The logging level to set.
|
|
@@ -36,7 +45,6 @@ export declare const setVonageClientLoggingLevel: (level: LoggingLevel) => void;
|
|
|
36
45
|
* @property minLogLevel The minimum log level of the logger.
|
|
37
46
|
* @property topics The topics that the logger is subscribed to.
|
|
38
47
|
* @property onLog The callback to be invoked when a log is emitted.
|
|
39
|
-
* @interface
|
|
40
48
|
*
|
|
41
49
|
* @example
|
|
42
50
|
* [[include: snippet_Logging.txt]]
|