@koi-design/callkit 2.3.0-beta.9 → 2.3.1-beta.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.
package/dist/index.d.ts CHANGED
@@ -4805,7 +4805,7 @@ declare class Socket {
4805
4805
  private callKit;
4806
4806
  private ws?;
4807
4807
  lastPingTime: any;
4808
- pingTimer?: ReturnType<typeof setInterval>;
4808
+ private heartbeatManager;
4809
4809
  /**
4810
4810
  * @description reconnect timer
4811
4811
  */
@@ -4828,7 +4828,17 @@ declare class Socket {
4828
4828
  get startConfirm(): boolean;
4829
4829
  get isError(): boolean;
4830
4830
  constructor(callKit: CallKit);
4831
- get reconnectConfig(): IncallConfig;
4831
+ get isUserSetPingTryCount(): boolean;
4832
+ get reconnectConfig(): IncallConfig | {
4833
+ maxAttempts: number;
4834
+ interval: number;
4835
+ enabled: boolean;
4836
+ delay: number;
4837
+ pingInterval: number;
4838
+ pingTimeout: number;
4839
+ excludeLogEvents: string[];
4840
+ };
4841
+ get pingInterval(): number;
4832
4842
  isConnected(): boolean;
4833
4843
  init(): void;
4834
4844
  private setConnectAuthState;
@@ -4844,6 +4854,7 @@ declare class Socket {
4844
4854
  private onMessage;
4845
4855
  send(event: SocketSendEventType, message?: any): void;
4846
4856
  private ping;
4857
+ handlePingTimeout(): void;
4847
4858
  private checkPing;
4848
4859
  /**
4849
4860
  * reset socket connection and all states
@@ -4851,6 +4862,10 @@ declare class Socket {
4851
4862
  reset(config?: {
4852
4863
  force?: boolean;
4853
4864
  }): Promise<void>;
4865
+ /**
4866
+ * Destroy the heartbeat manager
4867
+ */
4868
+ destroyHeartbeat(): void;
4854
4869
  private attemptReconnect;
4855
4870
  }
4856
4871
 
@@ -4895,6 +4910,11 @@ interface IConfig {
4895
4910
  iceGatheringTimeout: number;
4896
4911
  encryptionMethod: EncryptionMethodType;
4897
4912
  logGather: boolean;
4913
+ keepaliveInterval?: number;
4914
+ /** Ping timeout reconnection max attempts */
4915
+ pingTryCount?: number;
4916
+ /** Ping timeout reconnection interval (seconds) */
4917
+ pingTryCountInterval?: number;
4898
4918
  };
4899
4919
  }
4900
4920
  declare class Config {
@@ -5289,6 +5309,21 @@ declare class Connect {
5289
5309
  setMute(mute: boolean): Promise<void>;
5290
5310
  refer(referTo: string, extra?: any): Promise<void>;
5291
5311
  private referInCall;
5312
+ /**
5313
+ * Get the SIP URI for "refer to self" (same as reconnection refer logic).
5314
+ * Shared by referInCallToSelf and internal reconnection refer.
5315
+ */
5316
+ private getSelfReferUri;
5317
+ /**
5318
+ * Whether we can refer the current call to self (has active session in Established/Establishing and is calling).
5319
+ * Shared by reconnection logic and referInCallToSelf.
5320
+ */
5321
+ private canReferInCallToSelf;
5322
+ /**
5323
+ * Refer the current call to self (e.g. Agent RTP loss recovery, post-reconnect recovery).
5324
+ * Socket and other callers can use this without constructing referTo.
5325
+ */
5326
+ referInCallToSelf(callUuid?: string, extra?: any): Promise<void>;
5292
5327
  }
5293
5328
 
5294
5329
  interface CallKitConfig {