@cloudbase/realtime 2.0.2-alpha.0 → 2.5.0-beta.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,7 +1,7 @@
1
1
  import { VirtualWebSocketClient } from './virtual-websocket-client';
2
2
  import { IDatabaseServiceContext } from '@cloudbase/types/database';
3
3
  import { IWatchOptions, DBRealtimeListener, IRequestMessage } from '@cloudbase/types/realtime';
4
- import { CLOSE_EVENT_CODE } from './ws-event';
4
+ import { CloseEventCode } from './ws-event';
5
5
  export interface IRealtimeWebSocketClientConstructorOptions {
6
6
  maxReconnect?: number;
7
7
  reconnectInterval?: number;
@@ -37,29 +37,29 @@ export interface IWSWatchOptions extends IWatchOptions {
37
37
  orderBy?: Record<string, string>;
38
38
  }
39
39
  export declare class RealtimeWebSocketClient {
40
- private _virtualWSClient;
41
- private _queryIdClientMap;
42
- private _watchIdClientMap;
43
- private _maxReconnect;
44
- private _reconnectInterval;
45
- private _context;
46
- private _ws?;
47
- private _lastPingSendTS?;
48
- private _pingFailed;
49
- private _pongMissed;
50
- private _pingTimeoutId?;
51
- private _pongTimeoutId?;
52
- private _logins;
53
- private _wsInitPromise?;
54
- private _wsReadySubsribers;
55
- private _wsResponseWait;
56
- private _rttObserved;
57
- private _reconnectState;
58
- private _wsSign;
40
+ private virtualWSClient;
41
+ private queryIdClientMap;
42
+ private watchIdClientMap;
43
+ private maxReconnect;
44
+ private reconnectInterval;
45
+ private context;
46
+ private ws?;
47
+ private lastPingSendTS?;
48
+ private pingFailed;
49
+ private pongMissed;
50
+ private pingTimeoutId?;
51
+ private pongTimeoutId?;
52
+ private logins;
53
+ private wsInitPromise?;
54
+ private wsReadySubsribers;
55
+ private wsResponseWait;
56
+ private rttObserved;
57
+ private reconnectState;
58
+ private wsSign;
59
59
  constructor(options: IRealtimeWebSocketClientConstructorOptions);
60
60
  clearHeartbeat(): void;
61
61
  send: <T = any>(opts: IWSSendOptions) => Promise<T>;
62
- close(code: CLOSE_EVENT_CODE): void;
62
+ close(code: CloseEventCode): void;
63
63
  closeAllClients: (error: any) => void;
64
64
  pauseClients: (clients?: Set<VirtualWebSocketClient>) => void;
65
65
  resumeClients: (clients?: Set<VirtualWebSocketClient>) => void;