sip-connector 14.0.1-0 → 14.1.0-alpha.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.
- package/dist/SipConnector-CK3GgjXE.js +2492 -0
- package/dist/SipConnector-CwI8aFEA.cjs +1 -0
- package/dist/doMock.cjs +1 -1
- package/dist/doMock.js +248 -217
- package/dist/index.cjs +1 -1
- package/dist/index.js +529 -436
- package/dist/src/ApiManager/@ApiManager.d.ts +58 -0
- package/dist/src/ApiManager/constants.d.ts +71 -0
- package/dist/src/ApiManager/eventNames.d.ts +33 -0
- package/dist/src/ApiManager/index.d.ts +2 -0
- package/dist/src/ApiManager/types.d.ts +99 -0
- package/dist/src/CallManager/@CallManager.d.ts +26 -0
- package/dist/src/CallManager/AbstractCallStrategy.d.ts +47 -0
- package/dist/src/CallManager/MCUCallStrategy.d.ts +30 -0
- package/dist/src/CallManager/RemoteStreamsManager.d.ts +8 -0
- package/dist/src/CallManager/causes.d.ts +12 -0
- package/dist/src/CallManager/eventNames.d.ts +45 -0
- package/dist/src/CallManager/hasCanceledCallError.d.ts +2 -0
- package/dist/src/CallManager/index.d.ts +5 -0
- package/dist/src/CallManager/types.d.ts +59 -0
- package/dist/src/ConnectionManager/@ConnectionManager.d.ts +47 -0
- package/dist/src/ConnectionManager/ConfigurationManager.d.ts +60 -0
- package/dist/src/ConnectionManager/ConnectionFlow.d.ts +83 -0
- package/dist/src/ConnectionManager/ConnectionStateMachine.d.ts +61 -0
- package/dist/src/ConnectionManager/RegistrationManager.d.ts +17 -0
- package/dist/src/ConnectionManager/SipOperations.d.ts +32 -0
- package/dist/src/ConnectionManager/UAFactory.d.ts +50 -0
- package/dist/src/ConnectionManager/eventNames.d.ts +16 -0
- package/dist/src/ConnectionManager/index.d.ts +3 -0
- package/dist/src/IncomingCallManager/@IncomingCallManager.d.ts +36 -0
- package/dist/src/IncomingCallManager/eventNames.d.ts +13 -0
- package/dist/src/IncomingCallManager/index.d.ts +2 -0
- package/dist/src/PresentationManager/@PresentationManager.d.ts +47 -0
- package/dist/src/PresentationManager/constants.d.ts +1 -0
- package/dist/src/PresentationManager/eventNames.d.ts +11 -0
- package/dist/src/PresentationManager/index.d.ts +1 -0
- package/dist/src/PresentationManager/types.d.ts +2 -0
- package/dist/src/SipConnector.d.ts +89 -283
- package/dist/src/SipConnectorFacade/SipConnectorFacade.d.ts +34 -25
- package/dist/src/__fixtures__/BaseSession.mock.d.ts +9 -9
- package/dist/src/__fixtures__/RTCPeerConnectionMock.d.ts +1 -1
- package/dist/src/__fixtures__/RTCSessionMock.d.ts +25 -20
- package/dist/src/__fixtures__/UA.mock.d.ts +23 -25
- package/dist/src/__fixtures__/index.d.ts +4 -4
- package/dist/src/__fixtures__/jssip.mock.d.ts +3 -3
- package/dist/src/doMock.d.ts +1 -0
- package/dist/src/index.d.ts +3 -1
- package/dist/src/tools/__fixtures__/connectToServer.d.ts +2 -2
- package/dist/src/tools/index.d.ts +2 -2
- package/dist/src/tools/{sendDTMFAccumulated.d.ts → sendDtmfFAccumulated.d.ts} +2 -2
- package/package.json +17 -14
- package/dist/SipConnector-CJN8qKAC.js +0 -1316
- package/dist/SipConnector-DO0YvSq6.cjs +0 -1
|
@@ -12,41 +12,39 @@ declare class UA implements IUA {
|
|
|
12
12
|
private static startError?;
|
|
13
13
|
private static countStartError;
|
|
14
14
|
private static countStarts;
|
|
15
|
-
static setStartError(startError: DisconnectEvent, { count }?: {
|
|
16
|
-
count?: number;
|
|
17
|
-
}): void;
|
|
18
|
-
static resetStartError(): void;
|
|
19
|
-
static setAvailableTelephony(): void;
|
|
20
|
-
static setNotAvailableTelephony(): void;
|
|
21
15
|
events: Events<readonly (keyof UAEventMap)[]>;
|
|
16
|
+
readonly registratorInner: Registrator;
|
|
17
|
+
call: jest.Mock<RTCSessionMock, [url: string, parameters: {
|
|
18
|
+
mediaStream: MediaStream;
|
|
19
|
+
eventHandlers: TEventHandlers;
|
|
20
|
+
}], any>;
|
|
21
|
+
sendOptions: jest.Mock<void, [target: string, body?: string | undefined, options?: Record<string, unknown> | undefined], any>;
|
|
22
|
+
/**
|
|
23
|
+
* start – имитирует запуск UA.
|
|
24
|
+
*/
|
|
25
|
+
start: jest.Mock<void, [], any>;
|
|
26
|
+
/**
|
|
27
|
+
* stop – имитирует остановку UA.
|
|
28
|
+
*/
|
|
29
|
+
stop: jest.Mock<void, [], any>;
|
|
30
|
+
removeAllListeners: jest.Mock<this, [], any>;
|
|
31
|
+
once: jest.Mock<this, [eventName: string, handler: () => void], any>;
|
|
22
32
|
private startedTimeout?;
|
|
23
33
|
private stopedTimeout?;
|
|
24
34
|
private session?;
|
|
25
35
|
private isRegisteredInner?;
|
|
26
36
|
private isConnectedInner?;
|
|
27
37
|
private configuration;
|
|
28
|
-
readonly registratorInner: Registrator;
|
|
29
38
|
constructor(_configuration: UAConfigurationParams);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
* stop
|
|
38
|
-
*
|
|
39
|
-
* @returns {undefined}
|
|
40
|
-
*/
|
|
41
|
-
stop(): void;
|
|
42
|
-
call: jest.Mock<RTCSessionMock, [url: string, parameters: {
|
|
43
|
-
mediaStream: MediaStream;
|
|
44
|
-
eventHandlers: TEventHandlers;
|
|
45
|
-
}], any>;
|
|
39
|
+
static setStartError(startError: DisconnectEvent, { count }?: {
|
|
40
|
+
count?: number;
|
|
41
|
+
}): void;
|
|
42
|
+
static resetStartError(): void;
|
|
43
|
+
static setAvailableTelephony(): void;
|
|
44
|
+
static setNotAvailableTelephony(): void;
|
|
45
|
+
static reset(): void;
|
|
46
46
|
on<T extends keyof UAEventMap>(eventName: T, handler: UAEventMap[T]): this;
|
|
47
|
-
once<T extends keyof UAEventMap>(eventName: T, handler: UAEventMap[T]): this;
|
|
48
47
|
off<T extends keyof UAEventMap>(eventName: T, handler: UAEventMap[T]): this;
|
|
49
|
-
removeAllListeners(): this;
|
|
50
48
|
trigger<T extends keyof UAEventMap>(eventName: T, data: Parameters<UAEventMap[T]>[0]): void;
|
|
51
49
|
/**
|
|
52
50
|
* terminateSessions
|
|
@@ -40,7 +40,7 @@ export declare const uaConfigurationWithAuthorization: {
|
|
|
40
40
|
session_timers: boolean;
|
|
41
41
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
42
42
|
user_agent: string;
|
|
43
|
-
|
|
43
|
+
sdpSemantics: string;
|
|
44
44
|
register_expires: number;
|
|
45
45
|
connection_recovery_max_interval: number;
|
|
46
46
|
connection_recovery_min_interval: number;
|
|
@@ -53,7 +53,7 @@ export declare const uaConfigurationWithAuthorizationWithDisplayName: {
|
|
|
53
53
|
session_timers: boolean;
|
|
54
54
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
55
55
|
user_agent: string;
|
|
56
|
-
|
|
56
|
+
sdpSemantics: string;
|
|
57
57
|
register_expires: number;
|
|
58
58
|
connection_recovery_max_interval: number;
|
|
59
59
|
connection_recovery_min_interval: number;
|
|
@@ -64,7 +64,7 @@ export declare const uaConfigurationWithoutAuthorization: {
|
|
|
64
64
|
session_timers: boolean;
|
|
65
65
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
66
66
|
user_agent: string;
|
|
67
|
-
|
|
67
|
+
sdpSemantics: string;
|
|
68
68
|
register_expires: number;
|
|
69
69
|
connection_recovery_max_interval: number;
|
|
70
70
|
connection_recovery_min_interval: number;
|
|
@@ -75,7 +75,7 @@ export declare const uaConfigurationWithoutAuthorizationWithoutDisplayName: {
|
|
|
75
75
|
session_timers: boolean;
|
|
76
76
|
sockets: import('./WebSocketInterface.mock').default[];
|
|
77
77
|
user_agent: string;
|
|
78
|
-
|
|
78
|
+
sdpSemantics: string;
|
|
79
79
|
register_expires: number;
|
|
80
80
|
connection_recovery_max_interval: number;
|
|
81
81
|
connection_recovery_min_interval: number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RTCSession, UA } from '@krivega/jssip';
|
|
2
|
-
import { default as
|
|
2
|
+
import { default as UAMock } from './UA.mock';
|
|
3
3
|
import { default as WebSocketInterfaceMock } from './WebSocketInterface.mock';
|
|
4
4
|
declare const jssip: {
|
|
5
5
|
triggerNewInfo: (rtcSession: RTCSession, extraHeaders: [string, string][]) => void;
|
|
6
6
|
triggerNewSipEvent: (ua: UA, extraHeaders: [string, string][]) => void;
|
|
7
|
-
triggerIncomingSession: (ua:
|
|
7
|
+
triggerIncomingSession: (ua: UAMock, { incomingNumber, displayName, host, }: {
|
|
8
8
|
incomingNumber?: string;
|
|
9
9
|
displayName: string;
|
|
10
10
|
host: string;
|
|
@@ -13,7 +13,7 @@ declare const jssip: {
|
|
|
13
13
|
originator: "local" | "remote";
|
|
14
14
|
}) => void;
|
|
15
15
|
WebSocketInterface: typeof WebSocketInterfaceMock;
|
|
16
|
-
UA: typeof
|
|
16
|
+
UA: typeof UAMock;
|
|
17
17
|
C: {
|
|
18
18
|
INVITE: string;
|
|
19
19
|
};
|
package/dist/src/doMock.d.ts
CHANGED
|
@@ -3,3 +3,4 @@ export { FAILED_CONFERENCE_NUMBER } from './__fixtures__/RTCSessionMock';
|
|
|
3
3
|
export { NAME_INCORRECT, PASSWORD_CORRECT, PASSWORD_CORRECT_2 } from './__fixtures__/UA.mock';
|
|
4
4
|
export * from './__fixtures__/index';
|
|
5
5
|
export declare const doMockSipConnector: () => SipConnector;
|
|
6
|
+
export { default as JsSIP } from './__fixtures__/jssip.mock';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -7,5 +7,7 @@ export * as tools from './tools';
|
|
|
7
7
|
export * from './types';
|
|
8
8
|
export { default as getCodecFromSender } from './utils/getCodecFromSender';
|
|
9
9
|
export { default as resolveVideoSendingBalancer } from './videoSendingBalancer';
|
|
10
|
-
export { hasCanceledCallError
|
|
10
|
+
export { hasCanceledCallError } from './CallManager';
|
|
11
|
+
export { hasCanceledStartPresentationError } from './PresentationManager';
|
|
12
|
+
export { default as SipConnector } from './SipConnector';
|
|
11
13
|
export { SipConnectorFacade } from './SipConnectorFacade';
|
|
@@ -95,7 +95,7 @@ export declare const uaConfigurationWithAuthorization: {
|
|
|
95
95
|
session_timers: boolean;
|
|
96
96
|
sockets: import('../../__fixtures__/WebSocketInterface.mock').default[];
|
|
97
97
|
user_agent: string;
|
|
98
|
-
|
|
98
|
+
sdpSemantics: string;
|
|
99
99
|
register_expires: number;
|
|
100
100
|
connection_recovery_max_interval: number;
|
|
101
101
|
connection_recovery_min_interval: number;
|
|
@@ -108,7 +108,7 @@ export declare const uaConfigurationWithAuthorizationPasswordChanged: {
|
|
|
108
108
|
session_timers: boolean;
|
|
109
109
|
sockets: import('../../__fixtures__/WebSocketInterface.mock').default[];
|
|
110
110
|
user_agent: string;
|
|
111
|
-
|
|
111
|
+
sdpSemantics: string;
|
|
112
112
|
register_expires: number;
|
|
113
113
|
connection_recovery_max_interval: number;
|
|
114
114
|
connection_recovery_min_interval: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as error from './error';
|
|
2
2
|
export { default as getExtraHeaders } from './getExtraHeaders';
|
|
3
3
|
export { default as getUserAgent } from './getUserAgent';
|
|
4
|
-
export {
|
|
5
|
-
export { default as
|
|
4
|
+
export { default as hasPurgatory, PURGATORY_CONFERENCE_NUMBER } from './hasPurgatory';
|
|
5
|
+
export { default as sendDtmfAccumulated } from './sendDtmfFAccumulated';
|
|
6
6
|
export { default as createSyncMediaState } from './syncMediaState';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
type TSendKey = (values: string) => Promise<void>;
|
|
2
|
-
declare const
|
|
2
|
+
declare const sendDtmfAccumulated: ({ accumulatedKeys, sendKey, canRunTask, }: {
|
|
3
3
|
accumulatedKeys: string;
|
|
4
4
|
sendKey: TSendKey;
|
|
5
5
|
canRunTask?: () => boolean;
|
|
6
6
|
}) => Promise<{
|
|
7
7
|
isSuccessful: boolean;
|
|
8
8
|
}>;
|
|
9
|
-
export default
|
|
9
|
+
export default sendDtmfAccumulated;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sip-connector",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.1.0-alpha.0",
|
|
4
4
|
"description": "Module for connect to Vinteo server",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webrtc",
|
|
@@ -56,10 +56,11 @@
|
|
|
56
56
|
"release": "standard-version && npm run release:publish",
|
|
57
57
|
"release:major": "standard-version --release-as major && npm run release:publish",
|
|
58
58
|
"release:pre": "standard-version --prerelease && npm run release:publish",
|
|
59
|
+
"release:alpha": "standard-version --prerelease alpha && npm run release:publish",
|
|
59
60
|
"release:publish": "git push --follow-tags origin master && npm publish --access=public",
|
|
60
61
|
"test": "jest",
|
|
61
62
|
"test:ci": "cross-env CI=true jest",
|
|
62
|
-
"test:coverage": "yarn test:ci --
|
|
63
|
+
"test:coverage": "yarn test:ci --no-cache --coverage",
|
|
63
64
|
"test:watch": "jest --watch"
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
@@ -67,11 +68,12 @@
|
|
|
67
68
|
"@krivega/jssip": "^5.1.2",
|
|
68
69
|
"debug": "^4.4.1",
|
|
69
70
|
"events-constructor": "^1.3.0",
|
|
70
|
-
"repeated-calls": "^2.3.
|
|
71
|
+
"repeated-calls": "^2.3.4",
|
|
71
72
|
"sequent-promises": "^2.0.1",
|
|
72
73
|
"stack-promises": "^2.0.3",
|
|
73
74
|
"ts-debounce": "^4.0.0",
|
|
74
|
-
"webrtc-mock": "^1.1.7"
|
|
75
|
+
"webrtc-mock": "^1.1.7",
|
|
76
|
+
"xstate": "^5.20.1"
|
|
75
77
|
},
|
|
76
78
|
"devDependencies": {
|
|
77
79
|
"@babel/preset-typescript": "^7.27.1",
|
|
@@ -79,23 +81,23 @@
|
|
|
79
81
|
"@commitlint/config-conventional": "^19.8.1",
|
|
80
82
|
"@eslint/compat": "^1.3.1",
|
|
81
83
|
"@nabla/vite-plugin-eslint": "^2.0.5",
|
|
82
|
-
"@stylistic/eslint-plugin": "^5.
|
|
84
|
+
"@stylistic/eslint-plugin": "^5.2.2",
|
|
83
85
|
"@types/debug": "^4.1.12",
|
|
84
86
|
"@types/dom-mediacapture-transform": "^0.1.11",
|
|
85
87
|
"@types/jest": "^30.0.0",
|
|
86
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
87
|
-
"@typescript-eslint/parser": "^8.
|
|
88
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
89
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
88
90
|
"cross-env": "^7.0.3",
|
|
89
91
|
"eslint": "^9.31.0",
|
|
90
92
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
91
93
|
"eslint-plugin-flowtype": "^8.0.3",
|
|
92
94
|
"eslint-plugin-import": "^2.32.0",
|
|
93
95
|
"eslint-plugin-jest": "^29.0.1",
|
|
94
|
-
"eslint-plugin-prettier": "^5.5.
|
|
95
|
-
"eslint-plugin-unicorn": "^
|
|
96
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
97
|
+
"eslint-plugin-unicorn": "^60.0.0",
|
|
96
98
|
"husky": "^9.1.7",
|
|
97
|
-
"jest": "^30.0.
|
|
98
|
-
"jest-environment-jsdom": "^30.0.
|
|
99
|
+
"jest": "^30.0.5",
|
|
100
|
+
"jest-environment-jsdom": "^30.0.5",
|
|
99
101
|
"jest-extended": "^6.0.0",
|
|
100
102
|
"jest-junit": "^16.0.0",
|
|
101
103
|
"lint-staged": "^16.1.2",
|
|
@@ -105,7 +107,7 @@
|
|
|
105
107
|
"ts-node": "^10.9.2",
|
|
106
108
|
"tsc-files": "^1.1.4",
|
|
107
109
|
"typescript": "^5.8.3",
|
|
108
|
-
"vite": "^7.0.
|
|
110
|
+
"vite": "^7.0.5",
|
|
109
111
|
"vite-plugin-dts": "^4.5.4",
|
|
110
112
|
"vite-tsconfig-paths": "^5.1.4"
|
|
111
113
|
},
|
|
@@ -114,11 +116,12 @@
|
|
|
114
116
|
"@krivega/jssip": "^5.1.2",
|
|
115
117
|
"debug": "^4.4.1",
|
|
116
118
|
"events-constructor": "^1.3.0",
|
|
117
|
-
"repeated-calls": "^2.
|
|
119
|
+
"repeated-calls": "^2.3.3",
|
|
118
120
|
"sequent-promises": "^2.0.1",
|
|
119
121
|
"stack-promises": "^2.0.3",
|
|
120
122
|
"ts-debounce": "^4.0.0",
|
|
121
|
-
"webrtc-mock": "^1.1.7"
|
|
123
|
+
"webrtc-mock": "^1.1.7",
|
|
124
|
+
"xstate": "^5.20.1"
|
|
122
125
|
},
|
|
123
126
|
"packageManager": "yarn@1.22.22",
|
|
124
127
|
"main:src": "src/index.ts"
|