@vonage/client-sdk 1.2.1 → 1.3.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.
@@ -6,7 +6,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
6
6
  * Mute your leg of a call
7
7
  *
8
8
  * @example
9
- * [[include: snippet_CallMute.txt]]
9
+ * [[include: snippet_Mute.txt]]
10
10
  *
11
11
  * @param callId - Call ID
12
12
  * @returns void
@@ -24,7 +24,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
24
24
  * Earmuff your leg of a call
25
25
  *
26
26
  * @example
27
- * [[include: snippet_EarmuffEvent.txt]]
27
+ * [[include: snippet_EnableEarmuff.txt]]
28
28
  *
29
29
  * @param callId - Call ID
30
30
  * @returns void
@@ -33,6 +33,10 @@ declare module './kotlin/clientsdk-clientcore_js' {
33
33
  enableEarmuff(callId: string): Promise<void>;
34
34
  /**
35
35
  * Unearmuff your leg of a call
36
+ *
37
+ * @example
38
+ * [[include: snippet_DisableEarmuff.txt]]
39
+ *
36
40
  * @param callId - Call ID
37
41
  * @returns void
38
42
  * @group Voice
@@ -42,7 +46,7 @@ declare module './kotlin/clientsdk-clientcore_js' {
42
46
  * Send a string of digits to a call via DTMF
43
47
  *
44
48
  * @example
45
- * [[include: snippet_SendDtmfDigits.txt]]
49
+ * [[include: snippet_Dtmf.txt]]
46
50
  *
47
51
  * @param callId - Call ID
48
52
  * @param digits - DTMF digits
@@ -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,12 +21,12 @@ 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: vonage.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>;
27
28
  set emitter(value: Nullable<vonage.CombinedEvents>);
28
- createConversation(name: Nullable<string>, displayName: Nullable<string>): Promise<string>;
29
+ createConversation(parameters: Nullable<vonage.CreateConversationParametersJS>): Promise<string>;
29
30
  joinConversation(cid: string): Promise<string>;
30
31
  inviteToConversation(cid: string, username: string): Promise<string>;
31
32
  leaveConversation(cid: string): Promise<any>;
@@ -36,7 +37,8 @@ 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>;
39
- sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
40
+ sendMessageImageEvent(cid: string, imageURL: URL): Promise<string>;
41
+ sendEphemeralEvent(cid: string, customData: string): Promise<string>;
40
42
  deleteEvent(id: number, conversationId: string): Promise<any>;
41
43
  setConfig(config: vonage.ConfigObjectJS): void;
42
44
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
@@ -424,8 +426,15 @@ export declare namespace vonage {
424
426
  get displayName(): Nullable<string>;
425
427
  get imageUrl(): Nullable<string>;
426
428
  get state(): Nullable<string>;
427
- get customData(): Nullable<string>;
428
- get customSortKey(): Nullable<string>;
429
+ get properties(): vonage.ConversationJS.Properties;
430
+ }
431
+ namespace ConversationJS {
432
+ class Properties {
433
+ private constructor();
434
+ get ttl(): Nullable<number>;
435
+ get customSortKey(): Nullable<string>;
436
+ get customData(): Nullable<string>;
437
+ }
429
438
  }
430
439
  const ConversationStateJS: {
431
440
  get ACTIVE(): string;
@@ -660,11 +669,19 @@ export declare namespace vonage {
660
669
  reconnection(): void;
661
670
  sessionError(reason: vonage.SessionErrorReasonJS): void;
662
671
  }
672
+ interface CreateConversationParametersJS {
673
+ readonly name?: Nullable<string>;
674
+ readonly displayName?: Nullable<string>;
675
+ readonly imageUrl?: Nullable<string>;
676
+ readonly ttl?: Nullable<any>/* Nullable<kotlin.Number> */;
677
+ readonly customSortKey?: Nullable<string>;
678
+ readonly customData?: Nullable<string>;
679
+ }
663
680
  }
664
681
  export declare namespace vonage {
665
682
  interface IChatClientJS extends vonage.ICoreClientJS {
666
683
  readonly core: any/* com.vonage.clientcore.core.CoreClient */;
667
- createConversation(name: Nullable<string>, displayName: Nullable<string>): Promise<string>;
684
+ createConversation(parameters: Nullable<vonage.CreateConversationParametersJS>): Promise<string>;
668
685
  joinConversation(cid: string): Promise<string>;
669
686
  inviteToConversation(cid: string, username: string): Promise<string>;
670
687
  leaveConversation(cid: string): Promise<any>;
@@ -675,7 +692,8 @@ export declare namespace vonage {
675
692
  getConversationMember(cid: string, mid: string): Promise<vonage.MemberJS>;
676
693
  sendMessageTextEvent(cid: string, text: string): Promise<string>;
677
694
  sendMessageCustomEvent(cid: string, customData: string): Promise<string>;
678
- sendEphemeralEvent(cid: string, customBody: string): Promise<string>;
695
+ sendMessageImageEvent(cid: string, imageURL: URL): Promise<string>;
696
+ sendEphemeralEvent(cid: string, customData: string): Promise<string>;
679
697
  deleteEvent(id: number, conversationId: string): Promise<any>;
680
698
  setConfig(config: vonage.ConfigObjectJS): void;
681
699
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
@@ -694,23 +712,34 @@ export declare namespace vonage {
694
712
  reconnection(): void;
695
713
  sessionError(reason: vonage.SessionErrorReasonJS): void;
696
714
  }
715
+ interface VonageLoggerJS {
716
+ readonly name: string;
717
+ readonly minLogLevel?: Nullable<vonage.LoggingLevelJS>;
718
+ readonly topics?: Nullable<Array<vonage.Topics>>;
719
+ onLog(logLevel: string, topic: vonage.TopicJS, message: string): void;
720
+ }
697
721
  interface ConfigObjectJS {
698
722
  readonly region?: Nullable<vonage.CoreClientConfigRegionJS>;
699
723
  readonly apiUrl?: Nullable<string>;
700
724
  readonly websocketUrl?: Nullable<string>;
701
725
  readonly websocketPath?: Nullable<string>;
702
726
  readonly autoMediaReoffer?: Nullable<boolean>;
727
+ readonly rtcStatsTelemetry?: Nullable<boolean>;
703
728
  }
704
729
  interface InitConfigObjectJS extends vonage.ConfigObjectJS {
705
730
  readonly loggingLevel?: Nullable<vonage.LoggingLevelJS>;
731
+ readonly customLoggers?: Nullable<Array<vonage.VonageLoggerJS>>;
732
+ readonly disableInternalLogger?: Nullable<boolean>;
706
733
  readonly region?: Nullable<vonage.CoreClientConfigRegionJS>;
707
734
  readonly apiUrl?: Nullable<string>;
708
735
  readonly websocketUrl?: Nullable<string>;
709
736
  readonly websocketPath?: Nullable<string>;
710
737
  readonly autoMediaReoffer?: Nullable<boolean>;
738
+ readonly rtcStatsTelemetry?: Nullable<boolean>;
711
739
  }
712
740
  }
713
741
  export declare namespace vonage {
742
+ const DEFAULT_REGION: vonage.CoreClientConfigRegionJS;
714
743
  abstract class CoreClientConfigRegionJS {
715
744
  private constructor();
716
745
  get coreRegion(): any/* com.vonage.clientcore.core.api.ClientConfigRegion */;
@@ -742,12 +771,54 @@ export declare namespace vonage {
742
771
  set websocketPath(value: string);
743
772
  get autoMediaReoffer(): boolean;
744
773
  set autoMediaReoffer(value: boolean);
774
+ get rtcStatsTelemetry(): boolean;
775
+ set rtcStatsTelemetry(value: boolean);
745
776
  }
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);
777
+ class TopicJS {
778
+ constructor(name: string, tag: string);
779
+ get name(): string;
780
+ get tag(): string;
781
+ copy(name?: string, tag?: string): vonage.TopicJS;
782
+ toString(): string;
783
+ hashCode(): number;
784
+ equals(other: Nullable<any>): boolean;
750
785
  }
786
+ abstract class Topics {
787
+ private constructor();
788
+ static get HTTP(): vonage.Topics & {
789
+ get name(): "HTTP";
790
+ get ordinal(): 0;
791
+ };
792
+ static get WS(): vonage.Topics & {
793
+ get name(): "WS";
794
+ get ordinal(): 1;
795
+ };
796
+ static get MEDIA(): vonage.Topics & {
797
+ get name(): "MEDIA";
798
+ get ordinal(): 2;
799
+ };
800
+ static get API(): vonage.Topics & {
801
+ get name(): "API";
802
+ get ordinal(): 3;
803
+ };
804
+ static get STORE(): vonage.Topics & {
805
+ get name(): "STORE";
806
+ get ordinal(): 4;
807
+ };
808
+ static get REDUCER(): vonage.Topics & {
809
+ get name(): "REDUCER";
810
+ get ordinal(): 5;
811
+ };
812
+ static get DEFAULT(): vonage.Topics & {
813
+ get name(): "DEFAULT";
814
+ get ordinal(): 6;
815
+ };
816
+ static values(): Array<vonage.Topics>;
817
+ static valueOf(value: string): vonage.Topics;
818
+ get name(): "HTTP" | "WS" | "MEDIA" | "API" | "STORE" | "REDUCER" | "DEFAULT";
819
+ get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
820
+ }
821
+ function createVonageLoggerJS(name: string, minLogLevel: vonage.LoggingLevelJS | undefined, topics: Array<vonage.Topics> | undefined, onLog: (p0: string, p1: vonage.TopicJS, p2: string) => void): vonage.VonageLoggerJS;
751
822
  abstract class LoggingLevelJS {
752
823
  private constructor();
753
824
  static get Verbose(): vonage.LoggingLevelJS & {
@@ -779,6 +850,8 @@ export declare namespace vonage {
779
850
  get name(): "Verbose" | "Debug" | "Info" | "Warn" | "Error" | "Assert";
780
851
  get ordinal(): 0 | 1 | 2 | 3 | 4 | 5;
781
852
  }
853
+ const DEFAULT_LOGGING_LEVEL: vonage.LoggingLevelJS;
854
+ function setDefaultLoggingLevel(level: vonage.LoggingLevelJS): void;
782
855
  abstract class SessionErrorReasonJS {
783
856
  private constructor();
784
857
  get reason(): any/* com.vonage.clientcore.core.api.SessionErrorReason */;
@@ -799,7 +872,6 @@ export declare namespace vonage {
799
872
  get name(): "EXPIRED_TOKEN" | "TRANSPORT_CLOSED" | "PING_TIMEOUT";
800
873
  get ordinal(): 0 | 1 | 2;
801
874
  }
802
- function setDefaultLoggingLevel(level: vonage.LoggingLevelJS): void;
803
875
  interface ICoreClientJS {
804
876
  readonly core: any/* com.vonage.clientcore.core.CoreClient */;
805
877
  setConfig(config: vonage.ConfigObjectJS): void;
@@ -826,6 +898,7 @@ export declare namespace vonage {
826
898
  callMediaReconnecting(callId: string): void;
827
899
  callMediaReconnection(callId: string): void;
828
900
  callMediaDisconnect(callId: string, reason: vonage.CallDisconnectReasonJS): void;
901
+ rtcStatsUpdate(rtcStats: vonage.RTCStatsJS, legId: string): void;
829
902
  reconnecting(): void;
830
903
  reconnection(): void;
831
904
  sessionError(reason: vonage.SessionErrorReasonJS): void;
@@ -961,7 +1034,7 @@ export declare namespace vonage {
961
1034
  enableRtcStatsCollection(interval: any/* kotlin.Number */, mediaId: string): void;
962
1035
  }
963
1036
  interface MediaClientDelegateJS {
964
- onRtcStats(rtcStats: vonage.RTCStatsJS): void;
1037
+ onRtcStats(rtcStats: vonage.RTCStatsJS, legId: string): void;
965
1038
  onConnectionChange(id: string, status: string): void;
966
1039
  onNetworkChange(legId: string, status: string): void;
967
1040
  }
@@ -1032,21 +1105,22 @@ export declare namespace vonage {
1032
1105
  equals(other: Nullable<any>): boolean;
1033
1106
  }
1034
1107
  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;
1108
+ constructor(audioRecvPackets: any/* kotlin.Number */, audioRecvPacketsLost: any/* kotlin.Number */, audioRecvBytes: any/* kotlin.Number */, audioRecvJitter: any/* kotlin.Number */, audioSentPackets: any/* kotlin.Number */, audioSentBytes: any/* kotlin.Number */, audioSentPacketsLost: any/* kotlin.Number */, audioRtt: any/* kotlin.Number */, audioSentJitter: any/* kotlin.Number */);
1109
+ get audioRecvPackets(): any/* kotlin.Number */;
1110
+ get audioRecvPacketsLost(): any/* kotlin.Number */;
1111
+ get audioRecvBytes(): any/* kotlin.Number */;
1112
+ get audioRecvJitter(): any/* kotlin.Number */;
1113
+ get audioSentPackets(): any/* kotlin.Number */;
1114
+ get audioSentBytes(): any/* kotlin.Number */;
1115
+ get audioSentPacketsLost(): any/* kotlin.Number */;
1116
+ get audioRtt(): any/* kotlin.Number */;
1117
+ get audioSentJitter(): any/* kotlin.Number */;
1118
+ copy(audioRecvPackets?: any/* kotlin.Number */, audioRecvPacketsLost?: any/* kotlin.Number */, audioRecvBytes?: any/* kotlin.Number */, audioRecvJitter?: any/* kotlin.Number */, audioSentPackets?: any/* kotlin.Number */, audioSentBytes?: any/* kotlin.Number */, audioSentPacketsLost?: any/* kotlin.Number */, audioRtt?: any/* kotlin.Number */, audioSentJitter?: any/* kotlin.Number */): vonage.RTCStatsJS;
1047
1119
  toString(): string;
1048
1120
  hashCode(): number;
1049
1121
  equals(other: Nullable<any>): boolean;
1122
+ static get Companion(): {
1123
+ };
1050
1124
  }
1051
1125
  }
1052
1126
  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
9
  export type ClientInitConfigObject = InitConfigObjectJS | ({
8
- region?: typeof vonage.CoreClientConfigRegionJS.prototype.name;
9
- loggingLevel?: typeof vonage.LoggingLevelJS.prototype.name;
10
- } & Omit<InitConfigObjectJS, 'region' | 'loggingLevel'>);
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.
@@ -25,7 +31,7 @@ export interface InitConfigObjectJS extends ConfigObjectJS {
25
31
  * These properties control different aspects of the client's behavior, such as API URLs, media reoffer, and WebSocket settings.
26
32
  *
27
33
  * @example
28
- * [[include:set_client_config.txt]]
34
+ * [[include:snippet_setClientConfig.txt]]
29
35
  */
30
36
  export declare class ClientConfig extends vonage.CoreClientConfigJS {
31
37
  /**
@@ -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;
@@ -0,0 +1,9 @@
1
+ export type JsonValue = object | null | boolean | string | number;
2
+ export type Json = {
3
+ [property: string]: Json | JsonValue;
4
+ } | Json[];
5
+ /**
6
+ * Represents custom data, which can be a JSON object or a JSON-formatted string.
7
+ * There is a 2MB limit on the size of the custom data object.
8
+ */
9
+ export type CustomData = Json | string;
@@ -1,5 +1,6 @@
1
- export * from './ClientConfig';
2
- export * from './logging';
1
+ export { ClientConfig, ClientInitConfig, ClientConfigObject, ClientInitConfigObject, ConfigRegion, convertInitConfig } from './ClientConfig';
2
+ export { type Topic, type VonageLogger, LoggingLevel, Topics, createVonageLogger, setDefaultLoggingLevel, setVonageClientLoggingLevel } from './logging';
3
+ export * from './JsonUtils';
3
4
  export * from './ConversationModels';
4
5
  export * from '../kotlin/JsUnions';
5
6
  export * from './ErrorModels';
@@ -1,3 +1,31 @@
1
+ import { Nullable } from '../kotlin/clientsdk-clientcore_js';
1
2
  import vonage from '../utils/vonage';
3
+ export type Topics = vonage.Topics | typeof Topics.prototype.name;
4
+ export declare const Topics: typeof vonage.Topics;
5
+ export type Topic = vonage.TopicJS;
6
+ export declare const Topic: typeof vonage.TopicJS;
7
+ export type LoggingLevelName = typeof vonage.LoggingLevelJS.prototype.name;
8
+ export type LoggingLevel = vonage.LoggingLevelJS | LoggingLevelName;
2
9
  export declare const LoggingLevel: typeof vonage.LoggingLevelJS;
3
- export declare const setDefaultLoggingLevel: typeof vonage.setDefaultLoggingLevel;
10
+ /**
11
+ * @deprecated Use {@link ClientInitConfig.loggingLevel} instead.
12
+ * @param level - The logging level to set.
13
+ */
14
+ export declare const setDefaultLoggingLevel: (level: LoggingLevel) => void;
15
+ /**
16
+ * @deprecated Use {@link ClientInitConfig.loggingLevel} instead.
17
+ * @param level - The logging level to set.
18
+ */
19
+ export declare const setVonageClientLoggingLevel: (level: LoggingLevel) => void;
20
+ export type VonageLogger = VonageLoggerJS | ({
21
+ minLogLevel?: LoggingLevel;
22
+ topics?: Topics[];
23
+ } & Omit<VonageLoggerJS, 'minLogLevel' | 'topics'>);
24
+ export declare const convertLogger: (logger: VonageLogger) => VonageLoggerJS;
25
+ export interface VonageLoggerJS {
26
+ name: string;
27
+ minLogLevel?: Nullable<vonage.LoggingLevelJS>;
28
+ topics?: Nullable<vonage.Topics[]>;
29
+ onLog(level: LoggingLevelName, topic: Topic, message: string): void;
30
+ }
31
+ export declare const createVonageLogger: (name: string, onLog: (level: LoggingLevelName, topic: Topic, message: string) => void, minLogLevel?: LoggingLevel, topics?: Topics[]) => VonageLogger;