@vonage/client-sdk 1.2.1-snapshot.17.0 → 1.2.1
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 +120 -19
- package/dist/client/VonageClient.d.ts +12 -1
- package/dist/client/index.cjs +3597 -3462
- package/dist/client/index.mjs +3598 -3461
- package/dist/coreExtend.d.ts +0 -10
- package/dist/kotlin/JsUnions.d.ts +11 -1
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +37 -67
- package/dist/utils/ClientConfig.d.ts +9 -4
- package/dist/utils/ConversationModels.d.ts +14 -8
- package/dist/vonageClientSDK.js +3617 -3462
- package/dist/vonageClientSDK.min.js +1 -1
- package/dist/vonageClientSDK.min.mjs +1 -1
- package/dist/vonageClientSDK.mjs +3618 -3461
- package/package.json +1 -1
- /package/dist/{utils → lib}/ConnectivityManager.d.ts +0 -0
package/dist/coreExtend.d.ts
CHANGED
|
@@ -2,16 +2,6 @@ import './kotlin/clientsdk-clientcore_js';
|
|
|
2
2
|
declare module './kotlin/clientsdk-clientcore_js' {
|
|
3
3
|
namespace vonage {
|
|
4
4
|
interface CombinedClientJS {
|
|
5
|
-
/**
|
|
6
|
-
* Set a configuration for the client SDK
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* [[include: snippet_SetClientConfig.txt]]
|
|
10
|
-
*
|
|
11
|
-
* @param config - A configuration object
|
|
12
|
-
* @returns void
|
|
13
|
-
*/
|
|
14
|
-
setConfig(config: ConfigObjectJS): void;
|
|
15
5
|
/**
|
|
16
6
|
* Mute your leg of a call
|
|
17
7
|
*
|
|
@@ -13,7 +13,7 @@ export type EmbeddedInfo = {
|
|
|
13
13
|
/**
|
|
14
14
|
* The System type
|
|
15
15
|
*
|
|
16
|
-
* @property
|
|
16
|
+
* @property KIND the KIND property of the System
|
|
17
17
|
* @interface
|
|
18
18
|
*/
|
|
19
19
|
export type System = {
|
|
@@ -249,3 +249,13 @@ export type PersistentConversationEvent = CustomConversationEvent | MemberInvite
|
|
|
249
249
|
* @interface
|
|
250
250
|
*/
|
|
251
251
|
export type ConversationEvent = NonPersistentConversationEvent | PersistentConversationEvent;
|
|
252
|
+
/**
|
|
253
|
+
* A ConversationState is a union of 'ACTIVE', 'INACTIVE', 'DELETED'
|
|
254
|
+
* @interface
|
|
255
|
+
*/
|
|
256
|
+
export type ConversationState = 'ACTIVE' | 'INACTIVE' | 'DELETED';
|
|
257
|
+
/**
|
|
258
|
+
* A MemberState is a union of 'INVITED', 'JOINED', 'LEFT', 'UNKNOWN'
|
|
259
|
+
* @interface
|
|
260
|
+
*/
|
|
261
|
+
export type MemberState = 'INVITED' | 'JOINED' | 'LEFT' | 'UNKNOWN';
|
|
@@ -155,7 +155,13 @@ export declare namespace vonage {
|
|
|
155
155
|
get body(): vonage.MemberEventBodyJS;
|
|
156
156
|
readonly __doNotUseOrImplementIt: vonage.MemberEventJS["__doNotUseOrImplementIt"] & vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
157
157
|
}
|
|
158
|
-
|
|
158
|
+
interface JSONBodyEventJS {
|
|
159
|
+
readonly body: string;
|
|
160
|
+
readonly __doNotUseOrImplementIt: {
|
|
161
|
+
readonly "vonage.JSONBodyEventJS": unique symbol;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
class CustomConversationEventJS implements vonage.PersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
159
165
|
private constructor();
|
|
160
166
|
get kind(): string;
|
|
161
167
|
get id(): number;
|
|
@@ -164,20 +170,21 @@ export declare namespace vonage {
|
|
|
164
170
|
get from(): vonage.FromJS;
|
|
165
171
|
get eventType(): Nullable<string>;
|
|
166
172
|
get body(): string;
|
|
167
|
-
readonly __doNotUseOrImplementIt: vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
173
|
+
readonly __doNotUseOrImplementIt: vonage.PersistentConversationEventJS["__doNotUseOrImplementIt"] & vonage.JSONBodyEventJS["__doNotUseOrImplementIt"];
|
|
168
174
|
}
|
|
169
|
-
class EphemeralConversationEventJS implements vonage.NonPersistentConversationEventJS {
|
|
175
|
+
class EphemeralConversationEventJS implements vonage.NonPersistentConversationEventJS, vonage.JSONBodyEventJS {
|
|
170
176
|
private constructor();
|
|
171
177
|
get kind(): string;
|
|
172
178
|
get timestamp(): string;
|
|
173
179
|
get conversationId(): string;
|
|
174
180
|
get from(): vonage.FromJS;
|
|
175
181
|
get body(): string;
|
|
176
|
-
readonly __doNotUseOrImplementIt: vonage.NonPersistentConversationEventJS["__doNotUseOrImplementIt"];
|
|
182
|
+
readonly __doNotUseOrImplementIt: vonage.NonPersistentConversationEventJS["__doNotUseOrImplementIt"] & vonage.JSONBodyEventJS["__doNotUseOrImplementIt"];
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
185
|
export declare namespace vonage {
|
|
180
186
|
interface MessageEventJS {
|
|
187
|
+
readonly body: vonage.MessageEventBodyJS;
|
|
181
188
|
readonly __doNotUseOrImplementIt: {
|
|
182
189
|
readonly "vonage.MessageEventJS": unique symbol;
|
|
183
190
|
};
|
|
@@ -413,32 +420,21 @@ export declare namespace vonage {
|
|
|
413
420
|
get name(): string;
|
|
414
421
|
get timestamp(): vonage.ConversationTimestampJS;
|
|
415
422
|
get memberId(): Nullable<string>;
|
|
416
|
-
get memberState(): Nullable<
|
|
423
|
+
get memberState(): Nullable<string>;
|
|
417
424
|
get displayName(): Nullable<string>;
|
|
418
425
|
get imageUrl(): Nullable<string>;
|
|
419
|
-
get state(): Nullable<
|
|
426
|
+
get state(): Nullable<string>;
|
|
420
427
|
get customData(): Nullable<string>;
|
|
421
428
|
get customSortKey(): Nullable<string>;
|
|
422
429
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
get ordinal(): 1;
|
|
432
|
-
};
|
|
433
|
-
static get DELETED(): vonage.ConversationStateJS & {
|
|
434
|
-
get name(): "DELETED";
|
|
435
|
-
get ordinal(): 2;
|
|
436
|
-
};
|
|
437
|
-
static values(): Array<vonage.ConversationStateJS>;
|
|
438
|
-
static valueOf(value: string): vonage.ConversationStateJS;
|
|
439
|
-
get name(): "ACTIVE" | "INACTIVE" | "DELETED";
|
|
440
|
-
get ordinal(): 0 | 1 | 2;
|
|
441
|
-
}
|
|
430
|
+
const ConversationStateJS: {
|
|
431
|
+
get ACTIVE(): string;
|
|
432
|
+
get INACTIVE(): string;
|
|
433
|
+
get DELETED(): string;
|
|
434
|
+
toString(): string;
|
|
435
|
+
hashCode(): number;
|
|
436
|
+
equals(other: Nullable<any>): boolean;
|
|
437
|
+
};
|
|
442
438
|
class ConversationTimestampJS {
|
|
443
439
|
private constructor();
|
|
444
440
|
get created(): Nullable<string>;
|
|
@@ -454,34 +450,20 @@ export declare namespace vonage {
|
|
|
454
450
|
class MemberJS {
|
|
455
451
|
private constructor();
|
|
456
452
|
get id(): string;
|
|
457
|
-
get state():
|
|
453
|
+
get state(): string;
|
|
458
454
|
get user(): Nullable<vonage.UserJS>;
|
|
459
455
|
get channel(): Nullable<vonage.MemberChannelJS>;
|
|
460
456
|
get timestamp(): Nullable<vonage.MemberTimestampJS>;
|
|
461
457
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
};
|
|
472
|
-
static get LEFT(): vonage.MemberStateJS & {
|
|
473
|
-
get name(): "LEFT";
|
|
474
|
-
get ordinal(): 2;
|
|
475
|
-
};
|
|
476
|
-
static get UNKNOWN(): vonage.MemberStateJS & {
|
|
477
|
-
get name(): "UNKNOWN";
|
|
478
|
-
get ordinal(): 3;
|
|
479
|
-
};
|
|
480
|
-
static values(): Array<vonage.MemberStateJS>;
|
|
481
|
-
static valueOf(value: string): vonage.MemberStateJS;
|
|
482
|
-
get name(): "INVITED" | "JOINED" | "LEFT" | "UNKNOWN";
|
|
483
|
-
get ordinal(): 0 | 1 | 2 | 3;
|
|
484
|
-
}
|
|
458
|
+
const MemberStateJSObj: {
|
|
459
|
+
get INVITED(): string;
|
|
460
|
+
get JOINED(): string;
|
|
461
|
+
get LEFT(): string;
|
|
462
|
+
get UNKNOWN(): string;
|
|
463
|
+
toString(): string;
|
|
464
|
+
hashCode(): number;
|
|
465
|
+
equals(other: Nullable<any>): boolean;
|
|
466
|
+
};
|
|
485
467
|
class MemberTimestampJS {
|
|
486
468
|
private constructor();
|
|
487
469
|
get invited(): Nullable<string>;
|
|
@@ -567,8 +549,8 @@ export declare namespace vonage {
|
|
|
567
549
|
get name(): "PSTN";
|
|
568
550
|
get ordinal(): 2;
|
|
569
551
|
};
|
|
570
|
-
static get
|
|
571
|
-
get name(): "
|
|
552
|
+
static get sip(): vonage.ChannelTypeJS & {
|
|
553
|
+
get name(): "sip";
|
|
572
554
|
get ordinal(): 3;
|
|
573
555
|
};
|
|
574
556
|
static get VBC(): vonage.ChannelTypeJS & {
|
|
@@ -601,7 +583,7 @@ export declare namespace vonage {
|
|
|
601
583
|
};
|
|
602
584
|
static values(): Array<vonage.ChannelTypeJS>;
|
|
603
585
|
static valueOf(value: string): vonage.ChannelTypeJS;
|
|
604
|
-
get name(): "APP" | "PHONE" | "PSTN" | "
|
|
586
|
+
get name(): "APP" | "PHONE" | "PSTN" | "sip" | "VBC" | "WEBSOCKET" | "SMS" | "MMS" | "WHATSAPP" | "VIBER" | "MESSENGER";
|
|
605
587
|
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
606
588
|
}
|
|
607
589
|
}
|
|
@@ -766,7 +748,7 @@ export declare namespace vonage {
|
|
|
766
748
|
get loggingLevel(): vonage.LoggingLevelJS;
|
|
767
749
|
set loggingLevel(value: vonage.LoggingLevelJS);
|
|
768
750
|
}
|
|
769
|
-
abstract class LoggingLevelJS
|
|
751
|
+
abstract class LoggingLevelJS {
|
|
770
752
|
private constructor();
|
|
771
753
|
static get Verbose(): vonage.LoggingLevelJS & {
|
|
772
754
|
get name(): "Verbose";
|
|
@@ -816,9 +798,6 @@ export declare namespace vonage {
|
|
|
816
798
|
static valueOf(value: string): vonage.SessionErrorReasonJS;
|
|
817
799
|
get name(): "EXPIRED_TOKEN" | "TRANSPORT_CLOSED" | "PING_TIMEOUT";
|
|
818
800
|
get ordinal(): 0 | 1 | 2;
|
|
819
|
-
static get Companion(): {
|
|
820
|
-
getSessionErrorReason(reason: any/* com.vonage.clientcore.core.api.SessionErrorReason */): Nullable<vonage.SessionErrorReasonJS>;
|
|
821
|
-
};
|
|
822
801
|
}
|
|
823
802
|
function setDefaultLoggingLevel(level: vonage.LoggingLevelJS): void;
|
|
824
803
|
interface ICoreClientJS {
|
|
@@ -879,9 +858,6 @@ export declare namespace vonage {
|
|
|
879
858
|
static valueOf(value: string): vonage.LegStatusJS;
|
|
880
859
|
get name(): "RINGING" | "ANSWERED" | "COMPLETED";
|
|
881
860
|
get ordinal(): 0 | 1 | 2;
|
|
882
|
-
static get Companion(): {
|
|
883
|
-
getStatus(status: any/* com.vonage.clientcore.core.api.LegStatus */): vonage.LegStatusJS;
|
|
884
|
-
};
|
|
885
861
|
}
|
|
886
862
|
abstract class CallDisconnectReasonJS {
|
|
887
863
|
private constructor();
|
|
@@ -893,9 +869,6 @@ export declare namespace vonage {
|
|
|
893
869
|
static valueOf(value: string): vonage.CallDisconnectReasonJS;
|
|
894
870
|
get name(): "networkChange";
|
|
895
871
|
get ordinal(): 0;
|
|
896
|
-
static get Companion(): {
|
|
897
|
-
getReason(reason: any/* com.vonage.clientcore.core.api.CallDisconnectReason */): vonage.CallDisconnectReasonJS;
|
|
898
|
-
};
|
|
899
872
|
}
|
|
900
873
|
abstract class HangupReasonJS {
|
|
901
874
|
private constructor();
|
|
@@ -923,9 +896,6 @@ export declare namespace vonage {
|
|
|
923
896
|
static valueOf(value: string): vonage.HangupReasonJS;
|
|
924
897
|
get name(): "REMOTE_HANGUP" | "REMOTE_REJECT" | "REMOTE_NO_ANSWER_TIMEOUT" | "LOCAL_HANGUP" | "MEDIA_TIMEOUT";
|
|
925
898
|
get ordinal(): 0 | 1 | 2 | 3 | 4;
|
|
926
|
-
static get Companion(): {
|
|
927
|
-
getReason(reason: any/* com.vonage.clientcore.core.api.HangupReason */): vonage.HangupReasonJS;
|
|
928
|
-
};
|
|
929
899
|
}
|
|
930
900
|
interface IVoiceClientJS extends vonage.ICoreClientJS {
|
|
931
901
|
readonly media: vonage.MediaClientJS;
|
|
@@ -1046,7 +1016,7 @@ export declare namespace vonage {
|
|
|
1046
1016
|
get ordinal(): 0 | 1 | 2 | 3;
|
|
1047
1017
|
}
|
|
1048
1018
|
class RTCQualityJS {
|
|
1049
|
-
constructor(
|
|
1019
|
+
private constructor();
|
|
1050
1020
|
get mos_score(): number;
|
|
1051
1021
|
get quality_percentage(): number;
|
|
1052
1022
|
get jitter_min_var(): number;
|
|
@@ -1056,7 +1026,7 @@ export declare namespace vonage {
|
|
|
1056
1026
|
get flaw_total(): number;
|
|
1057
1027
|
get packet_cnt(): number;
|
|
1058
1028
|
get packet_loss_perc(): number;
|
|
1059
|
-
copy(
|
|
1029
|
+
copy(mos_score?: number, quality_percentage?: number, jitter_min_var?: number, jitter_max_var?: number, jitter_loss_rate?: number, jitter_burst_rate?: number, flaw_total?: number, packet_cnt?: number, packet_loss_perc?: number): vonage.RTCQualityJS;
|
|
1060
1030
|
toString(): string;
|
|
1061
1031
|
hashCode(): number;
|
|
1062
1032
|
equals(other: Nullable<any>): boolean;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { Nullable } from '../kotlin/clientsdk-clientcore_js';
|
|
2
2
|
import vonage from '../utils/vonage';
|
|
3
3
|
export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
|
|
4
|
-
export type ClientConfigObject = ConfigObjectJS
|
|
5
|
-
|
|
4
|
+
export type ClientConfigObject = ConfigObjectJS | ({
|
|
5
|
+
region?: typeof vonage.CoreClientConfigRegionJS.prototype.name;
|
|
6
|
+
} & Omit<ConfigObjectJS, 'region'>);
|
|
7
|
+
export type ClientInitConfigObject = InitConfigObjectJS | ({
|
|
8
|
+
region?: typeof vonage.CoreClientConfigRegionJS.prototype.name;
|
|
9
|
+
loggingLevel?: typeof vonage.LoggingLevelJS.prototype.name;
|
|
10
|
+
} & Omit<InitConfigObjectJS, 'region' | 'loggingLevel'>);
|
|
6
11
|
export interface ConfigObjectJS {
|
|
7
12
|
region?: Nullable<vonage.CoreClientConfigRegionJS>;
|
|
8
13
|
apiUrl?: Nullable<string>;
|
|
@@ -31,7 +36,7 @@ export declare class ClientConfig extends vonage.CoreClientConfigJS {
|
|
|
31
36
|
* The URLs will be automatically set based on the selected region.
|
|
32
37
|
* Defaults to "US" if no region is specified.
|
|
33
38
|
*/
|
|
34
|
-
constructor(region?: vonage.CoreClientConfigRegionJS);
|
|
39
|
+
constructor(region?: vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name);
|
|
35
40
|
}
|
|
36
41
|
export declare class ClientInitConfig extends vonage.CoreClientInitConfigJS {
|
|
37
42
|
/**
|
|
@@ -43,5 +48,5 @@ export declare class ClientInitConfig extends vonage.CoreClientInitConfigJS {
|
|
|
43
48
|
* The URLs will be automatically set based on the selected region.
|
|
44
49
|
* Defaults to "US" if no region is specified.
|
|
45
50
|
*/
|
|
46
|
-
constructor(loggingLevel?: vonage.LoggingLevelJS, region?: vonage.CoreClientConfigRegionJS);
|
|
51
|
+
constructor(loggingLevel?: vonage.LoggingLevelJS | typeof vonage.LoggingLevelJS.prototype.name, region?: vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name);
|
|
47
52
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import vonage from '../utils/vonage';
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { ConversationState, MemberState } from '../kotlin/JsUnions';
|
|
3
|
+
export type Conversation = vonage.ConversationJS & {
|
|
4
|
+
memberState?: MemberState;
|
|
5
|
+
state?: ConversationState;
|
|
6
|
+
};
|
|
7
|
+
export type ConversationsPage = vonage.ConversationsPageJS & {
|
|
8
|
+
conversations: Conversation[];
|
|
9
|
+
};
|
|
10
|
+
export type Member = vonage.MemberJS & {
|
|
11
|
+
state?: MemberState;
|
|
12
|
+
};
|
|
13
|
+
export type MembersPage = vonage.MembersPageJS & {
|
|
14
|
+
members: Member[];
|
|
15
|
+
};
|
|
10
16
|
export type User = vonage.UserJS;
|
|
11
17
|
export type ChannelType = vonage.ChannelTypeJS;
|
|
12
18
|
export declare const ChannelType: typeof vonage.ChannelTypeJS;
|