@voicenter-team/events-sdk 0.0.30 → 0.0.31
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/voicenter-events-sdk.d.ts +594 -15
- package/package.json +1 -1
|
@@ -1,24 +1,72 @@
|
|
|
1
|
-
import { AllDialersStatusEvent } from '@voicenter-team/real-time-events-types';
|
|
2
|
-
import { AllExtensionStatusEvent } from '@voicenter-team/real-time-events-types';
|
|
3
|
-
import { AllUsersStatusEvent } from '@voicenter-team/real-time-events-types';
|
|
4
1
|
import { DebouncedFuncLeading } from 'lodash';
|
|
5
|
-
import { DialerEvent } from '@voicenter-team/real-time-events-types';
|
|
6
|
-
import { EventsEnum } from '@voicenter-team/real-time-events-types';
|
|
7
|
-
import { ExtensionEvent } from '@voicenter-team/real-time-events-types';
|
|
8
|
-
import { ExtensionsUpdated } from '@voicenter-team/real-time-events-types';
|
|
9
2
|
import { io } from 'socket.io-client';
|
|
10
|
-
import { KeepAliveResponseEvent } from '@voicenter-team/real-time-events-types';
|
|
11
3
|
import { LoggerOptions } from '@voicenter-team/socketio-storage-logger/dist/storage-logger';
|
|
12
|
-
import { LoginStatusEvent } from '@voicenter-team/real-time-events-types';
|
|
13
|
-
import { LoginSuccessEvent } from '@voicenter-team/real-time-events-types';
|
|
14
|
-
import { OnlineStatusEvent } from '@voicenter-team/real-time-events-types';
|
|
15
|
-
import { QueueEvent } from '@voicenter-team/real-time-events-types';
|
|
16
4
|
import { Socket as Socket_2 } from 'socket.io-client';
|
|
17
5
|
|
|
18
6
|
export declare type ActiveRoomListener = (event: number | undefined) => void
|
|
19
7
|
|
|
20
8
|
export declare type addRoomListener = (value: string) => void
|
|
21
9
|
|
|
10
|
+
export declare type AllDialersStatusEvent = {
|
|
11
|
+
dialers: Array<Dialer>;
|
|
12
|
+
/**
|
|
13
|
+
* 0 - Connection was establishing successfully.
|
|
14
|
+
*/
|
|
15
|
+
errorCode?: number;
|
|
16
|
+
/**
|
|
17
|
+
* “Ok” - Connection was establishing successfully.
|
|
18
|
+
*/
|
|
19
|
+
errorDesc?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Server time at the moment of the event
|
|
22
|
+
*/
|
|
23
|
+
serverTime: number;
|
|
24
|
+
/**
|
|
25
|
+
* Difference in time between server and client
|
|
26
|
+
*/
|
|
27
|
+
serverTimeOffset: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export declare type AllExtensionStatusEvent = {
|
|
31
|
+
/**
|
|
32
|
+
* 0 - Connection was establishing successfully.
|
|
33
|
+
*/
|
|
34
|
+
errorCode?: number;
|
|
35
|
+
/**
|
|
36
|
+
* “Ok” - Connection was establishing successfully.
|
|
37
|
+
*/
|
|
38
|
+
errorDesc?: string;
|
|
39
|
+
extensions: Array<Extension>;
|
|
40
|
+
/**
|
|
41
|
+
* Server time at the moment of the event
|
|
42
|
+
*/
|
|
43
|
+
serverTime: number;
|
|
44
|
+
/**
|
|
45
|
+
* Difference in time between server and client
|
|
46
|
+
*/
|
|
47
|
+
serverTimeOffset: number;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export declare type AllUsersStatusEvent = {
|
|
51
|
+
users: Array<User>;
|
|
52
|
+
/**
|
|
53
|
+
* 0 - Connection was establishing successfully.
|
|
54
|
+
*/
|
|
55
|
+
errorCode?: number;
|
|
56
|
+
/**
|
|
57
|
+
* “Ok” - Connection was establishing successfully.
|
|
58
|
+
*/
|
|
59
|
+
errorDesc?: string;
|
|
60
|
+
/**
|
|
61
|
+
* Server time at the moment of the event
|
|
62
|
+
*/
|
|
63
|
+
serverTime: number;
|
|
64
|
+
/**
|
|
65
|
+
* Difference in time between server and client
|
|
66
|
+
*/
|
|
67
|
+
serverTimeOffset: number;
|
|
68
|
+
};
|
|
69
|
+
|
|
22
70
|
declare class AuthClass {
|
|
23
71
|
private readonly eventsSdkClass;
|
|
24
72
|
constructor(eventsSdkClass: EventsSdkClass);
|
|
@@ -39,6 +87,18 @@ declare class AuthClass {
|
|
|
39
87
|
|
|
40
88
|
export declare type CallAddingProgressListener = (callId: string | undefined) => void
|
|
41
89
|
|
|
90
|
+
export declare enum CallStatusEnum {
|
|
91
|
+
RINGING = 'Ringing',
|
|
92
|
+
TALKING = 'Talking',
|
|
93
|
+
DIALING = 'Dialing',
|
|
94
|
+
HOLD = 'Hold',
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export declare enum CallTypeEnum {
|
|
98
|
+
INCOMING = 'Incoming',
|
|
99
|
+
OUTGOING = 'Outgoing',
|
|
100
|
+
}
|
|
101
|
+
|
|
42
102
|
export declare type changeActiveCallsListener = (event: { [key: string]: string }) => void
|
|
43
103
|
|
|
44
104
|
export declare type changeActiveInputMediaDeviceListener = (event: string) => void
|
|
@@ -53,6 +113,99 @@ export declare type changeIsMutedListener = (value: boolean) => void
|
|
|
53
113
|
|
|
54
114
|
export declare type changeMuteWhenJoinListener = (value: boolean) => void
|
|
55
115
|
|
|
116
|
+
export declare type CustomData = {
|
|
117
|
+
/**
|
|
118
|
+
* Is do not call me
|
|
119
|
+
*/
|
|
120
|
+
IsDoNotCallMe?: string;
|
|
121
|
+
/**
|
|
122
|
+
* Do not call me status
|
|
123
|
+
*/
|
|
124
|
+
DoNotCallMeStatus?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Do not call me token name
|
|
127
|
+
*/
|
|
128
|
+
DoNotCallMeTokenName?: string;
|
|
129
|
+
DoNotCallMeStatusCode?: DoNotCallMeStatusCodeEnum;
|
|
130
|
+
/**
|
|
131
|
+
* Do not call me transaction id
|
|
132
|
+
*/
|
|
133
|
+
DoNotCallMetransactionId?: string;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
export declare type Dialer = {
|
|
137
|
+
/**
|
|
138
|
+
* Code
|
|
139
|
+
*/
|
|
140
|
+
code: string;
|
|
141
|
+
/**
|
|
142
|
+
* Name
|
|
143
|
+
*/
|
|
144
|
+
name: string;
|
|
145
|
+
type: DialerTypeEnum;
|
|
146
|
+
/**
|
|
147
|
+
* Calls
|
|
148
|
+
*/
|
|
149
|
+
calls: string;
|
|
150
|
+
/**
|
|
151
|
+
* Type id
|
|
152
|
+
*/
|
|
153
|
+
typeID: number;
|
|
154
|
+
/**
|
|
155
|
+
* Campaign id
|
|
156
|
+
*/
|
|
157
|
+
campaignID: number;
|
|
158
|
+
/**
|
|
159
|
+
* Statistics
|
|
160
|
+
*/
|
|
161
|
+
statistics: string;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export declare type DialerEvent = {
|
|
165
|
+
data: Dialer;
|
|
166
|
+
/**
|
|
167
|
+
* callerID
|
|
168
|
+
*/
|
|
169
|
+
callerID?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Event name (dialer)
|
|
172
|
+
*/
|
|
173
|
+
eventName: string;
|
|
174
|
+
/**
|
|
175
|
+
* dialStatus
|
|
176
|
+
*/
|
|
177
|
+
dialStatus?: string;
|
|
178
|
+
/**
|
|
179
|
+
* ivrUniqueId
|
|
180
|
+
*/
|
|
181
|
+
ivrUniqueId?: string;
|
|
182
|
+
/**
|
|
183
|
+
* TelephonyServerTime
|
|
184
|
+
*/
|
|
185
|
+
telephonyServerTime?: number;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export declare enum DialerTypeEnum {
|
|
189
|
+
AUTOMATIC = 'Automatic',
|
|
190
|
+
IVR = 'IVR',
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare enum DirectionEnum {
|
|
194
|
+
INCOMINC = 'Incoming',
|
|
195
|
+
OUTGOING = 'Outgoing',
|
|
196
|
+
SPY = 'Spy',
|
|
197
|
+
CLICK2CALL = 'Click2call',
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export declare enum DoNotCallMeStatusCodeEnum {
|
|
201
|
+
RESPONSE_FROM_API_VALID = 'RESPONSE_FROM_API_VALID',
|
|
202
|
+
RESPONSE_FROM_API_INVALID = 'RESPONSE_FROM_API_INVALID',
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare type Error_2 = {
|
|
206
|
+
};
|
|
207
|
+
export { Error_2 as Error }
|
|
208
|
+
|
|
56
209
|
/**
|
|
57
210
|
* This type defines a map where each key is an event name, and the value is an array of callback functions associated with that event.
|
|
58
211
|
* This structure is used to manage event listeners for different events
|
|
@@ -99,6 +252,24 @@ declare class EventEmitterClass {
|
|
|
99
252
|
emit<T extends EventTypeNames>(event: T, data: EventTypeData<T>): void;
|
|
100
253
|
}
|
|
101
254
|
|
|
255
|
+
export declare enum EventsEnum {
|
|
256
|
+
ALL_DIALER_STATUS = 'AllDialersStatus',
|
|
257
|
+
ALL_EXTENSION_STATUS = 'AllExtensionsStatus',
|
|
258
|
+
ALL_USERS_STATUS = 'AllUsersStatus',
|
|
259
|
+
CONNECT = 'connect',
|
|
260
|
+
DISCONNECT = 'disconnect',
|
|
261
|
+
CONNECT_ERROR_EVENT = 'connect_error',
|
|
262
|
+
EXTENSION_EVENT = 'ExtensionEvent',
|
|
263
|
+
KEEP_ALIVE = 'keepalive',
|
|
264
|
+
KEEP_ALIVE_RESPONSE = 'keepaliveResponse',
|
|
265
|
+
LOGIN_STATUS = 'loginStatus',
|
|
266
|
+
LOGIN_SUCCESS = 'loginSuccess',
|
|
267
|
+
QUEUE_EVENT = 'QueueEvent',
|
|
268
|
+
ONLINE_STATUS_EVENT = 'onlineStatusEvent',
|
|
269
|
+
DIALER_EVENT = 'DialerEvent',
|
|
270
|
+
EXTENSIONS_UPDATED = 'ExtensionsUpdated',
|
|
271
|
+
}
|
|
272
|
+
|
|
102
273
|
/**
|
|
103
274
|
* This is a generic type for callback functions used in event handling.
|
|
104
275
|
* It takes a generic event name and defines a callback function that receives wrapped socket event data for that specific event.
|
|
@@ -218,6 +389,216 @@ export declare type EventWrappedSocketDataMap = {
|
|
|
218
389
|
[K in EventTypeNames]: WrappedSocketEvent<K>
|
|
219
390
|
}
|
|
220
391
|
|
|
392
|
+
export declare type Extension = {
|
|
393
|
+
calls: Array<ExtensionCall>;
|
|
394
|
+
/**
|
|
395
|
+
* Number
|
|
396
|
+
*/
|
|
397
|
+
number: number;
|
|
398
|
+
/**
|
|
399
|
+
* User id
|
|
400
|
+
*/
|
|
401
|
+
userID: number;
|
|
402
|
+
summery: Summery;
|
|
403
|
+
/**
|
|
404
|
+
* User name
|
|
405
|
+
*/
|
|
406
|
+
userName: string;
|
|
407
|
+
/**
|
|
408
|
+
* Account id
|
|
409
|
+
*/
|
|
410
|
+
accountID: number;
|
|
411
|
+
/**
|
|
412
|
+
* Exten user
|
|
413
|
+
*/
|
|
414
|
+
extenUser: string;
|
|
415
|
+
/**
|
|
416
|
+
* Peer status
|
|
417
|
+
*/
|
|
418
|
+
peerStatus: string;
|
|
419
|
+
currentCall?: ExtensionCall;
|
|
420
|
+
/**
|
|
421
|
+
* Online user id
|
|
422
|
+
*/
|
|
423
|
+
onlineUserID: number;
|
|
424
|
+
/**
|
|
425
|
+
* Top account id
|
|
426
|
+
*/
|
|
427
|
+
topAccountID: number;
|
|
428
|
+
/**
|
|
429
|
+
* Representative
|
|
430
|
+
*/
|
|
431
|
+
representative: number;
|
|
432
|
+
/**
|
|
433
|
+
* Last call event epoch
|
|
434
|
+
*/
|
|
435
|
+
lastCallEventEpoch: number;
|
|
436
|
+
/**
|
|
437
|
+
* Last hangup call epoch
|
|
438
|
+
*/
|
|
439
|
+
lastHangupCallEpoch: number;
|
|
440
|
+
/**
|
|
441
|
+
* Representative status
|
|
442
|
+
*/
|
|
443
|
+
representativeStatus: number;
|
|
444
|
+
/**
|
|
445
|
+
* Representative updated
|
|
446
|
+
*/
|
|
447
|
+
representativeUpdated: number;
|
|
448
|
+
/**
|
|
449
|
+
* Last answered call event epoch
|
|
450
|
+
*/
|
|
451
|
+
lastAnsweredCallEventEpoch: number;
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
export declare type ExtensionCall = {
|
|
455
|
+
/**
|
|
456
|
+
* Ip
|
|
457
|
+
*/
|
|
458
|
+
ip: string;
|
|
459
|
+
/**
|
|
460
|
+
* Did
|
|
461
|
+
*/
|
|
462
|
+
did: string;
|
|
463
|
+
/**
|
|
464
|
+
* Ivr id
|
|
465
|
+
*/
|
|
466
|
+
ivrid: string;
|
|
467
|
+
/**
|
|
468
|
+
* Channel
|
|
469
|
+
*/
|
|
470
|
+
channel: string;
|
|
471
|
+
/**
|
|
472
|
+
* Is spyed
|
|
473
|
+
*/
|
|
474
|
+
isSpyed?: boolean;
|
|
475
|
+
/**
|
|
476
|
+
* Queue id
|
|
477
|
+
*/
|
|
478
|
+
queueID?: number;
|
|
479
|
+
/**
|
|
480
|
+
* Answered
|
|
481
|
+
*/
|
|
482
|
+
answered: number;
|
|
483
|
+
callType?: CallTypeEnum;
|
|
484
|
+
/**
|
|
485
|
+
* Channel 2
|
|
486
|
+
*/
|
|
487
|
+
'channel 2': string;
|
|
488
|
+
direction: DirectionEnum;
|
|
489
|
+
recording: Recording;
|
|
490
|
+
/**
|
|
491
|
+
* Caller name
|
|
492
|
+
*/
|
|
493
|
+
callername: string;
|
|
494
|
+
callstatus: CallStatusEnum;
|
|
495
|
+
customdata: CustomData;
|
|
496
|
+
/**
|
|
497
|
+
* Is internal
|
|
498
|
+
*/
|
|
499
|
+
isInternal: boolean;
|
|
500
|
+
/**
|
|
501
|
+
* Is opensips
|
|
502
|
+
*/
|
|
503
|
+
isOpensips: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* Blc server id
|
|
506
|
+
*/
|
|
507
|
+
blcServerID: number;
|
|
508
|
+
/**
|
|
509
|
+
* Blc server id
|
|
510
|
+
*/
|
|
511
|
+
blcServerId?: number;
|
|
512
|
+
/**
|
|
513
|
+
* Call started
|
|
514
|
+
*/
|
|
515
|
+
callStarted: number;
|
|
516
|
+
/**
|
|
517
|
+
* Caller phone
|
|
518
|
+
*/
|
|
519
|
+
callerphone: string;
|
|
520
|
+
/**
|
|
521
|
+
* Call answered
|
|
522
|
+
*/
|
|
523
|
+
callAnswered: number;
|
|
524
|
+
/**
|
|
525
|
+
* Original caller id
|
|
526
|
+
*/
|
|
527
|
+
originalCallerID?: string;
|
|
528
|
+
/**
|
|
529
|
+
* Actual dialed number
|
|
530
|
+
*/
|
|
531
|
+
actualDialedNumber?: number;
|
|
532
|
+
/**
|
|
533
|
+
* Original caller name
|
|
534
|
+
*/
|
|
535
|
+
originalCallerName?: string;
|
|
536
|
+
/**
|
|
537
|
+
* Outgoing caller name
|
|
538
|
+
*/
|
|
539
|
+
outgoingcallername?: string;
|
|
540
|
+
/**
|
|
541
|
+
* Outgoing caller phone
|
|
542
|
+
*/
|
|
543
|
+
outgoingcallerphone?: string;
|
|
544
|
+
/**
|
|
545
|
+
* Related ivr unique ids
|
|
546
|
+
*/
|
|
547
|
+
relatedIvrUniqueIDs?: Array<string>;
|
|
548
|
+
/**
|
|
549
|
+
* Call duration interval
|
|
550
|
+
*/
|
|
551
|
+
calldurationinterval: number;
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
export declare type ExtensionEvent = {
|
|
555
|
+
data: Extension;
|
|
556
|
+
cause?: ExtensionHangupCauseEnum;
|
|
557
|
+
reason: ExtensionEventReasonEnum;
|
|
558
|
+
/**
|
|
559
|
+
* Caller id
|
|
560
|
+
*/
|
|
561
|
+
callerID?: string;
|
|
562
|
+
/**
|
|
563
|
+
* Event name (extension)
|
|
564
|
+
*/
|
|
565
|
+
eventName: string;
|
|
566
|
+
/**
|
|
567
|
+
* Dial status
|
|
568
|
+
*/
|
|
569
|
+
dialStatus?: string;
|
|
570
|
+
/**
|
|
571
|
+
* Ivr unique id
|
|
572
|
+
*/
|
|
573
|
+
ivrUniqueId?: string;
|
|
574
|
+
/**
|
|
575
|
+
* Telephony server time
|
|
576
|
+
*/
|
|
577
|
+
telephonyServerTime?: number;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export declare enum ExtensionEventReasonEnum {
|
|
581
|
+
NEWCALL = 'NEWCALL',
|
|
582
|
+
ANSWER = 'ANSWER',
|
|
583
|
+
HOLD = 'HOLD',
|
|
584
|
+
UNHOLD = 'UNHOLD',
|
|
585
|
+
HANGUP = 'HANGUP',
|
|
586
|
+
USER_STATUS_UPDATE = 'userStatusUpdate',
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
export declare enum ExtensionHangupCauseEnum {
|
|
590
|
+
NORMAL_HANGUP = 'Normal hangup',
|
|
591
|
+
USER_BUSY = 'User busy',
|
|
592
|
+
CALL_REJECTED = 'Call Rejected',
|
|
593
|
+
UNALLOCATED_NUMBER = 'Unallocated (unassigned) number',
|
|
594
|
+
UNKNOWN = 'Unknown',
|
|
595
|
+
NO_USER_RESPONDING = 'No user responding',
|
|
596
|
+
USER_ALERTING = 'User alerting, no answer',
|
|
597
|
+
ANSWERED_ELSEWHERE = 'Answered elsewhere',
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export declare type ExtensionsUpdated = string;
|
|
601
|
+
|
|
221
602
|
export declare interface ExternalLoginNewStackResponseData {
|
|
222
603
|
AccessToken: string,
|
|
223
604
|
RefreshToken: string
|
|
@@ -246,6 +627,29 @@ export declare interface ExternalLoginResponse<T> {
|
|
|
246
627
|
*/
|
|
247
628
|
export declare type GenericEventWrapper = EventWrappedSocketDataMap[EventTypeNames]
|
|
248
629
|
|
|
630
|
+
export declare type KeepAliveResponseEvent = {
|
|
631
|
+
/**
|
|
632
|
+
* Is ok
|
|
633
|
+
*/
|
|
634
|
+
isOk: boolean;
|
|
635
|
+
/**
|
|
636
|
+
* 0 - Connection was establishing successfully.
|
|
637
|
+
*/
|
|
638
|
+
errorCode?: number;
|
|
639
|
+
/**
|
|
640
|
+
* “Ok” - Connection was establishing successfully.
|
|
641
|
+
*/
|
|
642
|
+
errorDesc?: string;
|
|
643
|
+
/**
|
|
644
|
+
* Server time at the moment of the event
|
|
645
|
+
*/
|
|
646
|
+
serverTime: number;
|
|
647
|
+
/**
|
|
648
|
+
* Difference in time between server and client
|
|
649
|
+
*/
|
|
650
|
+
serverTimeOffset: number;
|
|
651
|
+
};
|
|
652
|
+
|
|
249
653
|
export declare type ListenerCallbackFnType<T extends ListenersKeyType> = OpenSIPSEventMap[T]
|
|
250
654
|
|
|
251
655
|
export declare type ListenersCallbackFnType = OpenSIPSEventMap[ListenersKeyType]
|
|
@@ -294,11 +698,61 @@ export declare interface LoginSessionPayload {
|
|
|
294
698
|
password: string
|
|
295
699
|
}
|
|
296
700
|
|
|
701
|
+
export declare type LoginStatusEvent = {
|
|
702
|
+
queues: Array<Queue>;
|
|
703
|
+
/**
|
|
704
|
+
* 0 - Connection was establishing successfully.
|
|
705
|
+
*/
|
|
706
|
+
errorCode?: number;
|
|
707
|
+
/**
|
|
708
|
+
* “Ok” - Connection was establishing successfully.
|
|
709
|
+
*/
|
|
710
|
+
errorDesc?: string;
|
|
711
|
+
/**
|
|
712
|
+
* Server time at the moment of the event
|
|
713
|
+
*/
|
|
714
|
+
serverTime: number;
|
|
715
|
+
/**
|
|
716
|
+
* Difference in time between server and client
|
|
717
|
+
*/
|
|
718
|
+
serverTimeOffset: number;
|
|
719
|
+
};
|
|
720
|
+
|
|
721
|
+
export declare type LoginSuccessEvent = {
|
|
722
|
+
/**
|
|
723
|
+
* 0 - Connection was establishing successfully.
|
|
724
|
+
*/
|
|
725
|
+
errorCode?: number;
|
|
726
|
+
/**
|
|
727
|
+
* “Ok” - Connection was establishing successfully.
|
|
728
|
+
*/
|
|
729
|
+
errorDesc?: string;
|
|
730
|
+
/**
|
|
731
|
+
* Server time at the moment of the event
|
|
732
|
+
*/
|
|
733
|
+
serverTime: number;
|
|
734
|
+
/**
|
|
735
|
+
* Difference in time between server and client
|
|
736
|
+
*/
|
|
737
|
+
serverTimeOffset: number;
|
|
738
|
+
};
|
|
739
|
+
|
|
297
740
|
declare enum LoginType {
|
|
298
741
|
USER = "User",
|
|
299
742
|
TOKEN = "Token"
|
|
300
743
|
}
|
|
301
744
|
|
|
745
|
+
export declare type OnlineStatusEvent = {
|
|
746
|
+
/**
|
|
747
|
+
* attemptToConnect
|
|
748
|
+
*/
|
|
749
|
+
attemptToConnect?: string;
|
|
750
|
+
/**
|
|
751
|
+
* Is client side connected to socket server
|
|
752
|
+
*/
|
|
753
|
+
isSocketConnected: boolean;
|
|
754
|
+
};
|
|
755
|
+
|
|
302
756
|
export declare interface OpenSIPSEventMap {
|
|
303
757
|
ready: readyListener
|
|
304
758
|
changeActiveCalls: changeActiveCallsListener
|
|
@@ -317,6 +771,89 @@ export declare interface OpenSIPSEventMap {
|
|
|
317
771
|
changeCallStatus: changeCallStatusListener
|
|
318
772
|
}
|
|
319
773
|
|
|
774
|
+
export declare type Queue = {
|
|
775
|
+
Calls: Array<QueueCall>;
|
|
776
|
+
/**
|
|
777
|
+
* User id
|
|
778
|
+
*/
|
|
779
|
+
UserId?: number;
|
|
780
|
+
/**
|
|
781
|
+
* Queue id
|
|
782
|
+
*/
|
|
783
|
+
QueueID: number;
|
|
784
|
+
/**
|
|
785
|
+
* Queue name
|
|
786
|
+
*/
|
|
787
|
+
QueueName: string;
|
|
788
|
+
/**
|
|
789
|
+
* Answered agent
|
|
790
|
+
*/
|
|
791
|
+
AnsweredAgent?: string;
|
|
792
|
+
/**
|
|
793
|
+
* Distributor id
|
|
794
|
+
*/
|
|
795
|
+
DistributorID?: number;
|
|
796
|
+
/**
|
|
797
|
+
* Is distributed queue
|
|
798
|
+
*/
|
|
799
|
+
IsDistributedQueue?: boolean;
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
export declare type QueueCall = {
|
|
803
|
+
/**
|
|
804
|
+
* Ivr id
|
|
805
|
+
*/
|
|
806
|
+
ivrid: string;
|
|
807
|
+
/**
|
|
808
|
+
* Caller id
|
|
809
|
+
*/
|
|
810
|
+
CallerId: string;
|
|
811
|
+
/**
|
|
812
|
+
* Caller name
|
|
813
|
+
*/
|
|
814
|
+
CallerNme: string;
|
|
815
|
+
/**
|
|
816
|
+
* Ivr unique id
|
|
817
|
+
*/
|
|
818
|
+
IvrUniqueID: string;
|
|
819
|
+
/**
|
|
820
|
+
* Join timestamp
|
|
821
|
+
*/
|
|
822
|
+
JoinTimeStamp: number;
|
|
823
|
+
/**
|
|
824
|
+
* Is distributed queue
|
|
825
|
+
*/
|
|
826
|
+
isDistributedQueue?: boolean;
|
|
827
|
+
/**
|
|
828
|
+
* Call duration interval
|
|
829
|
+
*/
|
|
830
|
+
calldurationinterval: number;
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
export declare type QueueEvent = {
|
|
834
|
+
data: Queue;
|
|
835
|
+
reason: QueueEventReasonEnum;
|
|
836
|
+
/**
|
|
837
|
+
* Event name (queue)
|
|
838
|
+
*/
|
|
839
|
+
eventName: string;
|
|
840
|
+
/**
|
|
841
|
+
* Ivr unique id
|
|
842
|
+
*/
|
|
843
|
+
ivrUniqueId: string;
|
|
844
|
+
/**
|
|
845
|
+
* Telephony server time
|
|
846
|
+
*/
|
|
847
|
+
telephonyServerTime: number;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
export declare enum QueueEventReasonEnum {
|
|
851
|
+
ANSWER = 'ANSWER',
|
|
852
|
+
ABANDONED = 'ABANDONED',
|
|
853
|
+
EXIT = 'EXIT',
|
|
854
|
+
JOIN = 'JOIN',
|
|
855
|
+
}
|
|
856
|
+
|
|
320
857
|
export declare type readyListener = (value: boolean) => void
|
|
321
858
|
|
|
322
859
|
export declare interface ReconnectOptions {
|
|
@@ -327,8 +864,31 @@ export declare interface ReconnectOptions {
|
|
|
327
864
|
maxReconnectionDelay: number;
|
|
328
865
|
}
|
|
329
866
|
|
|
867
|
+
export declare type Recording = {
|
|
868
|
+
/**
|
|
869
|
+
* Is muted
|
|
870
|
+
*/
|
|
871
|
+
IsMuted: number;
|
|
872
|
+
/**
|
|
873
|
+
* Options
|
|
874
|
+
*/
|
|
875
|
+
Options: string;
|
|
876
|
+
/**
|
|
877
|
+
* Filename
|
|
878
|
+
*/
|
|
879
|
+
Filename: string;
|
|
880
|
+
/**
|
|
881
|
+
* Approximate url
|
|
882
|
+
*/
|
|
883
|
+
ApproximateURL: string;
|
|
884
|
+
};
|
|
885
|
+
|
|
330
886
|
export declare type removeRoomListener = (value: string) => void
|
|
331
887
|
|
|
888
|
+
declare type Response_2 = {
|
|
889
|
+
};
|
|
890
|
+
export { Response_2 as Response }
|
|
891
|
+
|
|
332
892
|
export declare type RoomDeletedListener = (roomId: number) => void
|
|
333
893
|
|
|
334
894
|
export declare interface Server {
|
|
@@ -393,18 +953,37 @@ declare class SocketIoClass {
|
|
|
393
953
|
|
|
394
954
|
export declare type SocketTyped = Socket_2<EventCallbackRegistry, Record<EventsEnum, any>>
|
|
395
955
|
|
|
956
|
+
export declare type Summery = {
|
|
957
|
+
/**
|
|
958
|
+
* Representative
|
|
959
|
+
*/
|
|
960
|
+
representative: string;
|
|
961
|
+
};
|
|
962
|
+
|
|
396
963
|
export declare type TestEventListener = (event: { test: string }) => void
|
|
397
964
|
|
|
398
965
|
declare type TypedSocketIo = (...args: Parameters<typeof io>) => SocketTyped;
|
|
399
966
|
|
|
400
967
|
export declare type updateRoomListener = (value: string) => void
|
|
401
968
|
|
|
969
|
+
export declare type User = {
|
|
970
|
+
/**
|
|
971
|
+
* User id
|
|
972
|
+
*/
|
|
973
|
+
userID: number;
|
|
974
|
+
/**
|
|
975
|
+
* User name
|
|
976
|
+
*/
|
|
977
|
+
userName: string;
|
|
978
|
+
/**
|
|
979
|
+
* Account id
|
|
980
|
+
*/
|
|
981
|
+
accountID: number;
|
|
982
|
+
};
|
|
983
|
+
|
|
402
984
|
export declare type WrappedSocketEvent<T extends EventsEnum> = {
|
|
403
985
|
name: T
|
|
404
986
|
data: EventDataMap[T]
|
|
405
987
|
}
|
|
406
988
|
|
|
407
|
-
|
|
408
|
-
export * from "@voicenter-team/real-time-events-types";
|
|
409
|
-
|
|
410
989
|
export { }
|