@vonage/client-sdk 2.2.0-snapshot.154.0 → 2.3.0-alpha.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.
@@ -1,6 +1,6 @@
1
1
  type Nullable<T> = T | null | undefined
2
2
  export declare namespace vonage {
3
- interface CombinedEvents extends vonage.VoiceEvents, vonage.ChatEvents {
3
+ interface CombinedEvents extends vonage.VoiceEvents, vonage.ChatEvents, vonage.emergency.EmergencyEvents {
4
4
  }
5
5
  }
6
6
  export declare namespace vonage {
@@ -13,12 +13,14 @@ export declare namespace vonage {
13
13
  hashCode(): number;
14
14
  equals(other: Nullable<any>): boolean;
15
15
  };
16
- class CombinedClientJS implements vonage.IChatClientJS, vonage.IVoiceClientJS {
16
+ class CombinedClientJS implements vonage.IChatClientJS, vonage.IVoiceClientJS, vonage.emergency.IEmergencyClientJS {
17
17
  constructor(config: vonage.InitConfigObjectJS, http: vonage.HttpClientJS, socket: vonage.SocketClientJS, media: vonage.MediaClientJS);
18
18
  get media(): vonage.MediaClientJS;
19
19
  get core(): any/* com.vonage.clientcore.core.CoreClientWithMedia */;
20
+ get emergencyCore(): any/* com.vonage.client.emergency.EmergencyCoreClientImpl */;
20
21
  get emitter(): Nullable<vonage.CombinedEvents>;
21
22
  set emitter(value: Nullable<vonage.CombinedEvents>);
23
+ setConfig(config: vonage.ConfigObjectJS): void;
22
24
  createConversation(parameters: Nullable<vonage.CreateConversationParametersJS>): Promise<string>;
23
25
  joinConversation(cid: string): Promise<string>;
24
26
  inviteToConversation(cid: string, username: string): Promise<string>;
@@ -42,7 +44,6 @@ export declare namespace vonage {
42
44
  deleteEvent(id: number, conversationId: string): Promise<any>;
43
45
  sendMessageSeenEvent(id: number, conversationId: string): Promise<any>;
44
46
  updateConversation(conversationId: string, parameters: vonage.UpdateConversationParametersJS): Promise<any>;
45
- setConfig(config: vonage.ConfigObjectJS): void;
46
47
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
47
48
  deleteSession(): Promise<any>;
48
49
  refreshSession(token: string): Promise<any>;
@@ -63,6 +64,13 @@ export declare namespace vonage {
63
64
  enableEarmuff(callId: string): Promise<any>;
64
65
  disableEarmuff(callId: string): Promise<any>;
65
66
  sendDTMF(callId: string, digits: string): Promise<any>;
67
+ emergencyCall(token: string, from: string, to: string, options: Nullable<vonage.emergency.EmergencyCallOptionsJS>): Promise<vonage.emergency.EmergencyCallDataJS>;
68
+ reconnectEmergencyCall(token: string, callId: string, reconnectToken: string): Promise<any>;
69
+ hangUpEmergencyCall(callId: string): Promise<any>;
70
+ muteEmergencyCall(callId: string): Promise<any>;
71
+ unmuteEmergencyCall(callId: string): Promise<any>;
72
+ enableEarmuffEmergencyCall(callId: string): Promise<any>;
73
+ disableEarmuffEmergencyCall(callId: string): Promise<any>;
66
74
  }
67
75
  }
68
76
  export declare namespace vonage {
@@ -785,6 +793,8 @@ export declare namespace vonage {
785
793
  readonly rtcStatsTelemetry?: Nullable<boolean>;
786
794
  readonly autoReconnectMedia?: Nullable<boolean>;
787
795
  readonly noiseSuppression?: Nullable<boolean>;
796
+ readonly emergencyPrimaryRegion?: Nullable<string>;
797
+ readonly emergencySecondaryRegion?: Nullable<string>;
788
798
  }
789
799
  interface InitConfigObjectJS extends vonage.ConfigObjectJS {
790
800
  readonly loggingLevel?: Nullable<vonage.LoggingLevelJS>;
@@ -812,6 +822,7 @@ export declare namespace vonage {
812
822
  get name(): "AP" | "EU" | "US";
813
823
  get ordinal(): 0 | 1 | 2;
814
824
  get coreRegion(): any/* com.vonage.clientcore.core.api.ClientConfigRegion */;
825
+ get emergencyRegion(): any/* com.vonage.client.emergency.EmergencyClientConfigRegion */;
815
826
  static values(): Array<vonage.CoreClientConfigRegionJS>;
816
827
  static valueOf(value: string): vonage.CoreClientConfigRegionJS;
817
828
  }
@@ -829,6 +840,8 @@ export declare namespace vonage {
829
840
  get autoReconnectMedia(): boolean;
830
841
  set autoReconnectMedia(value: boolean);
831
842
  get noiseSuppression(): boolean;
843
+ get emergencyPrimaryRegion(): string;
844
+ get emergencySecondaryRegion(): string;
832
845
  }
833
846
  class TopicJS {
834
847
  constructor(name: string, tag: string);
@@ -865,12 +878,16 @@ export declare namespace vonage {
865
878
  get name(): "REDUCER";
866
879
  get ordinal(): 5;
867
880
  };
881
+ static get EMERGENCY(): vonage.Topics & {
882
+ get name(): "EMERGENCY";
883
+ get ordinal(): 6;
884
+ };
868
885
  static get DEFAULT(): vonage.Topics & {
869
886
  get name(): "DEFAULT";
870
- get ordinal(): 6;
887
+ get ordinal(): 7;
871
888
  };
872
- get name(): "HTTP" | "WS" | "MEDIA" | "API" | "STORE" | "REDUCER" | "DEFAULT";
873
- get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6;
889
+ get name(): "HTTP" | "WS" | "MEDIA" | "API" | "STORE" | "REDUCER" | "EMERGENCY" | "DEFAULT";
890
+ get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
874
891
  static values(): Array<vonage.Topics>;
875
892
  static valueOf(value: string): vonage.Topics;
876
893
  }
@@ -916,7 +933,6 @@ export declare namespace vonage {
916
933
  };
917
934
  interface ICoreClientJS {
918
935
  readonly core: any/* com.vonage.clientcore.core.CoreClient */;
919
- setConfig(config: vonage.ConfigObjectJS): void;
920
936
  createSession(token: string, sessionId: Nullable<string>): Promise<string>;
921
937
  deleteSession(): Promise<any>;
922
938
  refreshSession(token: string): Promise<any>;
@@ -1029,6 +1045,8 @@ export declare namespace vonage {
1029
1045
  disableMedia(id: string, closure: (p0: Nullable<vonage.MediaClientErrorJS>) => void): void;
1030
1046
  mute(id: string, closure: (p0: Nullable<vonage.MediaClientErrorJS>) => void): void;
1031
1047
  unmute(id: string, closure: (p0: Nullable<vonage.MediaClientErrorJS>) => void): void;
1048
+ enableEarmuff(id: string, closure: (p0: Nullable<vonage.MediaClientErrorJS>) => void): void;
1049
+ disableEarmuff(id: string, closure: (p0: Nullable<vonage.MediaClientErrorJS>) => void): void;
1032
1050
  getPeerConnection(id: string): any;
1033
1051
  getAudioOutputElement(): any;
1034
1052
  getMediaConnectionState(id: string): string;
@@ -1154,6 +1172,36 @@ export declare namespace vonage {
1154
1172
  readonly cursor?: Nullable<string>;
1155
1173
  }
1156
1174
  }
1175
+ export declare namespace vonage.emergency {
1176
+ interface EmergencyEvents {
1177
+ emergencyCallDisconnected(callId: string): void;
1178
+ emergencyCallHangup(callId: string): void;
1179
+ }
1180
+ interface EmergencyCallOptionsJS {
1181
+ readonly ringbackTone?: Nullable<string>;
1182
+ }
1183
+ }
1184
+ export declare namespace vonage.emergency {
1185
+ interface IEmergencyClientJS {
1186
+ readonly emergencyCore: any/* com.vonage.client.emergency.EmergencyCoreClient */;
1187
+ emergencyCall(token: string, from: string, to: string, options: Nullable<vonage.emergency.EmergencyCallOptionsJS>): Promise<vonage.emergency.EmergencyCallDataJS>;
1188
+ reconnectEmergencyCall(token: string, callId: string, reconnectToken: string): Promise<any>;
1189
+ hangUpEmergencyCall(callId: string): Promise<any>;
1190
+ muteEmergencyCall(callId: string): Promise<any>;
1191
+ unmuteEmergencyCall(callId: string): Promise<any>;
1192
+ enableEarmuffEmergencyCall(callId: string): Promise<any>;
1193
+ disableEarmuffEmergencyCall(callId: string): Promise<any>;
1194
+ }
1195
+ class EmergencyCallDataJS {
1196
+ constructor(callId: string, reconnectToken: string);
1197
+ get callId(): string;
1198
+ get reconnectToken(): string;
1199
+ copy(callId?: string, reconnectToken?: string): vonage.emergency.EmergencyCallDataJS;
1200
+ toString(): string;
1201
+ hashCode(): number;
1202
+ equals(other: Nullable<any>): boolean;
1203
+ }
1204
+ }
1157
1205
  export declare namespace vonage.utils {
1158
1206
  abstract class OptionJS<T> {
1159
1207
  protected constructor();
@@ -22,6 +22,8 @@ declare class MediaClient implements vonage.MediaClientJS {
22
22
  disableNoiseSuppression(id: string, closure: MediaResultClosure): void;
23
23
  enableNoiseSuppression(id: string, closure: MediaResultClosure): void;
24
24
  private closePeerConnection;
25
- private setMediaTracksEnabled;
25
+ private setTrackMedia;
26
+ enableEarmuff(id: string, closure: MediaResultClosure): Promise<void>;
27
+ disableEarmuff(id: string, closure: MediaResultClosure): Promise<void>;
26
28
  }
27
29
  export default MediaClient;
@@ -23,6 +23,8 @@ 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
+ * @property emergencyPrimaryRegion The primary region URL for emergency services
27
+ * @property emergencySecondaryRegion The secondary region URL for emergency services
26
28
  *
27
29
  * @example
28
30
  * [[include:snippet_SetClientConfig.txt]]
@@ -45,6 +47,8 @@ export type ClientConfigObject = ConfigObjectJS | ({
45
47
  * @property websocketPath The Path component appended to the Websocket URL
46
48
  * @property rtcStatsTelemetry Allow users to enable RTCStats
47
49
  * @property autoReconnectMedia Allow the sdk to automatically reconnect media when network interface changes
50
+ * @property emergencyPrimaryRegion The primary region URL for emergency services
51
+ * @property emergencySecondaryRegion The secondary region URL for emergency services
48
52
  *
49
53
  * @example
50
54
  * [[include:snippet_Logging.txt]]
@@ -61,6 +65,8 @@ export interface ConfigObjectJS {
61
65
  websocketPath?: Nullable<string>;
62
66
  rtcStatsTelemetry?: Nullable<boolean>;
63
67
  autoReconnectMedia?: Nullable<boolean>;
68
+ emergencyPrimaryRegion?: Nullable<string>;
69
+ emergencySecondaryRegion?: Nullable<string>;
64
70
  }
65
71
  export interface InitConfigObjectJS extends ConfigObjectJS {
66
72
  loggingLevel?: Nullable<vonage.LoggingLevelJS>;
@@ -88,6 +94,8 @@ export declare class ClientInitConfig implements InitConfigObjectJS {
88
94
  websocketPath?: Nullable<string>;
89
95
  rtcStatsTelemetry?: Nullable<boolean>;
90
96
  autoReconnectMedia?: Nullable<boolean>;
97
+ emergencyPrimaryRegion?: Nullable<string>;
98
+ emergencySecondaryRegion?: Nullable<string>;
91
99
  /**
92
100
  * Constructs a new instance of the class.
93
101
  */