@vonage/client-sdk 1.0.0-rc.3 → 1.0.0-rc.5

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.
@@ -9,7 +9,7 @@ export namespace vonage {
9
9
  mute(callId: string, legId: string, isMuted: boolean): void;
10
10
  earmuff(callId: string, legId: string, earmuffStatus: boolean): void;
11
11
  dtmf(callId: string, legId: string, digits: string): void;
12
- callHangup(callId: string, callQuality: vonage.RTCQualityJS, isRemote: boolean): void;
12
+ callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: vonage.HangupReasonJS): void;
13
13
  legStatusUpdate(callId: string, legId: string, status: vonage.LegStatusJS): void;
14
14
  reconnecting(): void;
15
15
  reconnection(): void;
@@ -46,8 +46,7 @@ export namespace vonage {
46
46
  getLeg(legId: string): Promise<vonage.LegJS>;
47
47
  answerCall(callId: string): Promise<any>;
48
48
  rejectCall(callId: string): Promise<any>;
49
- hangup(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>): Promise<any>;
50
- hangup$default(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>, $mask0: number, $handler: Nullable<any>): Promise<any>;
49
+ hangupWithReason(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>): Promise<any>;
51
50
  say(callId: string, params: vonage.CallSayParams): Promise<any>;
52
51
  mute(callId: string): Promise<any>;
53
52
  unmute(callId: string): Promise<any>;
@@ -581,7 +580,7 @@ export namespace vonage {
581
580
  mute(callId: string, legId: string, isMuted: boolean): void;
582
581
  earmuff(callId: string, legId: string, earmuffStatus: boolean): void;
583
582
  dtmf(callId: string, legId: string, digits: string): void;
584
- callHangup(callId: string, callQuality: vonage.RTCQualityJS, isRemote: boolean): void;
583
+ callHangup(callId: string, callQuality: vonage.RTCQualityJS, reason: vonage.HangupReasonJS): void;
585
584
  legStatusUpdate(callId: string, legId: string, status: vonage.LegStatusJS): void;
586
585
  reconnecting(): void;
587
586
  reconnection(): void;
@@ -619,6 +618,32 @@ export namespace vonage {
619
618
  getStatus(status: any/* com.vonage.clientcore.core.api.LegStatus */): vonage.LegStatusJS;
620
619
  };
621
620
  }
621
+ abstract class HangupReasonJS {
622
+ private constructor();
623
+ static get REMOTE_HANGUP(): vonage.HangupReasonJS & {
624
+ get name(): "REMOTE_HANGUP";
625
+ get ordinal(): 0;
626
+ };
627
+ static get REMOTE_REJECT(): vonage.HangupReasonJS & {
628
+ get name(): "REMOTE_REJECT";
629
+ get ordinal(): 1;
630
+ };
631
+ static get LOCAL_HANGUP(): vonage.HangupReasonJS & {
632
+ get name(): "LOCAL_HANGUP";
633
+ get ordinal(): 2;
634
+ };
635
+ static get MEDIA_TIMEOUT(): vonage.HangupReasonJS & {
636
+ get name(): "MEDIA_TIMEOUT";
637
+ get ordinal(): 3;
638
+ };
639
+ static values(): Array<vonage.HangupReasonJS>;
640
+ static valueOf(value: string): vonage.HangupReasonJS;
641
+ get name(): "REMOTE_HANGUP" | "REMOTE_REJECT" | "LOCAL_HANGUP" | "MEDIA_TIMEOUT";
642
+ get ordinal(): 0 | 1 | 2 | 3;
643
+ static get Companion(): {
644
+ getReason(reason: any/* com.vonage.clientcore.core.api.HangupReason */): vonage.HangupReasonJS;
645
+ };
646
+ }
622
647
  interface IVoiceClientJS extends vonage.ICoreClientJS {
623
648
  readonly media: vonage.MediaClientJS;
624
649
  readonly core: any/* com.vonage.clientcore.core.CoreClientWithMedia */;
@@ -628,7 +653,7 @@ export namespace vonage {
628
653
  getLeg(legId: string): Promise<vonage.LegJS>;
629
654
  answerCall(callId: string): Promise<any>;
630
655
  rejectCall(callId: string): Promise<any>;
631
- hangup(callId: string, reasonText?: Nullable<string>, reasonCode?: Nullable<string>): Promise<any>;
656
+ hangupWithReason(callId: string, reasonText: Nullable<string>, reasonCode: Nullable<string>): Promise<any>;
632
657
  say(callId: string, params: vonage.CallSayParams): Promise<any>;
633
658
  mute(callId: string): Promise<any>;
634
659
  unmute(callId: string): Promise<any>;