sip-connector 29.1.0 → 29.2.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.
Files changed (27) hide show
  1. package/dist/AutoConnectorManager/@AutoConnectorManager.d.ts +1 -1
  2. package/dist/CallReconnectManager/CallReconnectStateMachine/createCallReconnectMachine.d.ts +6 -0
  3. package/dist/CallReconnectManager/CallReconnectStateMachine/createCallReconnectMachineSetup.d.ts +2 -0
  4. package/dist/CallReconnectManager/CallReconnectStateMachine/types.d.ts +8 -0
  5. package/dist/CallReconnectManager/events.d.ts +13 -1
  6. package/dist/ConnectAndCallSession/ConnectAndCallSessionManager.d.ts +36 -0
  7. package/dist/ConnectAndCallSession/ConnectAndCallSessionStateMachine.d.ts +13 -0
  8. package/dist/ConnectAndCallSession/createConnectAndCallSessionMachine.d.ts +43 -0
  9. package/dist/ConnectAndCallSession/index.d.ts +5 -0
  10. package/dist/ConnectAndCallSession/types.d.ts +74 -0
  11. package/dist/ConnectionManager/ConnectionStateMachine/types.d.ts +0 -3
  12. package/dist/SessionManager/selectors.d.ts +1 -0
  13. package/dist/SessionManager/types.d.ts +2 -0
  14. package/dist/SipConnector/@SipConnector.d.ts +6 -0
  15. package/dist/SipConnector/events.d.ts +2 -2
  16. package/dist/SipConnector-B22u1blB.cjs +1 -0
  17. package/dist/{SipConnector-BF2Oie7f.js → SipConnector-BkHJMvEE.js} +1220 -920
  18. package/dist/SipConnectorFacade/@SipConnectorFacade.d.ts +4 -41
  19. package/dist/SipConnectorFacade/index.d.ts +1 -0
  20. package/dist/SipConnectorFacade/types.d.ts +53 -0
  21. package/dist/doMock.cjs +1 -1
  22. package/dist/doMock.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.ts +3 -0
  25. package/dist/index.js +23 -19
  26. package/package.json +11 -11
  27. package/dist/SipConnector-Dfaryw3N.cjs +0 -1
@@ -17,6 +17,7 @@ declare class AutoConnectorManager extends EventEmitterProxy<TEventMap> {
17
17
  connectionManager: ConnectionManager;
18
18
  callManager: CallManager;
19
19
  }, options?: IAutoConnectorOptions);
20
+ get isActive(): boolean;
20
21
  start(parameters: TParametersAutoConnect): Promise<TAutoConnectStartResult>;
21
22
  restart(): void;
22
23
  stop(): Promise<void>;
@@ -25,6 +26,5 @@ declare class AutoConnectorManager extends EventEmitterProxy<TEventMap> {
25
26
  private readonly probeServerReachability;
26
27
  private shouldRequestReconnect;
27
28
  private resetReconnectCoalescingState;
28
- private isStarted;
29
29
  }
30
30
  export default AutoConnectorManager;
@@ -165,6 +165,12 @@ export declare const createCallReconnectMachine: (deps: TCallReconnectMachineDep
165
165
  } | {
166
166
  type: "emitLimitReachedAction";
167
167
  params: unknown;
168
+ } | {
169
+ type: "emitLimitReachedTerminalAction";
170
+ params: unknown;
171
+ } | {
172
+ type: "emitErrorTerminalAction";
173
+ params: unknown;
168
174
  } | {
169
175
  type: "registerAttemptStart";
170
176
  params: unknown;
@@ -111,6 +111,8 @@ export declare const createCallReconnectMachineSetup: (deps: TCallReconnectMachi
111
111
  emitAttemptFailedAction: unknown;
112
112
  emitWaitingSignalingAction: unknown;
113
113
  emitLimitReachedAction: unknown;
114
+ emitLimitReachedTerminalAction: unknown;
115
+ emitErrorTerminalAction: unknown;
114
116
  registerAttemptStart: unknown;
115
117
  registerAttemptFinish: unknown;
116
118
  resetAttemptsState: unknown;
@@ -128,6 +128,14 @@ export type TCallReconnectMachineDeps = {
128
128
  emitLimitReached: (payload: {
129
129
  attempts: number;
130
130
  }) => void;
131
+ /** Эмит финального состояния, после которого автоматический redial больше не продолжится. */
132
+ emitTerminal: (payload: {
133
+ reason: 'limit-reached';
134
+ attempts: number;
135
+ } | {
136
+ reason: 'error-terminal';
137
+ error: unknown;
138
+ }) => void;
131
139
  /** Эмит `cancelled`. */
132
140
  emitCancelled: (payload: {
133
141
  reason: TCancelledReason;
@@ -1,6 +1,7 @@
1
1
  import { TypedEvents } from 'events-constructor';
2
+ import { EndEvent } from '@krivega/jssip';
2
3
  import { TCancelledReason } from './types';
3
- export declare const EVENT_NAMES: readonly ["armed", "disarmed", "failure-detected", "attempt-scheduled", "attempt-started", "attempt-succeeded", "attempt-failed", "waiting-signaling", "limit-reached", "cancelled", "status-changed"];
4
+ export declare const EVENT_NAMES: readonly ["armed", "disarmed", "failure-detected", "attempt-scheduled", "attempt-started", "attempt-succeeded", "attempt-failed", "waiting-signaling", "limit-reached", "cancelled", "status-changed", "termination-classified", "terminal"];
4
5
  export type TEventMap = {
5
6
  armed: Record<string, never>;
6
7
  disarmed: Record<string, never>;
@@ -35,6 +36,17 @@ export type TEventMap = {
35
36
  'status-changed': {
36
37
  isReconnecting: boolean;
37
38
  };
39
+ 'termination-classified': {
40
+ decision: 'redial' | 'finish';
41
+ event: EndEvent;
42
+ };
43
+ terminal: {
44
+ reason: 'limit-reached';
45
+ attempts: number;
46
+ } | {
47
+ reason: 'error-terminal';
48
+ error: unknown;
49
+ };
38
50
  };
39
51
  export type TEvents = TypedEvents<TEventMap>;
40
52
  export declare const createEvents: () => TypedEvents<TEventMap, readonly (keyof TEventMap)[]>;
@@ -0,0 +1,36 @@
1
+ import { ConnectAndCallSessionStateMachine } from './ConnectAndCallSessionStateMachine';
2
+ import { EConnectAndCallSessionPhase, IConnectAndCallSession, TConnectAndCallSessionCloseReason, TConnectAndCallSessionParameters, TConnectAndCallSessionStartResult, TConnectAndCallSessionTeardown } from './types';
3
+ import { AutoConnectorManager } from '../AutoConnectorManager';
4
+ import { CallReconnectManager } from '../CallReconnectManager';
5
+ import { ConnectionManager } from '../ConnectionManager';
6
+ type TDependencies = {
7
+ autoConnectorManager: AutoConnectorManager;
8
+ callReconnectManager: CallReconnectManager;
9
+ connectionManager: Pick<ConnectionManager, 'getConnectionConfiguration'>;
10
+ teardown: TConnectAndCallSessionTeardown;
11
+ };
12
+ declare class ConnectAndCallSessionManager implements IConnectAndCallSession {
13
+ readonly stateMachine: ConnectAndCallSessionStateMachine;
14
+ private readonly autoConnectorManager;
15
+ private readonly callReconnectManager;
16
+ private readonly connectionManager;
17
+ private readonly teardown;
18
+ private readonly unsubscribes;
19
+ private finalizePromise;
20
+ private finalizationReason;
21
+ private isCallStartPending;
22
+ private readonly closedPromise;
23
+ private resolveClosed;
24
+ constructor({ autoConnectorManager, callReconnectManager, connectionManager, teardown, }: TDependencies);
25
+ get phase(): EConnectAndCallSessionPhase;
26
+ start: ({ connection, startCall, }: TConnectAndCallSessionParameters) => Promise<TConnectAndCallSessionStartResult>;
27
+ hangUp: () => Promise<void>;
28
+ disconnect: () => Promise<void>;
29
+ waitUntilClosed: () => Promise<TConnectAndCallSessionCloseReason>;
30
+ private subscribeToLifecycle;
31
+ private finalizeInBackground;
32
+ private hasFinalizationStarted;
33
+ private createInterruptedStartResult;
34
+ private finalize;
35
+ }
36
+ export default ConnectAndCallSessionManager;
@@ -0,0 +1,13 @@
1
+ import { BaseStateMachine } from '../tools/BaseStateMachine';
2
+ import { createConnectAndCallSessionMachine } from './createConnectAndCallSessionMachine';
3
+ import { EConnectAndCallSessionPhase, TConnectAndCallSessionContext, TConnectAndCallSessionEvent } from './types';
4
+ type TMachine = ReturnType<typeof createConnectAndCallSessionMachine>;
5
+ type TSnapshot = {
6
+ context: TConnectAndCallSessionContext;
7
+ value: EConnectAndCallSessionPhase;
8
+ };
9
+ export declare class ConnectAndCallSessionStateMachine extends BaseStateMachine<TMachine, EConnectAndCallSessionPhase, TConnectAndCallSessionContext, TSnapshot> {
10
+ constructor();
11
+ send(event: TConnectAndCallSessionEvent): void;
12
+ }
13
+ export {};
@@ -0,0 +1,43 @@
1
+ import { EConnectAndCallSessionPhase, TConnectAndCallSessionContext } from './types';
2
+ export declare const createConnectAndCallSessionMachine: () => import('xstate').StateMachine<TConnectAndCallSessionContext, {
3
+ type: "START";
4
+ } | {
5
+ type: "REJECT";
6
+ reason: import('./types').TConnectAndCallSessionCloseReason;
7
+ } | {
8
+ type: "AUTO_CONNECTED";
9
+ } | {
10
+ type: "CALL_STARTED";
11
+ } | {
12
+ type: "REDIAL_STARTED";
13
+ } | {
14
+ type: "REDIAL_SUCCEEDED";
15
+ } | {
16
+ type: "FINALIZE";
17
+ reason: import('./types').TConnectAndCallSessionCloseReason;
18
+ } | {
19
+ type: "MANUAL_CLOSE";
20
+ } | {
21
+ type: "CLEANUP_COMPLETE";
22
+ }, {}, never, {
23
+ type: "assignRejectReason";
24
+ params: import('xstate').NonReducibleUnknown;
25
+ } | {
26
+ type: "assignFinalizeReason";
27
+ params: import('xstate').NonReducibleUnknown;
28
+ } | {
29
+ type: "assignManualCloseReason";
30
+ params: import('xstate').NonReducibleUnknown;
31
+ }, never, never, EConnectAndCallSessionPhase, string, import('xstate').NonReducibleUnknown, import('xstate').NonReducibleUnknown, import('xstate').EventObject, import('xstate').MetaObject, {
32
+ id: "connectAndCallSession";
33
+ states: {
34
+ readonly idle: {};
35
+ readonly connecting: {};
36
+ readonly calling: {};
37
+ readonly active: {};
38
+ readonly reconnecting: {};
39
+ readonly finalizing: {};
40
+ readonly cancelling: {};
41
+ readonly closed: {};
42
+ };
43
+ }>;
@@ -0,0 +1,5 @@
1
+ export { default as ConnectAndCallSessionManager } from './ConnectAndCallSessionManager';
2
+ export { ConnectAndCallSessionStateMachine } from './ConnectAndCallSessionStateMachine';
3
+ export { createConnectAndCallSessionMachine } from './createConnectAndCallSessionMachine';
4
+ export { EConnectAndCallSessionPhase } from './types';
5
+ export type { IConnectAndCallSession, TConnectAndCallSessionCloseReason, TConnectAndCallSessionContext, TConnectAndCallSessionEvent, TConnectAndCallSessionParameters, TConnectAndCallSessionResult, TConnectAndCallSessionStartResult, TConnectAndCallSessionTeardown, } from './types';
@@ -0,0 +1,74 @@
1
+ import { AutoConnectorManager } from '../AutoConnectorManager';
2
+ import { TConnectionConfig, TParametersConnection } from '../ConnectionManager';
3
+ export declare enum EConnectAndCallSessionPhase {
4
+ IDLE = "idle",
5
+ CONNECTING = "connecting",
6
+ CALLING = "calling",
7
+ ACTIVE = "active",
8
+ RECONNECTING = "reconnecting",
9
+ FINALIZING = "finalizing",
10
+ CANCELLING = "cancelling",
11
+ CLOSED = "closed"
12
+ }
13
+ export type TConnectAndCallSessionCloseReason = 'completed' | 'manual' | 'cancelled' | 'initial-call-failed' | 'redial-exhausted' | 'auto-connect-failed' | 'auto-connector-active' | 'session-active';
14
+ export type TConnectAndCallSessionContext = {
15
+ closeReason?: TConnectAndCallSessionCloseReason;
16
+ };
17
+ export type TConnectAndCallSessionEvent = {
18
+ type: 'START';
19
+ } | {
20
+ type: 'REJECT';
21
+ reason: TConnectAndCallSessionCloseReason;
22
+ } | {
23
+ type: 'AUTO_CONNECTED';
24
+ } | {
25
+ type: 'CALL_STARTED';
26
+ } | {
27
+ type: 'REDIAL_STARTED';
28
+ } | {
29
+ type: 'REDIAL_SUCCEEDED';
30
+ } | {
31
+ type: 'FINALIZE';
32
+ reason: TConnectAndCallSessionCloseReason;
33
+ } | {
34
+ type: 'MANUAL_CLOSE';
35
+ } | {
36
+ type: 'CLEANUP_COMPLETE';
37
+ };
38
+ export interface IConnectAndCallSession {
39
+ readonly phase: EConnectAndCallSessionPhase;
40
+ hangUp: () => Promise<void>;
41
+ disconnect: () => Promise<void>;
42
+ waitUntilClosed: () => Promise<TConnectAndCallSessionCloseReason>;
43
+ }
44
+ export type TConnectAndCallSessionTeardown = {
45
+ endCall: () => Promise<void>;
46
+ isCallOngoing: () => boolean;
47
+ };
48
+ export type TConnectAndCallSessionParameters = {
49
+ connection: {
50
+ options?: Parameters<AutoConnectorManager['start']>[0]['options'];
51
+ parameters: TParametersConnection | (() => Promise<TParametersConnection>);
52
+ };
53
+ startCall: () => Promise<RTCPeerConnection>;
54
+ };
55
+ export type TConnectAndCallSessionStartResult = {
56
+ isSuccessful: true;
57
+ configuration: TConnectionConfig;
58
+ peerConnection: RTCPeerConnection;
59
+ } | {
60
+ isSuccessful: false;
61
+ configuration: undefined;
62
+ error?: unknown;
63
+ peerConnection: undefined;
64
+ reason: 'cancelled' | 'auto-connect-failed' | 'auto-connector-active' | 'session-active';
65
+ };
66
+ export type TConnectAndCallSessionResult = (Extract<TConnectAndCallSessionStartResult, {
67
+ isSuccessful: true;
68
+ }> & {
69
+ session: IConnectAndCallSession;
70
+ }) | (Extract<TConnectAndCallSessionStartResult, {
71
+ isSuccessful: false;
72
+ }> & {
73
+ session: undefined;
74
+ });
@@ -27,9 +27,6 @@ export type TContextMap = {
27
27
  [EState.PREPARING]: {
28
28
  connectionConfiguration: undefined;
29
29
  };
30
- [EState.PREPARING]: {
31
- connectionConfiguration: undefined;
32
- };
33
30
  [EState.CONNECTING]: {
34
31
  connectionConfiguration: TConnectionConfig;
35
32
  };
@@ -7,5 +7,6 @@ export declare const sessionSelectors: {
7
7
  selectIncomingStatus: (snapshot: TSessionSnapshot) => EIncomingStatus;
8
8
  selectPresentationStatus: (snapshot: TSessionSnapshot) => EPresentationStatus;
9
9
  selectIsInCall: (snapshot: TSessionSnapshot) => boolean;
10
+ selectIsCallReconnecting: (snapshot: TSessionSnapshot) => boolean;
10
11
  selectSystemStatus: (snapshot: TSessionSnapshot) => ESystemStatus;
11
12
  };
@@ -43,6 +43,8 @@ export declare enum ESystemStatus {
43
43
  READY_TO_CALL = "system:readyToCall",
44
44
  /** Идет установка звонка (connection established, call connecting) */
45
45
  CALL_CONNECTING = "system:callConnecting",
46
+ /** Идет автоматическое восстановление звонка после сетевого сбоя */
47
+ CALL_RECONNECTING = "system:callReconnecting",
46
48
  /** Идет процесс отключения звонка (connection established, call disconnecting) */
47
49
  CALL_DISCONNECTING = "system:callDisconnecting",
48
50
  /** Звонок активен (connection established, call accepted/inCall) */
@@ -12,6 +12,7 @@ import { SessionManager } from '../SessionManager';
12
12
  import { StatsManager, TOutboundVideoVerificationStrictness } from '../StatsManager';
13
13
  import { VideoSendingBalancerManager } from '../VideoSendingBalancerManager';
14
14
  import { MainStreamHealthMonitor } from '../MainStreamHealthMonitor';
15
+ import { TConnectAndCallSessionParameters, TConnectAndCallSessionResult } from '../ConnectAndCallSession';
15
16
  import { TJsSIP } from '../types';
16
17
  import { IBalancerOptions } from '../VideoSendingBalancer';
17
18
  import { TEventMap } from './events';
@@ -34,6 +35,7 @@ declare class SipConnector extends EventEmitterProxy<TEventMap> {
34
35
  private readonly mainStreamRecovery;
35
36
  private readonly preferredMimeTypesVideoCodecs?;
36
37
  private readonly excludeMimeTypesVideoCodecs?;
38
+ private activeConnectAndCallSession;
37
39
  constructor({ JsSIP }: {
38
40
  JsSIP: TJsSIP;
39
41
  }, { preferredMimeTypesVideoCodecs, excludeMimeTypesVideoCodecs, videoBalancerOptions, autoConnectorOptions, callReconnectOptions, numberOfConnectionAttempts, minConsecutiveProblemSamplesCount, throttleRecoveryTimeout, }?: {
@@ -75,6 +77,7 @@ declare class SipConnector extends EventEmitterProxy<TEventMap> {
75
77
  getUri: TGetUri;
76
78
  startAutoConnect: (...args: Parameters<AutoConnectorManager["start"]>) => Promise<Awaited<ReturnType<AutoConnectorManager["start"]>>>;
77
79
  stopAutoConnect: AutoConnectorManager['stop'];
80
+ connectAndCallToServer: (parameters: TConnectAndCallSessionParameters) => Promise<TConnectAndCallSessionResult>;
78
81
  call: (params: Omit<Parameters<CallManager["startCall"]>[2], "isPresentationCall">, options?: {
79
82
  autoRedial?: boolean;
80
83
  }) => Promise<RTCPeerConnection>;
@@ -136,6 +139,9 @@ declare class SipConnector extends EventEmitterProxy<TEventMap> {
136
139
  askPermissionToEnableCam(...args: Parameters<ApiManager['askPermissionToEnableCam']>): Promise<void>;
137
140
  setMinConsecutiveProblemSamplesCount: (minConsecutiveProblemSamplesCount: number) => void;
138
141
  setThrottleRecoveryTimeout: (throttleRecoveryTimeout: number) => void;
142
+ private readonly endCallWithoutSessionRouting;
143
+ private clearActiveConnectAndCallSession;
144
+ private clearActiveConnectAndCallSessionWhenClosed;
139
145
  private subscribeDisconnectedFromOutOfCall;
140
146
  private subscribeConnectedWithConfigurationFromOutOfCall;
141
147
  private mayBeStopPresentationAndNotify;
@@ -10,7 +10,7 @@ import { TPresentationManagerEventMap } from '../PresentationManager';
10
10
  import { TSessionManagerEventMap } from '../SessionManager';
11
11
  import { TStatsManagerEventMap } from '../StatsManager';
12
12
  import { TVideoSendingBalancerManagerEventMap } from '../VideoSendingBalancerManager';
13
- export declare const EVENT_NAMES: readonly [...("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:limit-reached" | "call-reconnect:status-changed" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:presentation:start" | "call:presentation:started" | "call:presentation:end" | "call:presentation:ended" | "call:presentation:failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "call:confirmed" | "call:ended" | "call:failed" | "call:newDTMF" | "call:newInfo" | "call:hold" | "call:unhold" | "call:muted" | "call:unmuted" | "call:reinvite" | "call:update" | "call:refer" | "call:replaces" | "call:sdp" | "call:icecandidate" | "call:getusermediafailed" | "call:peerconnection:createofferfailed" | "call:peerconnection:createanswerfailed" | "call:peerconnection:setlocaldescriptionfailed" | "call:peerconnection:setremotedescriptionfailed" | "call:start-call" | "call:end-call" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-tracks-changed" | "call:remote-streams-changed" | "call:recv-session-started" | "call:recv-session-ended" | "call:recv-quality-changed" | "api:enter-room" | "api:main-cam-control" | "api:use-license" | "api:new-dtmf" | "api:conference:participant-token-issued" | "api:contented-stream:available" | "api:contented-stream:not-available" | "api:presentation:must-stop" | "api:channels:all" | "api:channels:notify" | "api:participant:added-to-list-moderators" | "api:participant:removed-from-list-moderators" | "api:participant:move-request-to-stream" | "api:participant:move-request-to-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participant:move-request-to-participants" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "api:admin:start-main-cam" | "api:admin:stop-main-cam" | "api:admin:start-mic" | "api:admin:stop-mic" | "api:admin:force-sync-media-state" | "api:failed-send-room-direct-p2p" | "incoming-call:ringing" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:presentation:start" | "presentation:presentation:started" | "presentation:presentation:end" | "presentation:presentation:ended" | "presentation:presentation:failed" | "stats:stopped" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated" | "main-stream-health:health-snapshot" | "main-stream-health:inbound-video-problem-detected" | "main-stream-health:inbound-video-problem-resolved" | "main-stream-health:inbound-video-problem-reset" | "session:snapshot-changed")[], "disconnected-from-out-of-call", "connected-with-configuration-from-out-of-call", "stopped-presentation-by-server-command"];
13
+ export declare const EVENT_NAMES: readonly [...("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:limit-reached" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:status-changed" | "call-reconnect:termination-classified" | "call-reconnect:terminal" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:presentation:start" | "call:presentation:started" | "call:presentation:end" | "call:presentation:ended" | "call:presentation:failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "call:confirmed" | "call:ended" | "call:failed" | "call:newDTMF" | "call:newInfo" | "call:hold" | "call:unhold" | "call:muted" | "call:unmuted" | "call:reinvite" | "call:update" | "call:refer" | "call:replaces" | "call:sdp" | "call:icecandidate" | "call:getusermediafailed" | "call:peerconnection:createofferfailed" | "call:peerconnection:createanswerfailed" | "call:peerconnection:setlocaldescriptionfailed" | "call:peerconnection:setremotedescriptionfailed" | "call:start-call" | "call:end-call" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-tracks-changed" | "call:remote-streams-changed" | "call:recv-session-started" | "call:recv-session-ended" | "call:recv-quality-changed" | "api:enter-room" | "api:main-cam-control" | "api:use-license" | "api:new-dtmf" | "api:conference:participant-token-issued" | "api:contented-stream:available" | "api:contented-stream:not-available" | "api:presentation:must-stop" | "api:channels:all" | "api:channels:notify" | "api:participant:added-to-list-moderators" | "api:participant:removed-from-list-moderators" | "api:participant:move-request-to-stream" | "api:participant:move-request-to-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participant:move-request-to-participants" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "api:admin:start-main-cam" | "api:admin:stop-main-cam" | "api:admin:start-mic" | "api:admin:stop-mic" | "api:admin:force-sync-media-state" | "api:failed-send-room-direct-p2p" | "incoming-call:ringing" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:presentation:start" | "presentation:presentation:started" | "presentation:presentation:end" | "presentation:presentation:ended" | "presentation:presentation:failed" | "stats:stopped" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated" | "main-stream-health:health-snapshot" | "main-stream-health:inbound-video-problem-detected" | "main-stream-health:inbound-video-problem-resolved" | "main-stream-health:inbound-video-problem-reset" | "session:snapshot-changed")[], "disconnected-from-out-of-call", "connected-with-configuration-from-out-of-call", "stopped-presentation-by-server-command"];
14
14
  export type TEventName = (typeof EVENT_NAMES)[number];
15
15
  type PrefixedEventMap<T extends Record<string, unknown>, Prefix extends string> = {
16
16
  [K in keyof T as `${Prefix}:${string & K}`]: T[K];
@@ -22,5 +22,5 @@ type TSipConnectorEventMap = {
22
22
  };
23
23
  export type TEventMap = PrefixedEventMap<TAutoConnectorManagerEventMap, 'auto-connect'> & PrefixedEventMap<TCallReconnectManagerEventMap, 'call-reconnect'> & PrefixedEventMap<TConnectionManagerEventMap, 'connection'> & PrefixedEventMap<TCallManagerEventMap, 'call'> & PrefixedEventMap<TApiManagerEventMap, 'api'> & PrefixedEventMap<TIncomingCallManagerEventMap, 'incoming-call'> & PrefixedEventMap<TPresentationManagerEventMap, 'presentation'> & PrefixedEventMap<TStatsManagerEventMap, 'stats'> & PrefixedEventMap<TVideoSendingBalancerManagerEventMap, 'video-balancer'> & PrefixedEventMap<TMainStreamHealthMonitorEventMap, 'main-stream-health'> & PrefixedEventMap<TSessionManagerEventMap, 'session'> & TSipConnectorEventMap;
24
24
  export type TEvents = TypedEvents<TEventMap>;
25
- export declare const createEvents: () => TypedEvents<TEventMap, readonly ("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:limit-reached" | "call-reconnect:status-changed" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:presentation:start" | "call:presentation:started" | "call:presentation:end" | "call:presentation:ended" | "call:presentation:failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "call:confirmed" | "call:ended" | "call:failed" | "call:newDTMF" | "call:newInfo" | "call:hold" | "call:unhold" | "call:muted" | "call:unmuted" | "call:reinvite" | "call:update" | "call:refer" | "call:replaces" | "call:sdp" | "call:icecandidate" | "call:getusermediafailed" | "call:peerconnection:createofferfailed" | "call:peerconnection:createanswerfailed" | "call:peerconnection:setlocaldescriptionfailed" | "call:peerconnection:setremotedescriptionfailed" | "call:start-call" | "call:end-call" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-tracks-changed" | "call:remote-streams-changed" | "call:recv-session-started" | "call:recv-session-ended" | "call:recv-quality-changed" | "api:enter-room" | "api:main-cam-control" | "api:use-license" | "api:new-dtmf" | "api:conference:participant-token-issued" | "api:contented-stream:available" | "api:contented-stream:not-available" | "api:presentation:must-stop" | "api:channels:all" | "api:channels:notify" | "api:participant:added-to-list-moderators" | "api:participant:removed-from-list-moderators" | "api:participant:move-request-to-stream" | "api:participant:move-request-to-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participant:move-request-to-participants" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "api:admin:start-main-cam" | "api:admin:stop-main-cam" | "api:admin:start-mic" | "api:admin:stop-mic" | "api:admin:force-sync-media-state" | "api:failed-send-room-direct-p2p" | "incoming-call:ringing" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:presentation:start" | "presentation:presentation:started" | "presentation:presentation:end" | "presentation:presentation:ended" | "presentation:presentation:failed" | "stats:stopped" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated" | "main-stream-health:health-snapshot" | "main-stream-health:inbound-video-problem-detected" | "main-stream-health:inbound-video-problem-resolved" | "main-stream-health:inbound-video-problem-reset" | "session:snapshot-changed" | keyof TSipConnectorEventMap)[]>;
25
+ export declare const createEvents: () => TypedEvents<TEventMap, readonly ("connection:connecting" | "connection:connected" | "connection:registered" | "connection:disconnecting" | "connection:disconnected" | "auto-connect:failed-all-attempts" | "auto-connect:stop-attempts-by-error" | "auto-connect:limit-reached-attempts" | "auto-connect:before-attempt" | "auto-connect:success" | "auto-connect:cancelled-attempts" | "auto-connect:changed-attempt-status" | "auto-connect:telephony-check-failure" | "auto-connect:telephony-check-escalated" | "call-reconnect:cancelled" | "call-reconnect:armed" | "call-reconnect:limit-reached" | "call-reconnect:disarmed" | "call-reconnect:failure-detected" | "call-reconnect:attempt-scheduled" | "call-reconnect:attempt-started" | "call-reconnect:attempt-succeeded" | "call-reconnect:attempt-failed" | "call-reconnect:waiting-signaling" | "call-reconnect:status-changed" | "call-reconnect:termination-classified" | "call-reconnect:terminal" | "connection:newRTCSession" | "connection:unregistered" | "connection:registrationFailed" | "connection:newMessage" | "connection:sipEvent" | "connection:connect-started" | "connection:connect-succeeded" | "connection:connect-failed" | "connection:connect-parameters-resolve-success" | "connection:connect-parameters-resolve-failed" | "connection:connected-with-configuration" | "call:presentation:start" | "call:presentation:started" | "call:presentation:end" | "call:presentation:ended" | "call:presentation:failed" | "call:peerconnection" | "call:connecting" | "call:sending" | "call:progress" | "call:accepted" | "call:confirmed" | "call:ended" | "call:failed" | "call:newDTMF" | "call:newInfo" | "call:hold" | "call:unhold" | "call:muted" | "call:unmuted" | "call:reinvite" | "call:update" | "call:refer" | "call:replaces" | "call:sdp" | "call:icecandidate" | "call:getusermediafailed" | "call:peerconnection:createofferfailed" | "call:peerconnection:createanswerfailed" | "call:peerconnection:setlocaldescriptionfailed" | "call:peerconnection:setremotedescriptionfailed" | "call:start-call" | "call:end-call" | "call:peerconnection:confirmed" | "call:peerconnection:ontrack" | "call:ended:fromserver" | "call:call-status-changed" | "call:remote-tracks-changed" | "call:remote-streams-changed" | "call:recv-session-started" | "call:recv-session-ended" | "call:recv-quality-changed" | "api:enter-room" | "api:main-cam-control" | "api:use-license" | "api:new-dtmf" | "api:conference:participant-token-issued" | "api:contented-stream:available" | "api:contented-stream:not-available" | "api:presentation:must-stop" | "api:channels:all" | "api:channels:notify" | "api:participant:added-to-list-moderators" | "api:participant:removed-from-list-moderators" | "api:participant:move-request-to-stream" | "api:participant:move-request-to-spectators" | "api:participant:move-request-to-spectators-synthetic" | "api:participant:move-request-to-spectators-with-audio-id" | "api:participant:move-request-to-participants" | "api:participation:accepting-word-request" | "api:participation:cancelling-word-request" | "api:webcast:started" | "api:webcast:stopped" | "api:account:changed" | "api:account:deleted" | "api:admin:start-main-cam" | "api:admin:stop-main-cam" | "api:admin:start-mic" | "api:admin:stop-mic" | "api:admin:force-sync-media-state" | "api:failed-send-room-direct-p2p" | "incoming-call:ringing" | "incoming-call:declinedIncomingCall" | "incoming-call:terminatedIncomingCall" | "incoming-call:failedIncomingCall" | "presentation:presentation:start" | "presentation:presentation:started" | "presentation:presentation:end" | "presentation:presentation:ended" | "presentation:presentation:failed" | "stats:stopped" | "stats:collected" | "video-balancer:balancing-scheduled" | "video-balancer:balancing-started" | "video-balancer:balancing-stopped" | "video-balancer:parameters-updated" | "main-stream-health:health-snapshot" | "main-stream-health:inbound-video-problem-detected" | "main-stream-health:inbound-video-problem-resolved" | "main-stream-health:inbound-video-problem-reset" | "session:snapshot-changed" | keyof TSipConnectorEventMap)[]>;
26
26
  export {};