@vonage/client-sdk 0.1.6-alpha.0 → 0.2.0-alpha.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/dist/client/VonageClient.d.ts +0 -2
- package/dist/client/index.cjs +19199 -15243
- package/dist/client/index.mjs +19194 -15245
- package/dist/kotlin/clientsdk-clientcore_js.d.ts +126 -4
- package/dist/lib/HttpClient.d.ts +1 -1
- package/dist/lib/MediaClient.d.ts +2 -0
- package/dist/utils/ConversationModels.d.ts +14 -0
- package/dist/utils/ErrorModels.d.ts +34 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/vonageClientSDK.js +19420 -15443
- package/dist/vonageClientSDK.min.js +2 -2
- package/dist/vonageClientSDK.min.mjs +2 -2
- package/dist/vonageClientSDK.mjs +19414 -15444
- package/package.json +3 -3
|
@@ -27,6 +27,8 @@ export namespace vonage {
|
|
|
27
27
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
28
28
|
leaveConversation(cid: string): Promise<any>;
|
|
29
29
|
deleteConversation(cid: string): Promise<any>;
|
|
30
|
+
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.ConversationsPageJS>;
|
|
31
|
+
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
|
|
30
32
|
setConfig(config: vonage.CoreClientConfigJS): void;
|
|
31
33
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
32
34
|
deleteSession(): Promise<any>;
|
|
@@ -94,6 +96,12 @@ export namespace vonage {
|
|
|
94
96
|
get updated(): Nullable<string>;
|
|
95
97
|
get destroyed(): Nullable<string>;
|
|
96
98
|
}
|
|
99
|
+
class ConversationsPageJS {
|
|
100
|
+
private constructor();
|
|
101
|
+
get conversations(): Array<vonage.ConversationJS>;
|
|
102
|
+
get previousCursor(): Nullable<string>;
|
|
103
|
+
get nextCursor(): Nullable<string>;
|
|
104
|
+
}
|
|
97
105
|
class MemberJS {
|
|
98
106
|
private constructor();
|
|
99
107
|
get id(): string;
|
|
@@ -131,6 +139,12 @@ export namespace vonage {
|
|
|
131
139
|
get joined(): Nullable<string>;
|
|
132
140
|
get left(): Nullable<string>;
|
|
133
141
|
}
|
|
142
|
+
class MembersPageJS {
|
|
143
|
+
private constructor();
|
|
144
|
+
get members(): Array<vonage.MemberJS>;
|
|
145
|
+
get previousCursor(): Nullable<string>;
|
|
146
|
+
get nextCursor(): Nullable<string>;
|
|
147
|
+
}
|
|
134
148
|
class UserJS {
|
|
135
149
|
private constructor();
|
|
136
150
|
get id(): string;
|
|
@@ -242,6 +256,71 @@ export namespace vonage {
|
|
|
242
256
|
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
243
257
|
}
|
|
244
258
|
}
|
|
259
|
+
export namespace vonage {
|
|
260
|
+
const CSErrorCodesJS: {
|
|
261
|
+
get CONVERSATION_DUPLICATE_NAME(): string;
|
|
262
|
+
get MEMBER_ALREADY_JOINED(): string;
|
|
263
|
+
get MEMBER_ALREADY_INVITED(): string;
|
|
264
|
+
get CONVERSATION_NOT_FOUND(): string;
|
|
265
|
+
get MEMBER_NOT_FOUND(): string;
|
|
266
|
+
get USER_NOT_FOUND(): string;
|
|
267
|
+
get INVALID_CURSOR(): string;
|
|
268
|
+
get VALIDATION_FAIL(): string;
|
|
269
|
+
get CONVERSATION_MAX_NUMBER_OF_MEMBERS(): string;
|
|
270
|
+
};
|
|
271
|
+
const SessionErrorCodesJS: {
|
|
272
|
+
get EMPTY_TOKEN(): string;
|
|
273
|
+
get FORCED_DISCONNECT(): string;
|
|
274
|
+
get TIMEOUT(): string;
|
|
275
|
+
get INTERNAL_FAILURE(): string;
|
|
276
|
+
get NO_ACTIVE_SESSION(): string;
|
|
277
|
+
get ALREADY_ACTIVE_SESSION(): string;
|
|
278
|
+
get INVALID_TOKEN(): string;
|
|
279
|
+
get EXPIRED_TOKEN(): string;
|
|
280
|
+
get INVALID_USER(): string;
|
|
281
|
+
get AUTHORIZATION_ERROR(): string;
|
|
282
|
+
get INVALID_SESSION(): string;
|
|
283
|
+
get MAX_OPEN_SESSIONS(): string;
|
|
284
|
+
get INVALID_SOCKET_TRANSPORT(): string;
|
|
285
|
+
get CLIENT_DISCONNECT(): string;
|
|
286
|
+
get PING_TIMEOUT_DISCONNECT(): string;
|
|
287
|
+
get TRANSPORT_CLOSED_DISCONNECT(): string;
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
export namespace vonage {
|
|
291
|
+
class VonageErrorJS extends Error {
|
|
292
|
+
private constructor();
|
|
293
|
+
get type(): vonage.VonageErrorTypeJS;
|
|
294
|
+
get code(): Nullable<string>;
|
|
295
|
+
}
|
|
296
|
+
abstract class VonageErrorTypeJS {
|
|
297
|
+
private constructor();
|
|
298
|
+
static get CS_ERROR(): vonage.VonageErrorTypeJS & {
|
|
299
|
+
get name(): "CS_ERROR";
|
|
300
|
+
get ordinal(): 0;
|
|
301
|
+
};
|
|
302
|
+
static get HTTP_CLIENT_ERROR(): vonage.VonageErrorTypeJS & {
|
|
303
|
+
get name(): "HTTP_CLIENT_ERROR";
|
|
304
|
+
get ordinal(): 1;
|
|
305
|
+
};
|
|
306
|
+
static get SESSION_ERROR(): vonage.VonageErrorTypeJS & {
|
|
307
|
+
get name(): "SESSION_ERROR";
|
|
308
|
+
get ordinal(): 2;
|
|
309
|
+
};
|
|
310
|
+
static get INTERNAL_ERROR(): vonage.VonageErrorTypeJS & {
|
|
311
|
+
get name(): "INTERNAL_ERROR";
|
|
312
|
+
get ordinal(): 3;
|
|
313
|
+
};
|
|
314
|
+
static get UNKNOWN_ERROR(): vonage.VonageErrorTypeJS & {
|
|
315
|
+
get name(): "UNKNOWN_ERROR";
|
|
316
|
+
get ordinal(): 4;
|
|
317
|
+
};
|
|
318
|
+
static values(): Array<vonage.VonageErrorTypeJS>;
|
|
319
|
+
static valueOf(value: string): vonage.VonageErrorTypeJS;
|
|
320
|
+
get name(): "CS_ERROR" | "HTTP_CLIENT_ERROR" | "SESSION_ERROR" | "INTERNAL_ERROR" | "UNKNOWN_ERROR";
|
|
321
|
+
get ordinal(): 0 | 1 | 2 | 3 | 4;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
245
324
|
export namespace vonage {
|
|
246
325
|
interface ChatEvents extends vonage.CoreClientEvents {
|
|
247
326
|
reconnecting(): void;
|
|
@@ -257,6 +336,8 @@ export namespace vonage {
|
|
|
257
336
|
inviteToConversation(cid: string, username: string): Promise<string>;
|
|
258
337
|
leaveConversation(cid: string): Promise<any>;
|
|
259
338
|
deleteConversation(cid: string): Promise<any>;
|
|
339
|
+
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.ConversationsPageJS>;
|
|
340
|
+
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>;
|
|
260
341
|
setConfig(config: vonage.CoreClientConfigJS): void;
|
|
261
342
|
createSession(token: string, sessionId: Nullable<string>): Promise<string>;
|
|
262
343
|
deleteSession(): Promise<any>;
|
|
@@ -441,7 +522,7 @@ export namespace vonage {
|
|
|
441
522
|
}
|
|
442
523
|
export namespace vonage {
|
|
443
524
|
interface HttpClientJS {
|
|
444
|
-
request(verb: string, url: string, headers: Json, body: Nullable<string>, callback: (p0: Nullable<
|
|
525
|
+
request(verb: string, url: string, headers: Json, body: Nullable<string>, callback: (p0: Nullable<vonage.HttpClientErrorJS>, p1: Nullable<string>) => void): void;
|
|
445
526
|
}
|
|
446
527
|
interface SocketClientJS {
|
|
447
528
|
delegate: Nullable<vonage.SocketClientDelegateJS>;
|
|
@@ -456,6 +537,7 @@ export namespace vonage {
|
|
|
456
537
|
didReceiveNewSocketConnectionStatusEvent(type: string, reason: Nullable<string>): void;
|
|
457
538
|
}
|
|
458
539
|
interface MediaClientJS {
|
|
540
|
+
delegate: Nullable<vonage.MediaClientDelegateJS>;
|
|
459
541
|
enableMediaOutbound(closure: (p0: any, p1: Nullable<string>, p2: (p0: string) => void) => void): void;
|
|
460
542
|
enableMediaInbound(closure: (p0: any, p1: Nullable<string>) => void, offerSDP: string, rtcId: string): void;
|
|
461
543
|
processAnswer(id: string, sdp: string): void;
|
|
@@ -463,14 +545,27 @@ export namespace vonage {
|
|
|
463
545
|
mute(id: string): void;
|
|
464
546
|
unmute(id: string): void;
|
|
465
547
|
getPeerConnection(id: string): any;
|
|
548
|
+
enableRtcStatsCollection(interval: any/* kotlin.Number */, mediaId: string): void;
|
|
466
549
|
}
|
|
467
550
|
interface MediaClientDelegateJS {
|
|
468
|
-
|
|
469
|
-
onAnswer(mediaId: string, streamId: string, sdp: string, callback: (p0: Nullable<string>) => void): void;
|
|
470
|
-
onError(mediaId: Nullable<string>, error: Error): void;
|
|
551
|
+
onRtcStats(rtcStats: vonage.RTCStatsJS): void;
|
|
471
552
|
}
|
|
472
553
|
}
|
|
473
554
|
export namespace vonage {
|
|
555
|
+
class HttpClientErrorJS extends Error {
|
|
556
|
+
constructor(message?: Nullable<string>, responseCode?: Nullable<number>, responseBody?: Nullable<string>, cause?: Nullable<Error>);
|
|
557
|
+
get responseCode(): Nullable<number>;
|
|
558
|
+
get responseBody(): Nullable<string>;
|
|
559
|
+
get coreError(): any/* com.vonage.clientcore.core.middlewares.http.HTTPClientError */;
|
|
560
|
+
component1(): Nullable<string>;
|
|
561
|
+
component2(): Nullable<number>;
|
|
562
|
+
component3(): Nullable<string>;
|
|
563
|
+
component4(): Nullable<Error>;
|
|
564
|
+
copy(message?: Nullable<string>, responseCode?: Nullable<number>, responseBody?: Nullable<string>, cause?: Nullable<Error>): vonage.HttpClientErrorJS;
|
|
565
|
+
toString(): string;
|
|
566
|
+
hashCode(): number;
|
|
567
|
+
equals(other: Nullable<any>): boolean;
|
|
568
|
+
}
|
|
474
569
|
const SOCKET_CONNECTED: string;
|
|
475
570
|
const SOCKET_RECONNECTING: string;
|
|
476
571
|
const SOCKET_DISCONNECTED: string;
|
|
@@ -494,5 +589,32 @@ export namespace vonage {
|
|
|
494
589
|
hashCode(): number;
|
|
495
590
|
equals(other: Nullable<any>): boolean;
|
|
496
591
|
}
|
|
592
|
+
class RTCStatsJS {
|
|
593
|
+
constructor(audioRecvPackets: any/* Nullable<kotlin.Number> */, audioRecvPacketsLost: any/* Nullable<kotlin.Number> */, audioRecvBytes: any/* Nullable<kotlin.Number> */, audioRecvJitter: any/* Nullable<kotlin.Number> */, audioSentPackets: any/* Nullable<kotlin.Number> */, audioSentBytes: any/* Nullable<kotlin.Number> */, audioSentPacketsLost: any/* Nullable<kotlin.Number> */, audioRtt: any/* Nullable<kotlin.Number> */, audioSentJitter: any/* Nullable<kotlin.Number> */, legId: string);
|
|
594
|
+
get audioRecvPackets(): any/* Nullable<kotlin.Number> */;
|
|
595
|
+
get audioRecvPacketsLost(): any/* Nullable<kotlin.Number> */;
|
|
596
|
+
get audioRecvBytes(): any/* Nullable<kotlin.Number> */;
|
|
597
|
+
get audioRecvJitter(): any/* Nullable<kotlin.Number> */;
|
|
598
|
+
get audioSentPackets(): any/* Nullable<kotlin.Number> */;
|
|
599
|
+
get audioSentBytes(): any/* Nullable<kotlin.Number> */;
|
|
600
|
+
get audioSentPacketsLost(): any/* Nullable<kotlin.Number> */;
|
|
601
|
+
get audioRtt(): any/* Nullable<kotlin.Number> */;
|
|
602
|
+
get audioSentJitter(): any/* Nullable<kotlin.Number> */;
|
|
603
|
+
get legId(): string;
|
|
604
|
+
component1(): any/* Nullable<kotlin.Number> */;
|
|
605
|
+
component2(): any/* Nullable<kotlin.Number> */;
|
|
606
|
+
component3(): any/* Nullable<kotlin.Number> */;
|
|
607
|
+
component4(): any/* Nullable<kotlin.Number> */;
|
|
608
|
+
component5(): any/* Nullable<kotlin.Number> */;
|
|
609
|
+
component6(): any/* Nullable<kotlin.Number> */;
|
|
610
|
+
component7(): any/* Nullable<kotlin.Number> */;
|
|
611
|
+
component8(): any/* Nullable<kotlin.Number> */;
|
|
612
|
+
component9(): any/* Nullable<kotlin.Number> */;
|
|
613
|
+
component10(): string;
|
|
614
|
+
copy(audioRecvPackets?: any/* Nullable<kotlin.Number> */, audioRecvPacketsLost?: any/* Nullable<kotlin.Number> */, audioRecvBytes?: any/* Nullable<kotlin.Number> */, audioRecvJitter?: any/* Nullable<kotlin.Number> */, audioSentPackets?: any/* Nullable<kotlin.Number> */, audioSentBytes?: any/* Nullable<kotlin.Number> */, audioSentPacketsLost?: any/* Nullable<kotlin.Number> */, audioRtt?: any/* Nullable<kotlin.Number> */, audioSentJitter?: any/* Nullable<kotlin.Number> */, legId?: string): vonage.RTCStatsJS;
|
|
615
|
+
toString(): string;
|
|
616
|
+
hashCode(): number;
|
|
617
|
+
equals(other: Nullable<any>): boolean;
|
|
618
|
+
}
|
|
497
619
|
}
|
|
498
620
|
export as namespace clientsdk_clientcore_js;
|
package/dist/lib/HttpClient.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import vonage from '../utils/vonage';
|
|
|
3
3
|
type HttpHeaders = Record<string, string | number | boolean>;
|
|
4
4
|
declare class HttpClient implements vonage.HttpClientJS {
|
|
5
5
|
private stringToVerb;
|
|
6
|
-
request(verb: string, url: string, headers: HttpHeaders, body: string | null, callback: (p0: KMPPackage.Nullable<
|
|
6
|
+
request(verb: string, url: string, headers: HttpHeaders, body: string | null, callback: (p0: KMPPackage.Nullable<vonage.HttpClientErrorJS>, p1: KMPPackage.Nullable<string>) => void): Promise<void>;
|
|
7
7
|
}
|
|
8
8
|
export default HttpClient;
|
|
@@ -5,7 +5,9 @@ declare class MediaClient implements vonage.MediaClientJS {
|
|
|
5
5
|
private pcs;
|
|
6
6
|
private audio;
|
|
7
7
|
private stream;
|
|
8
|
+
private intervalId;
|
|
8
9
|
constructor();
|
|
10
|
+
enableRtcStatsCollection(interval: number, mediaId: string): void;
|
|
9
11
|
enableMediaInbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>) => void, offerSDP: string, rtcId: string): Promise<void>;
|
|
10
12
|
enableMediaOutbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>, callback: (legId: string) => void) => void): Promise<void>;
|
|
11
13
|
private getNewPC;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import vonage from '../utils/vonage';
|
|
2
|
+
export type Conversation = vonage.ConversationJS;
|
|
3
|
+
export type ConversationsPage = vonage.ConversationsPageJS;
|
|
4
|
+
export type ConversationState = vonage.ConversationStateJS;
|
|
5
|
+
export declare const ConversationState: typeof vonage.ConversationStateJS;
|
|
6
|
+
export type Member = vonage.MemberJS;
|
|
7
|
+
export type MembersPage = vonage.MembersPageJS;
|
|
8
|
+
export type MemberState = vonage.MemberStateJS;
|
|
9
|
+
export declare const MemberState: typeof vonage.MemberStateJS;
|
|
10
|
+
export type User = vonage.UserJS;
|
|
11
|
+
export type ChannelType = vonage.ChannelTypeJS;
|
|
12
|
+
export declare const ChannelType: typeof vonage.ChannelTypeJS;
|
|
13
|
+
export type PresentingOrder = vonage.PresentingOrderJS;
|
|
14
|
+
export declare const PresentingOrder: typeof vonage.PresentingOrderJS;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import vonage from '../utils/vonage';
|
|
2
|
+
export type VonageError = vonage.VonageErrorJS;
|
|
3
|
+
export declare const VonageError: typeof vonage.VonageErrorJS;
|
|
4
|
+
export type VonageErrorType = vonage.VonageErrorTypeJS;
|
|
5
|
+
export declare const VonageErrorType: typeof vonage.VonageErrorTypeJS;
|
|
6
|
+
export declare const CSErrorCodes: {
|
|
7
|
+
readonly CONVERSATION_DUPLICATE_NAME: string;
|
|
8
|
+
readonly MEMBER_ALREADY_JOINED: string;
|
|
9
|
+
readonly MEMBER_ALREADY_INVITED: string;
|
|
10
|
+
readonly CONVERSATION_NOT_FOUND: string;
|
|
11
|
+
readonly MEMBER_NOT_FOUND: string;
|
|
12
|
+
readonly USER_NOT_FOUND: string;
|
|
13
|
+
readonly INVALID_CURSOR: string;
|
|
14
|
+
readonly VALIDATION_FAIL: string;
|
|
15
|
+
readonly CONVERSATION_MAX_NUMBER_OF_MEMBERS: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const SessionErrorCodes: {
|
|
18
|
+
readonly EMPTY_TOKEN: string;
|
|
19
|
+
readonly FORCED_DISCONNECT: string;
|
|
20
|
+
readonly TIMEOUT: string;
|
|
21
|
+
readonly INTERNAL_FAILURE: string;
|
|
22
|
+
readonly NO_ACTIVE_SESSION: string;
|
|
23
|
+
readonly ALREADY_ACTIVE_SESSION: string;
|
|
24
|
+
readonly INVALID_TOKEN: string;
|
|
25
|
+
readonly EXPIRED_TOKEN: string;
|
|
26
|
+
readonly INVALID_USER: string;
|
|
27
|
+
readonly AUTHORIZATION_ERROR: string;
|
|
28
|
+
readonly INVALID_SESSION: string;
|
|
29
|
+
readonly MAX_OPEN_SESSIONS: string;
|
|
30
|
+
readonly INVALID_SOCKET_TRANSPORT: string;
|
|
31
|
+
readonly CLIENT_DISCONNECT: string;
|
|
32
|
+
readonly PING_TIMEOUT_DISCONNECT: string;
|
|
33
|
+
readonly TRANSPORT_CLOSED_DISCONNECT: string;
|
|
34
|
+
};
|
package/dist/utils/index.d.ts
CHANGED