@vgroup/dialbox 0.8.27 → 0.8.29
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/esm2020/lib/components/call-progress/call-progress.component.mjs +251 -91
- package/esm2020/lib/components/call-progress/incoming-call/incoming-call.component.mjs +15 -7
- package/esm2020/lib/dialbox.component.mjs +2 -2
- package/esm2020/lib/environments/environments.mjs +17 -14
- package/esm2020/lib/service/clearcall-live.service.mjs +284 -0
- package/fesm2015/vgroup-dialbox.mjs +571 -126
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +557 -110
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +45 -6
- package/lib/components/call-progress/incoming-call/incoming-call.component.d.ts +3 -1
- package/lib/environments/environments.d.ts +3 -0
- package/lib/service/clearcall-live.service.d.ts +72 -0
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { AfterViewChecked, ChangeDetectorRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { ClearCallLiveService, ClearCallStatus } from '../../service/clearcall-live.service';
|
|
2
4
|
import { Call, Device } from '@twilio/voice-sdk';
|
|
3
5
|
import { ExtensionService } from '../../service/extension.service';
|
|
4
6
|
import { TwilioService } from '../../service/twilio.service';
|
|
@@ -6,12 +8,14 @@ import { Subscription } from 'rxjs';
|
|
|
6
8
|
import { IncomeingCallSocketService } from '../../service/incomeing-call-socket.service';
|
|
7
9
|
import { IpAddressService } from '../../service/ip-address.service';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
|
-
export declare class CallProgressComponent implements OnInit, OnChanges {
|
|
11
|
+
export declare class CallProgressComponent implements OnInit, OnChanges, AfterViewChecked {
|
|
10
12
|
private extensionService;
|
|
11
13
|
private cdr;
|
|
12
14
|
twilioService: TwilioService;
|
|
13
15
|
private ipService;
|
|
14
16
|
private incomeingCallSocketService;
|
|
17
|
+
clearCallLive: ClearCallLiveService;
|
|
18
|
+
private router;
|
|
15
19
|
callData: any;
|
|
16
20
|
selectedCallerId: any;
|
|
17
21
|
newIncomingCallData?: Call;
|
|
@@ -90,7 +94,6 @@ export declare class CallProgressComponent implements OnInit, OnChanges {
|
|
|
90
94
|
conferenceCallList: any[];
|
|
91
95
|
isIncomingCallBtnDisable: boolean;
|
|
92
96
|
isConnecting: boolean;
|
|
93
|
-
private rejectedIncomingCallIds;
|
|
94
97
|
hostnumber: any;
|
|
95
98
|
isNewAddedCall: boolean;
|
|
96
99
|
deviceNumberList: any;
|
|
@@ -154,7 +157,7 @@ export declare class CallProgressComponent implements OnInit, OnChanges {
|
|
|
154
157
|
isUpdatingConferenceSettings: boolean;
|
|
155
158
|
pendingSettingsUpdate: boolean;
|
|
156
159
|
intendedSettings: any;
|
|
157
|
-
constructor(extensionService: ExtensionService, cdr: ChangeDetectorRef, twilioService: TwilioService, ipService: IpAddressService, incomeingCallSocketService: IncomeingCallSocketService);
|
|
160
|
+
constructor(extensionService: ExtensionService, cdr: ChangeDetectorRef, twilioService: TwilioService, ipService: IpAddressService, incomeingCallSocketService: IncomeingCallSocketService, clearCallLive: ClearCallLiveService, router: Router);
|
|
158
161
|
ngOnInit(): void;
|
|
159
162
|
ngOnChanges(changes: SimpleChanges): void;
|
|
160
163
|
rejoinHost(callInfo: any): Promise<void>;
|
|
@@ -176,7 +179,6 @@ export declare class CallProgressComponent implements OnInit, OnChanges {
|
|
|
176
179
|
private cancelSpecialCall;
|
|
177
180
|
private isAddParticipantFailed;
|
|
178
181
|
private showAddParticipantError;
|
|
179
|
-
private disconnectFailedCall;
|
|
180
182
|
private initiateCall;
|
|
181
183
|
onholdOrUnholdParticipant(payload: any): Promise<[] | undefined>;
|
|
182
184
|
private addParticipantToCall;
|
|
@@ -205,7 +207,6 @@ export declare class CallProgressComponent implements OnInit, OnChanges {
|
|
|
205
207
|
addRemoveParticipant(): Promise<void>;
|
|
206
208
|
waitingCallAccept(incomingCallInfo: any): Promise<void>;
|
|
207
209
|
acceptIncomingCall(data?: any, ourNumberInfo?: any, capturedCall?: Call): Promise<void>;
|
|
208
|
-
private resetIncomingConnectingState;
|
|
209
210
|
callContact(contact: any, isUnsavedNumber?: boolean, options?: {
|
|
210
211
|
skipDuplicateCheck?: boolean;
|
|
211
212
|
alreadyNormalized?: boolean;
|
|
@@ -221,6 +222,7 @@ export declare class CallProgressComponent implements OnInit, OnChanges {
|
|
|
221
222
|
getToNumber(dialedNumber: string): Promise<any>;
|
|
222
223
|
isInvalidNumber(number: string): Promise<boolean>;
|
|
223
224
|
showDialAlert(message: string): void;
|
|
225
|
+
getAllParticipants(conferenceId: string): Promise<void>;
|
|
224
226
|
swapCalls(callInfo: any, isConferenceCall?: boolean): Promise<void>;
|
|
225
227
|
hasDetailedInfo(callData: any): boolean;
|
|
226
228
|
onCallInputs(num: any): void;
|
|
@@ -273,6 +275,43 @@ export declare class CallProgressComponent implements OnInit, OnChanges {
|
|
|
273
275
|
onReasonCheckChanged(newValue: boolean): void;
|
|
274
276
|
resetLeaveTimer(): void;
|
|
275
277
|
private unholdPendingConference;
|
|
278
|
+
showInsightsPanel: boolean;
|
|
279
|
+
private lastTranscriptSig;
|
|
280
|
+
transcriptListRef?: ElementRef<HTMLElement>;
|
|
281
|
+
get insightsStatus(): ClearCallStatus;
|
|
282
|
+
get insightsStatusText(): string;
|
|
283
|
+
/** Sentiment mapped from ClearCall's 0–100 to the bar's -100 (negative) .. +100 (positive). */
|
|
284
|
+
get insightsSentiment(): number;
|
|
285
|
+
get hasSentiment(): boolean;
|
|
286
|
+
get insightsSentimentLabel(): string;
|
|
287
|
+
get insightsSuggestions(): import("../../service/clearcall-live.service").InsightSuggestion[];
|
|
288
|
+
/** The two suggestion groups shown in place of the old single "Live Suggestions" list. */
|
|
289
|
+
get insightsSections(): {
|
|
290
|
+
key: string;
|
|
291
|
+
title: string;
|
|
292
|
+
icon: string;
|
|
293
|
+
items: import("../../service/clearcall-live.service").InsightSuggestion[];
|
|
294
|
+
}[];
|
|
295
|
+
get insightsTranscript(): import("../../service/clearcall-live.service").InsightTranscriptLine[];
|
|
296
|
+
ngAfterViewChecked(): void;
|
|
297
|
+
trackById: (_: number, s: {
|
|
298
|
+
id: string;
|
|
299
|
+
}) => string;
|
|
300
|
+
trackByKey: (_: number, t: {
|
|
301
|
+
key: string;
|
|
302
|
+
}) => string;
|
|
303
|
+
private startInsights;
|
|
304
|
+
toggleInsightsPanel(): void;
|
|
305
|
+
insightsFullscreen: boolean;
|
|
306
|
+
fsKeypadOpen: boolean;
|
|
307
|
+
toggleInsightsFullscreen(): void;
|
|
308
|
+
/** The participants panel belongs to the regular UI: leave full screen, then show it. */
|
|
309
|
+
openParticipantsFromFullscreen(): void;
|
|
310
|
+
/** Who the call is with, for the full screen bottom bar (mirrors the active-call view's logic). */
|
|
311
|
+
get fsCallName(): string;
|
|
312
|
+
get fsCallNumber(): string;
|
|
313
|
+
/** Take the user to the ClearCall settings page to enable a disabled insight feature. */
|
|
314
|
+
openTranscriptionSettings(): void;
|
|
276
315
|
toggleSettingsPanel(): void;
|
|
277
316
|
closeSettingsPanel(): void;
|
|
278
317
|
getHostParticipant(): any;
|
|
@@ -2,12 +2,14 @@ import { EventEmitter, OnInit } from '@angular/core';
|
|
|
2
2
|
import { Call } from '@twilio/voice-sdk';
|
|
3
3
|
import { ExtensionService } from '../../../service/extension.service';
|
|
4
4
|
import { TwilioService } from '../../../service/twilio.service';
|
|
5
|
+
import { ClearCallLiveService } from '../../../service/clearcall-live.service';
|
|
5
6
|
import { NotificationService } from '../../../service/Notification.service';
|
|
6
7
|
import { Subscription } from 'rxjs';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class IncomingCallComponent implements OnInit {
|
|
9
10
|
private extensionService;
|
|
10
11
|
private twilioService;
|
|
12
|
+
private clearCallLive;
|
|
11
13
|
private notificationSerivce;
|
|
12
14
|
incomingCallData: any;
|
|
13
15
|
newIncomingCallsList: any;
|
|
@@ -31,7 +33,7 @@ export declare class IncomingCallComponent implements OnInit {
|
|
|
31
33
|
incomingCallsNewList: EventEmitter<any>;
|
|
32
34
|
selectedIncomingCallInfo: EventEmitter<any>;
|
|
33
35
|
isMute?: boolean;
|
|
34
|
-
constructor(extensionService: ExtensionService, twilioService: TwilioService, notificationSerivce: NotificationService);
|
|
36
|
+
constructor(extensionService: ExtensionService, twilioService: TwilioService, clearCallLive: ClearCallLiveService, notificationSerivce: NotificationService);
|
|
35
37
|
ngOnInit(): void;
|
|
36
38
|
acceptCallFromList(data?: any): void;
|
|
37
39
|
rejectCallFromList(data?: any): void;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { NgZone } from '@angular/core';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface ClearCallFeatures {
|
|
5
|
+
liveTranscription: boolean;
|
|
6
|
+
liveSentiment: boolean;
|
|
7
|
+
contextualResponse: boolean;
|
|
8
|
+
}
|
|
9
|
+
export type ClearCallStatus = 'idle' | 'connecting' | 'live' | 'finalizing' | 'completed' | 'unavailable' | 'error';
|
|
10
|
+
export interface InsightTranscriptLine {
|
|
11
|
+
key: string;
|
|
12
|
+
speaker: string;
|
|
13
|
+
isSelf: boolean;
|
|
14
|
+
time: string;
|
|
15
|
+
text: string;
|
|
16
|
+
translation?: string;
|
|
17
|
+
isInterim?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface InsightSuggestion {
|
|
20
|
+
id: string;
|
|
21
|
+
kind: 'reply' | 'coaching';
|
|
22
|
+
text: string;
|
|
23
|
+
signal?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Relay for ClearCall live events (wss://<backend>/clearcall/live, see "ClearCall Integration API Reference").
|
|
27
|
+
* The browser only holds our normal JWT; the backend holds the ClearCall token and forwards events unchanged.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ClearCallLiveService {
|
|
30
|
+
private zone;
|
|
31
|
+
private http;
|
|
32
|
+
status: ClearCallStatus;
|
|
33
|
+
sentimentScore: number | null;
|
|
34
|
+
sentimentLabel: string;
|
|
35
|
+
sentimentTrend: string;
|
|
36
|
+
suggestions: InsightSuggestion[];
|
|
37
|
+
transcript: InsightTranscriptLine[];
|
|
38
|
+
callId: string;
|
|
39
|
+
private socket?;
|
|
40
|
+
private reconnectTimer;
|
|
41
|
+
private reconnectAttempts;
|
|
42
|
+
private stopped;
|
|
43
|
+
private seenEventIds;
|
|
44
|
+
private readonly MAX_RECONNECTS;
|
|
45
|
+
private readonly MAX_BACKOFF_MS;
|
|
46
|
+
private readonly MAX_SUGGESTIONS;
|
|
47
|
+
private readonly MAX_TRANSCRIPT;
|
|
48
|
+
/** Per-feature switches from GET /utilities/clearcall/settings (`effective` = user setting AND plan allowance). */
|
|
49
|
+
features: ClearCallFeatures;
|
|
50
|
+
settingsLoaded: boolean;
|
|
51
|
+
constructor(zone: NgZone, http: HttpClient);
|
|
52
|
+
/** Load which insight sections are enabled. On failure everything stays enabled (don't hide data on a settings glitch). */
|
|
53
|
+
loadSettings(): void;
|
|
54
|
+
/** Start streaming insights for a ClearCall call id (call_...). No-op if already streaming that call. */
|
|
55
|
+
start(callId: string): void;
|
|
56
|
+
/** Stop streaming. `keepData` leaves the last transcript/sentiment visible after the call ends. */
|
|
57
|
+
stop(keepData?: boolean): void;
|
|
58
|
+
private reset;
|
|
59
|
+
private connect;
|
|
60
|
+
private handleClose;
|
|
61
|
+
private handleEvent;
|
|
62
|
+
private isSelf;
|
|
63
|
+
private speakerName;
|
|
64
|
+
private formatTime;
|
|
65
|
+
/** Interim replaces that speaker's current in-progress line. */
|
|
66
|
+
private upsertInterim;
|
|
67
|
+
private addFinal;
|
|
68
|
+
private trimTranscript;
|
|
69
|
+
private pushSuggestion;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ClearCallLiveService, never>;
|
|
71
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ClearCallLiveService>;
|
|
72
|
+
}
|