@vonage/client-sdk 1.2.1-beta.7 → 1.2.1-snapshot.35.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.
@@ -12,6 +12,7 @@ export declare namespace vonage {
12
12
  callMediaReconnecting(callId: string): void;
13
13
  callMediaReconnection(callId: string): void;
14
14
  callMediaDisconnect(callId: string, reason: vonage.CallDisconnectReasonJS): void;
15
+ rtcStatsUpdate(rtcStats: vonage.RTCStatsJS, legId: string): void;
15
16
  reconnecting(): void;
16
17
  reconnection(): void;
17
18
  sessionError(reason: vonage.SessionErrorReasonJS): void;
@@ -20,7 +21,7 @@ export declare namespace vonage {
20
21
  }
21
22
  export declare namespace vonage {
22
23
  class CombinedClientJS implements vonage.IChatClientJS, vonage.IVoiceClientJS {
23
- constructor(http: vonage.HttpClientJS, socket: vonage.SocketClientJS, media: vonage.MediaClientJS);
24
+ constructor(config: InitConfigObjectJS, http: vonage.HttpClientJS, socket: vonage.SocketClientJS, media: vonage.MediaClientJS);
24
25
  get media(): vonage.MediaClientJS;
25
26
  get core(): any/* com.vonage.clientcore.core.CoreClientWithMedia */;
26
27
  get emitter(): Nullable<vonage.CombinedEvents>;
@@ -36,6 +37,7 @@ export declare namespace vonage {
36
37
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
37
38
  sendMessageTextEvent(cid: string, text: string): Promise<string>;
38
39
  sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
40
+ sendMessageImageEvent(cid: string, imageURL: URL): Promise<string>;
39
41
  sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
40
42
  deleteEvent(id: number, conversationId: string): Promise<any>;
41
43
  setConfig(config: vonage.ConfigObjectJS): void;
@@ -675,6 +677,7 @@ export declare namespace vonage {
675
677
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
676
678
  sendMessageTextEvent(cid: string, text: string): Promise<string>;
677
679
  sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
680
+ sendMessageImageEvent(cid: string, imageURL: URL): Promise<string>;
678
681
  sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
679
682
  deleteEvent(id: number, conversationId: string): Promise<any>;
680
683
  setConfig(config: vonage.ConfigObjectJS): void;
@@ -700,14 +703,7 @@ export declare namespace vonage {
700
703
  readonly websocketUrl?: Nullable<string>;
701
704
  readonly websocketPath?: Nullable<string>;
702
705
  readonly autoMediaReoffer?: Nullable<boolean>;
703
- }
704
- interface InitConfigObjectJS extends vonage.ConfigObjectJS {
705
- readonly loggingLevel?: Nullable<vonage.LoggingLevelJS>;
706
- readonly region?: Nullable<vonage.CoreClientConfigRegionJS>;
707
- readonly apiUrl?: Nullable<string>;
708
- readonly websocketUrl?: Nullable<string>;
709
- readonly websocketPath?: Nullable<string>;
710
- readonly autoMediaReoffer?: Nullable<boolean>;
706
+ readonly rtcStatsTelemetry?: Nullable<boolean>;
711
707
  }
712
708
  }
713
709
  export declare namespace vonage {
@@ -742,12 +738,54 @@ export declare namespace vonage {
742
738
  set websocketPath(value: string);
743
739
  get autoMediaReoffer(): boolean;
744
740
  set autoMediaReoffer(value: boolean);
741
+ get rtcStatsTelemetry(): boolean;
742
+ set rtcStatsTelemetry(value: boolean);
745
743
  }
746
- class CoreClientInitConfigJS extends vonage.CoreClientConfigJS implements vonage.InitConfigObjectJS {
747
- constructor(loggingLevel?: vonage.LoggingLevelJS, region?: vonage.CoreClientConfigRegionJS);
748
- get loggingLevel(): vonage.LoggingLevelJS;
749
- set loggingLevel(value: vonage.LoggingLevelJS);
744
+ class TopicJS {
745
+ constructor(name: string, tag: string);
746
+ get name(): string;
747
+ get tag(): string;
748
+ copy(name?: string, tag?: string): vonage.TopicJS;
749
+ toString(): string;
750
+ hashCode(): number;
751
+ equals(other: Nullable<any>): boolean;
750
752
  }
753
+ abstract class Topics {
754
+ private constructor();
755
+ static get HTTP(): vonage.Topics & {
756
+ get name(): "HTTP";
757
+ get ordinal(): 0;
758
+ };
759
+ static get WS(): vonage.Topics & {
760
+ get name(): "WS";
761
+ get ordinal(): 1;
762
+ };
763
+ static get MEDIA(): vonage.Topics & {
764
+ get name(): "MEDIA";
765
+ get ordinal(): 2;
766
+ };
767
+ static get API(): vonage.Topics & {
768
+ get name(): "API";
769
+ get ordinal(): 3;
770
+ };
771
+ static get STORE(): vonage.Topics & {
772
+ get name(): "STORE";
773
+ get ordinal(): 4;
774
+ };
775
+ static get REDUCER(): vonage.Topics & {
776
+ get name(): "REDUCER";
777
+ get ordinal(): 5;
778
+ };
779
+ static get DEFAULT(): vonage.Topics & {
780
+ get name(): "DEFAULT";
781
+ get ordinal(): 6;
782
+ };
783
+ static values(): Array<vonage.Topics>;
784
+ static valueOf(value: string): vonage.Topics;
785
+ get name(): "HTTP" | "WS" | "MEDIA" | "API" | "STORE" | "REDUCER" | "DEFAULT";
786
+ get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
787
+ }
788
+ function createVonageLoggerJS(name: string, minLogLevel: vonage.LoggingLevelJS | undefined, topics: Array<vonage.Topics> | undefined, onLog: (p0: string, p1: vonage.TopicJS, p2: string) => void): VonageLoggerJS;
751
789
  abstract class LoggingLevelJS {
752
790
  private constructor();
753
791
  static get Verbose(): vonage.LoggingLevelJS & {
@@ -826,6 +864,7 @@ export declare namespace vonage {
826
864
  callMediaReconnecting(callId: string): void;
827
865
  callMediaReconnection(callId: string): void;
828
866
  callMediaDisconnect(callId: string, reason: vonage.CallDisconnectReasonJS): void;
867
+ rtcStatsUpdate(rtcStats: vonage.RTCStatsJS, legId: string): void;
829
868
  reconnecting(): void;
830
869
  reconnection(): void;
831
870
  sessionError(reason: vonage.SessionErrorReasonJS): void;
@@ -961,7 +1000,7 @@ export declare namespace vonage {
961
1000
  enableRtcStatsCollection(interval: any/* kotlin.Number */, mediaId: string): void;
962
1001
  }
963
1002
  interface MediaClientDelegateJS {
964
- onRtcStats(rtcStats: vonage.RTCStatsJS): void;
1003
+ onRtcStats(rtcStats: any/* com.vonage.clientcore.core.reducers.call.RTCStats */, legId: string): void;
965
1004
  onConnectionChange(id: string, status: string): void;
966
1005
  onNetworkChange(legId: string, status: string): void;
967
1006
  }
@@ -1032,21 +1071,22 @@ export declare namespace vonage {
1032
1071
  equals(other: Nullable<any>): boolean;
1033
1072
  }
1034
1073
  class RTCStatsJS {
1035
- constructor(audioRecvPackets: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvPacketsLost: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvBytes: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvJitter: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPackets: Nullable<any>/* Nullable<kotlin.Number> */, audioSentBytes: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPacketsLost: Nullable<any>/* Nullable<kotlin.Number> */, audioRtt: Nullable<any>/* Nullable<kotlin.Number> */, audioSentJitter: Nullable<any>/* Nullable<kotlin.Number> */, legId: string);
1036
- get audioRecvPackets(): Nullable<any>/* Nullable<kotlin.Number> */;
1037
- get audioRecvPacketsLost(): Nullable<any>/* Nullable<kotlin.Number> */;
1038
- get audioRecvBytes(): Nullable<any>/* Nullable<kotlin.Number> */;
1039
- get audioRecvJitter(): Nullable<any>/* Nullable<kotlin.Number> */;
1040
- get audioSentPackets(): Nullable<any>/* Nullable<kotlin.Number> */;
1041
- get audioSentBytes(): Nullable<any>/* Nullable<kotlin.Number> */;
1042
- get audioSentPacketsLost(): Nullable<any>/* Nullable<kotlin.Number> */;
1043
- get audioRtt(): Nullable<any>/* Nullable<kotlin.Number> */;
1044
- get audioSentJitter(): Nullable<any>/* Nullable<kotlin.Number> */;
1045
- get legId(): string;
1046
- copy(audioRecvPackets?: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvPacketsLost?: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvBytes?: Nullable<any>/* Nullable<kotlin.Number> */, audioRecvJitter?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPackets?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentBytes?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentPacketsLost?: Nullable<any>/* Nullable<kotlin.Number> */, audioRtt?: Nullable<any>/* Nullable<kotlin.Number> */, audioSentJitter?: Nullable<any>/* Nullable<kotlin.Number> */, legId?: string): vonage.RTCStatsJS;
1074
+ constructor(audioRecvPackets: any/* kotlin.Long */, audioRecvPacketsLost: number, audioRecvBytes: any/* kotlin.Long */, audioRecvJitter: number, audioSentPackets: any/* kotlin.Long */, audioSentBytes: any/* kotlin.Long */, audioSentPacketsLost: number, audioRtt: number, audioSentJitter: number);
1075
+ get audioRecvPackets(): any/* kotlin.Long */;
1076
+ get audioRecvPacketsLost(): number;
1077
+ get audioRecvBytes(): any/* kotlin.Long */;
1078
+ get audioRecvJitter(): number;
1079
+ get audioSentPackets(): any/* kotlin.Long */;
1080
+ get audioSentBytes(): any/* kotlin.Long */;
1081
+ get audioSentPacketsLost(): number;
1082
+ get audioRtt(): number;
1083
+ get audioSentJitter(): number;
1084
+ copy(audioRecvPackets?: any/* kotlin.Long */, audioRecvPacketsLost?: number, audioRecvBytes?: any/* kotlin.Long */, audioRecvJitter?: number, audioSentPackets?: any/* kotlin.Long */, audioSentBytes?: any/* kotlin.Long */, audioSentPacketsLost?: number, audioRtt?: number, audioSentJitter?: number): vonage.RTCStatsJS;
1047
1085
  toString(): string;
1048
1086
  hashCode(): number;
1049
1087
  equals(other: Nullable<any>): boolean;
1088
+ static get Companion(): {
1089
+ };
1050
1090
  }
1051
1091
  }
1052
1092
  export as namespace clientsdk_clientcore_js;
@@ -1,5 +1,6 @@
1
1
  import * as KMPPackage from '../kotlin/clientsdk-clientcore_js';
2
2
  import vonage from '../utils/vonage';
3
+ import 'webrtc-adapter';
3
4
  declare class MediaClient implements vonage.MediaClientJS {
4
5
  delegate: KMPPackage.Nullable<vonage.MediaClientDelegateJS>;
5
6
  private pcs;
@@ -1,22 +1,28 @@
1
1
  import { Nullable } from '../kotlin/clientsdk-clientcore_js';
2
2
  import vonage from '../utils/vonage';
3
+ import { LoggingLevel, VonageLogger, VonageLoggerJS } from './logging';
4
+ export type ConfigRegion = vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name;
3
5
  export declare const ConfigRegion: typeof vonage.CoreClientConfigRegionJS;
4
6
  export type ClientConfigObject = ConfigObjectJS | ({
5
- region?: typeof vonage.CoreClientConfigRegionJS.prototype.name;
7
+ region?: ConfigRegion;
6
8
  } & 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'>);
9
+ export type ClientInitConfigObject = {
10
+ region?: ConfigRegion;
11
+ loggingLevel?: LoggingLevel;
12
+ customLoggers?: VonageLogger[];
13
+ } & Omit<InitConfigObjectJS, 'region' | 'loggingLevel' | 'customLoggers'>;
11
14
  export interface ConfigObjectJS {
12
15
  region?: Nullable<vonage.CoreClientConfigRegionJS>;
13
16
  apiUrl?: Nullable<string>;
14
17
  websocketUrl?: Nullable<string>;
15
18
  websocketPath?: Nullable<string>;
16
19
  autoMediaReoffer?: Nullable<boolean>;
20
+ rtcStatsTelemetry?: Nullable<boolean>;
17
21
  }
18
22
  export interface InitConfigObjectJS extends ConfigObjectJS {
19
23
  loggingLevel?: Nullable<vonage.LoggingLevelJS>;
24
+ customLoggers?: Nullable<VonageLoggerJS[]>;
25
+ disableInternalLogger?: Nullable<boolean>;
20
26
  }
21
27
  /**
22
28
  * Represents the configuration object for the client.
@@ -36,17 +42,20 @@ export declare class ClientConfig extends vonage.CoreClientConfigJS {
36
42
  * The URLs will be automatically set based on the selected region.
37
43
  * Defaults to "US" if no region is specified.
38
44
  */
39
- constructor(region?: vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name);
45
+ constructor(region?: ConfigRegion);
40
46
  }
41
- export declare class ClientInitConfig extends vonage.CoreClientInitConfigJS {
47
+ export declare class ClientInitConfig implements InitConfigObjectJS {
48
+ loggingLevel: vonage.LoggingLevelJS;
49
+ region: vonage.CoreClientConfigRegionJS;
50
+ customLoggers: VonageLoggerJS[];
51
+ disableInternalLogger: boolean;
52
+ apiUrl?: Nullable<string>;
53
+ websocketUrl?: Nullable<string>;
54
+ websocketPath?: Nullable<string>;
55
+ autoMediaReoffer?: Nullable<boolean>;
42
56
  /**
43
57
  * Constructs a new instance of the class.
44
- *
45
- * @param loggingLevel The logging level to set for the SDK. Default is Error.
46
- * @param region The region where the API and WebSocket URLs should be configured.
47
- * Valid values are "EU" (Europe), "US" (United States), or "AP" (Asia Pacific).
48
- * The URLs will be automatically set based on the selected region.
49
- * Defaults to "US" if no region is specified.
50
58
  */
51
- constructor(loggingLevel?: vonage.LoggingLevelJS | typeof vonage.LoggingLevelJS.prototype.name, region?: vonage.CoreClientConfigRegionJS | typeof vonage.CoreClientConfigRegionJS.prototype.name);
59
+ constructor(loggingLevel?: LoggingLevel, region?: ConfigRegion, customLoggers?: Array<VonageLogger | VonageLoggerJS>);
52
60
  }
61
+ export declare const convertInitConfig: (config: ClientInitConfigObject) => InitConfigObjectJS;
@@ -1,5 +1,5 @@
1
- export * from './ClientConfig';
2
- export * from './logging';
1
+ export { ClientConfig, ClientInitConfig, ClientConfigObject, ClientInitConfigObject, ConfigRegion } from './ClientConfig';
2
+ export { type Topic, type VonageLogger, LoggingLevel, Topics, createVonageLogger } from './logging';
3
3
  export * from './ConversationModels';
4
4
  export * from '../kotlin/JsUnions';
5
5
  export * from './ErrorModels';
@@ -1,3 +1,21 @@
1
1
  import vonage from '../utils/vonage';
2
+ export type Topics = vonage.Topics | typeof Topics.prototype.name;
3
+ export declare const Topics: typeof vonage.Topics;
4
+ export type Topic = vonage.TopicJS;
5
+ export declare const Topic: typeof vonage.TopicJS;
6
+ export type LoggingLevelName = typeof vonage.LoggingLevelJS.prototype.name;
7
+ export type LoggingLevel = vonage.LoggingLevelJS | LoggingLevelName;
2
8
  export declare const LoggingLevel: typeof vonage.LoggingLevelJS;
3
9
  export declare const setDefaultLoggingLevel: typeof vonage.setDefaultLoggingLevel;
10
+ export type VonageLogger = {
11
+ minLogLevel?: LoggingLevel;
12
+ topics?: Topics[];
13
+ } & Omit<VonageLoggerJS, 'minLogLevel' | 'topics'>;
14
+ export declare const convertLogger: (logger: VonageLogger) => VonageLoggerJS;
15
+ export interface VonageLoggerJS {
16
+ name: string;
17
+ minLogLevel?: vonage.LoggingLevelJS;
18
+ topics?: vonage.Topics[];
19
+ onLog(level: LoggingLevelName, topic: Topic, message: string): void;
20
+ }
21
+ export declare const createVonageLogger: (name: string, onLog: (level: LoggingLevelName, topic: Topic, message: string) => void, minLogLevel?: LoggingLevel, topics?: Topics[]) => VonageLogger;