@vonage/client-sdk 1.1.0-alpha.5 → 1.1.0-alpha.9

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.
@@ -703,7 +703,7 @@ export namespace vonage {
703
703
  }
704
704
  export namespace vonage {
705
705
  interface HttpClientJS {
706
- request(verb: string, url: string, headers: Json, body: Nullable<string>, callback: (p0: Nullable<vonage.HttpClientErrorJS>, p1: Nullable<string>) => void): void;
706
+ request(verb: string, url: string, headers: Json, body: Nullable<string>, callback: (p0: Nullable<vonage.HttpClientErrorJS>, p1: Nullable<vonage.HttpClientResponseJS>) => void): void;
707
707
  }
708
708
  interface SocketClientJS {
709
709
  delegate: Nullable<vonage.SocketClientDelegateJS>;
@@ -715,7 +715,7 @@ export namespace vonage {
715
715
  }
716
716
  interface SocketClientDelegateJS {
717
717
  didReceiveNewSocketEvent(type: string, body: string): void;
718
- didReceiveNewSocketConnectionStatusEvent(type: string, reason: Nullable<string>): void;
718
+ didReceiveNewSocketConnectionStatusEvent(type: string, reason: Nullable<string>, timestamp: any/* kotlin.Number */, retryNumber: Nullable<number>): void;
719
719
  }
720
720
  interface MediaClientJS {
721
721
  delegate: Nullable<vonage.MediaClientDelegateJS>;
@@ -735,15 +735,22 @@ export namespace vonage {
735
735
  }
736
736
  export namespace vonage {
737
737
  class HttpClientErrorJS extends Error {
738
- constructor(message?: Nullable<string>, responseCode?: Nullable<number>, responseBody?: Nullable<string>, cause?: Nullable<Error>);
739
- get responseCode(): Nullable<number>;
740
- get responseBody(): Nullable<string>;
738
+ constructor(message?: Nullable<string>, cause?: Nullable<Error>);
741
739
  get coreError(): any/* com.vonage.clientcore.core.middlewares.http.HTTPClientError */;
742
740
  component1(): Nullable<string>;
743
- component2(): Nullable<number>;
744
- component3(): Nullable<string>;
745
- component4(): Nullable<Error>;
746
- copy(message?: Nullable<string>, responseCode?: Nullable<number>, responseBody?: Nullable<string>, cause?: Nullable<Error>): vonage.HttpClientErrorJS;
741
+ component2(): Nullable<Error>;
742
+ copy(message?: Nullable<string>, cause?: Nullable<Error>): vonage.HttpClientErrorJS;
743
+ toString(): string;
744
+ hashCode(): number;
745
+ equals(other: Nullable<any>): boolean;
746
+ }
747
+ class HttpClientResponseJS {
748
+ constructor(statusCode: number, body?: Nullable<string>);
749
+ get statusCode(): number;
750
+ get body(): Nullable<string>;
751
+ component1(): number;
752
+ component2(): Nullable<string>;
753
+ copy(statusCode?: number, body?: Nullable<string>): vonage.HttpClientResponseJS;
747
754
  toString(): string;
748
755
  hashCode(): number;
749
756
  equals(other: Nullable<any>): boolean;
@@ -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<vonage.HttpClientErrorJS>, p1: KMPPackage.Nullable<string>) => void): Promise<void>;
6
+ request(verb: string, url: string, headers: HttpHeaders, body: string | null, callback: (p0: KMPPackage.Nullable<vonage.HttpClientErrorJS>, p1: KMPPackage.Nullable<vonage.HttpClientResponseJS>) => void): Promise<void>;
7
7
  }
8
8
  export default HttpClient;