react-sip-kit 0.2.0 → 0.2.2
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/README.md +0 -2
- package/dist/constructors/audioBlobs.d.ts +1 -1
- package/dist/constructors/index.d.ts +0 -1
- package/dist/constructors/line.d.ts +7 -9
- package/dist/hooks/useSessionMethods/index.d.ts +2 -2
- package/dist/index.cjs +7 -19613
- package/dist/index.d.ts +17 -52
- package/dist/index.mjs +7 -19608
- package/dist/store/types.d.ts +15 -50
- package/package.json +11 -11
- package/dist/constructors/buddy.d.ts +0 -26
package/dist/store/types.d.ts
CHANGED
|
@@ -7,13 +7,7 @@ import { IncomingInviteRequest } from 'sip.js/lib/core';
|
|
|
7
7
|
export interface SipStoreStateType {
|
|
8
8
|
configs: SipConfigs;
|
|
9
9
|
userAgent?: SipUserAgent;
|
|
10
|
-
buddies: Array<BuddyType>;
|
|
11
|
-
selectedBuddy: Array<any>;
|
|
12
|
-
selectedLine: Array<any>;
|
|
13
10
|
lines: Array<LineType>;
|
|
14
|
-
newLineNumber: number;
|
|
15
|
-
SipUsername: string;
|
|
16
|
-
SipDomain: string;
|
|
17
11
|
audioBlobs: AudioBlobs['audioBlobs'];
|
|
18
12
|
devicesInfo: DevicesInfoType;
|
|
19
13
|
setSipStore: (state: Partial<SipStoreStateType>) => void;
|
|
@@ -21,13 +15,10 @@ export interface SipStoreStateType {
|
|
|
21
15
|
addLine: (line: LineType) => void;
|
|
22
16
|
updateLine: (line: LineType) => void;
|
|
23
17
|
removeLine: (lineNum: LineType['lineNumber']) => void;
|
|
24
|
-
addBuddy: (buddy: BuddyType) => void;
|
|
25
|
-
findBuddyByDid: (did: string) => BuddyType | null;
|
|
26
|
-
findBuddyByIdentity: (indentity: BuddyType['identity']) => BuddyType | null;
|
|
27
18
|
findLineByNumber: (lineNum: LineType['lineNumber']) => LineType | null;
|
|
28
|
-
getSession: (did: string) => SipSessionType | null;
|
|
29
19
|
getSessions: () => SipUserAgent['sessions'] | null;
|
|
30
|
-
|
|
20
|
+
getNewLineNumber: () => number;
|
|
21
|
+
countIdSessions: (id: string) => number;
|
|
31
22
|
}
|
|
32
23
|
export interface SipInvitationType extends Omit<Invitation, 'incomingInviteRequest' | 'sessionDescriptionHandler'> {
|
|
33
24
|
data: Partial<SipSessionDataType>;
|
|
@@ -49,28 +40,26 @@ export interface SipSessionDescriptionHandler extends SessionDescriptionHandler
|
|
|
49
40
|
peerConnection: RTCPeerConnection;
|
|
50
41
|
peerConnectionDelegate: any;
|
|
51
42
|
}
|
|
52
|
-
export interface LineType {
|
|
43
|
+
export interface LineType<T extends object = object> {
|
|
53
44
|
lineNumber: number;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
IsSelected: boolean;
|
|
57
|
-
BuddyObj: BuddyType | null;
|
|
45
|
+
displayNumber: string;
|
|
46
|
+
metaData: Partial<T>;
|
|
58
47
|
sipSession: SipInvitationType | SipInviterType | null;
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
localSoundMeter: any;
|
|
49
|
+
remoteSoundMeter: any;
|
|
61
50
|
}
|
|
62
51
|
export interface SipSessionType extends Session {
|
|
63
52
|
data: SipSessionDataType;
|
|
64
53
|
}
|
|
65
54
|
export interface SipSessionDataType {
|
|
66
55
|
line: number;
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
callDirection: 'inbound' | 'outbound';
|
|
57
|
+
terminateBy: string;
|
|
69
58
|
src: string;
|
|
70
|
-
|
|
59
|
+
metaData: LineType['metaData'];
|
|
71
60
|
callstart: string;
|
|
72
61
|
earlyReject: boolean;
|
|
73
|
-
|
|
62
|
+
withVideo: boolean;
|
|
74
63
|
reasonCode: number;
|
|
75
64
|
reasonText: string;
|
|
76
65
|
teardownComplete: boolean;
|
|
@@ -88,15 +77,15 @@ export interface SipSessionDataType {
|
|
|
88
77
|
}>;
|
|
89
78
|
isMute: boolean;
|
|
90
79
|
videoChannelNames: Array<Record<'mid' | 'channel', string>>;
|
|
91
|
-
|
|
80
|
+
dialledNumber: string;
|
|
92
81
|
transfer: Array<SipSessionTransferType>;
|
|
93
|
-
|
|
82
|
+
audioSourceTrack: any;
|
|
94
83
|
earlyMedia: any;
|
|
95
84
|
ringerObj: {
|
|
96
85
|
[key: string]: any;
|
|
97
86
|
} | null;
|
|
98
|
-
|
|
99
|
-
|
|
87
|
+
confBridgeChannels: Array<any>;
|
|
88
|
+
confBridgeEvents: Array<any>;
|
|
100
89
|
videoSourceDevice: string | null;
|
|
101
90
|
audioSourceDevice: string | null;
|
|
102
91
|
audioOutputDevice: string | null;
|
|
@@ -114,30 +103,6 @@ export interface SipSessionTransferType {
|
|
|
114
103
|
};
|
|
115
104
|
onCancle?: Function;
|
|
116
105
|
}
|
|
117
|
-
export interface BuddyType {
|
|
118
|
-
type: 'extension' | 'xmpp' | 'contact' | 'group';
|
|
119
|
-
identity: string;
|
|
120
|
-
CallerIDName: string;
|
|
121
|
-
ExtNo: string;
|
|
122
|
-
MobileNumber?: string;
|
|
123
|
-
ContactNumber1?: string;
|
|
124
|
-
ContactNumber2?: string;
|
|
125
|
-
lastActivity: string;
|
|
126
|
-
Desc: string;
|
|
127
|
-
Email: string;
|
|
128
|
-
jid?: string;
|
|
129
|
-
devState: string;
|
|
130
|
-
presence: string;
|
|
131
|
-
missed: number;
|
|
132
|
-
IsSelected: boolean;
|
|
133
|
-
imageObjectURL: string;
|
|
134
|
-
presenceText: string;
|
|
135
|
-
EnableDuringDnd: boolean;
|
|
136
|
-
EnableSubscribe: boolean;
|
|
137
|
-
SubscribeUser: string;
|
|
138
|
-
AllowAutoDelete: boolean;
|
|
139
|
-
Pinned: boolean;
|
|
140
|
-
}
|
|
141
106
|
interface DevicesInfoType {
|
|
142
107
|
hasVideoDevice: boolean;
|
|
143
108
|
hasAudioDevice: boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-sip-kit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Shervin Ghajar",
|
|
@@ -58,13 +58,14 @@
|
|
|
58
58
|
"clone": "^2.1.2",
|
|
59
59
|
"dayjs": "^1.11.13",
|
|
60
60
|
"sip.js": "0.21.2",
|
|
61
|
-
"uuid": "^11.0.3",
|
|
62
61
|
"zustand": "^5.0.1"
|
|
63
62
|
},
|
|
64
63
|
"devDependencies": {
|
|
65
|
-
"react-dom": "18.3.1",
|
|
66
64
|
"@eslint/js": "9.13.0",
|
|
67
|
-
"
|
|
65
|
+
"@rollup/plugin-commonjs": "^28.0.3",
|
|
66
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
67
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
68
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
68
69
|
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
|
69
70
|
"@types/clone": "^2.1.4",
|
|
70
71
|
"@types/react": "18.3.12",
|
|
@@ -78,14 +79,13 @@
|
|
|
78
79
|
"eslint-plugin-react-refresh": "0.4.14",
|
|
79
80
|
"globals": "15.11.0",
|
|
80
81
|
"prettier": "^3.3.3",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"@rollup/plugin-commonjs": "^28.0.3",
|
|
84
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
85
|
-
"@rollup/plugin-typescript": "^12.1.2",
|
|
82
|
+
"prettier-plugin-organize-imports": "^4.1.0",
|
|
83
|
+
"react-dom": "18.3.1",
|
|
86
84
|
"rollup": "^4.41.1",
|
|
87
85
|
"rollup-plugin-delete": "^3.0.1",
|
|
88
|
-
"rollup-plugin-dts": "^6.2.1"
|
|
86
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
87
|
+
"typescript": "~5.6.2",
|
|
88
|
+
"typescript-eslint": "8.11.0"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"react": ">=17.0.0"
|
|
@@ -95,4 +95,4 @@
|
|
|
95
95
|
"README.md",
|
|
96
96
|
"LICENSE"
|
|
97
97
|
]
|
|
98
|
-
}
|
|
98
|
+
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { BuddyType } from '../store/types';
|
|
2
|
-
export declare class Buddy implements BuddyType {
|
|
3
|
-
type: 'extension' | 'xmpp' | 'contact' | 'group';
|
|
4
|
-
identity: string;
|
|
5
|
-
CallerIDName: string;
|
|
6
|
-
ExtNo: string;
|
|
7
|
-
MobileNumber?: string;
|
|
8
|
-
ContactNumber1?: string;
|
|
9
|
-
ContactNumber2?: string;
|
|
10
|
-
lastActivity: string;
|
|
11
|
-
Desc: string;
|
|
12
|
-
Email: string;
|
|
13
|
-
jid?: string;
|
|
14
|
-
devState: string;
|
|
15
|
-
presence: string;
|
|
16
|
-
missed: number;
|
|
17
|
-
IsSelected: boolean;
|
|
18
|
-
imageObjectURL: string;
|
|
19
|
-
presenceText: string;
|
|
20
|
-
EnableDuringDnd: boolean;
|
|
21
|
-
EnableSubscribe: boolean;
|
|
22
|
-
SubscribeUser: string;
|
|
23
|
-
AllowAutoDelete: boolean;
|
|
24
|
-
Pinned: boolean;
|
|
25
|
-
constructor(type: 'extension' | 'xmpp' | 'contact' | 'group', identity: string, CallerIDName: string | undefined, ExtNo: string, MobileNumber?: string, ContactNumber1?: string, ContactNumber2?: string, lastActivity?: string, Desc?: string, Email?: string, jid?: string, EnableDuringDnd?: boolean, EnableSubscribe?: boolean, subscription?: string | null, AllowAutoDelete?: boolean, Pinned?: boolean);
|
|
26
|
-
}
|