@app-connect/core 1.7.3 → 1.7.5
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/handlers/log.js +12 -1
- package/index.js +2 -0
- package/lib/callLogComposer.js +5 -5
- package/package.json +1 -1
- package/releaseNotes.json +44 -0
package/handlers/log.js
CHANGED
|
@@ -359,6 +359,7 @@ async function updateCallLog({ platform, userId, incomingData, hashedAccountId,
|
|
|
359
359
|
const getLogResult = await platformModule.getCallLog({
|
|
360
360
|
user,
|
|
361
361
|
callLogId: existingCallLog.thirdPartyLogId,
|
|
362
|
+
contactId: existingCallLog.contactId,
|
|
362
363
|
authHeader,
|
|
363
364
|
proxyConfig,
|
|
364
365
|
});
|
|
@@ -570,6 +571,16 @@ async function createMessageLog({ platform, userId, incomingData }) {
|
|
|
570
571
|
faxDownloadLink = message.attachments.find(a => a.type === 'RenderedDocument').uri + `?access_token=${incomingData.logInfo.rcAccessToken}`
|
|
571
572
|
}
|
|
572
573
|
let imageLink = null;
|
|
574
|
+
let imageDownloadLink = null;
|
|
575
|
+
let imageContentType = null;
|
|
576
|
+
if (message.attachments && message.attachments.some(a => a.type === 'MmsAttachment' && a.contentType.startsWith('image/'))) {
|
|
577
|
+
const imageAttachment = message.attachments.find(a => a.type === 'MmsAttachment' && a.contentType.startsWith('image/'));
|
|
578
|
+
if (imageAttachment) {
|
|
579
|
+
imageLink = getMediaReaderLinkByPlatformMediaLink(imageAttachment?.uri);
|
|
580
|
+
imageDownloadLink = imageAttachment?.uri + `?access_token=${incomingData.logInfo.rcAccessToken}`;
|
|
581
|
+
imageContentType = imageAttachment?.contentType;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
573
584
|
let videoLink = null;
|
|
574
585
|
if (message.attachments && message.attachments.some(a => a.type === 'MmsAttachment')) {
|
|
575
586
|
const imageAttachment = message.attachments.find(a => a.type === 'MmsAttachment' && a.contentType.startsWith('image/'));
|
|
@@ -593,7 +604,7 @@ async function createMessageLog({ platform, userId, incomingData }) {
|
|
|
593
604
|
returnMessage = updateMessageResult?.returnMessage;
|
|
594
605
|
}
|
|
595
606
|
else {
|
|
596
|
-
const createMessageLogResult = await platformModule.createMessageLog({ user, contactInfo, authHeader, message, additionalSubmission, recordingLink, faxDocLink, faxDownloadLink, imageLink, videoLink, proxyConfig });
|
|
607
|
+
const createMessageLogResult = await platformModule.createMessageLog({ user, contactInfo, authHeader, message, additionalSubmission, recordingLink, faxDocLink, faxDownloadLink, imageLink, imageDownloadLink, imageContentType, videoLink, proxyConfig });
|
|
597
608
|
crmLogId = createMessageLogResult.logId;
|
|
598
609
|
returnMessage = createMessageLogResult?.returnMessage;
|
|
599
610
|
extraDataTracking = createMessageLogResult.extraDataTracking;
|
package/index.js
CHANGED
|
@@ -155,6 +155,7 @@ function createCoreRouter() {
|
|
|
155
155
|
result.getUserList = !!platformModule.getUserList;
|
|
156
156
|
result.getLicenseStatus = !!platformModule.getLicenseStatus;
|
|
157
157
|
result.getLogFormatType = !!platformModule.getLogFormatType;
|
|
158
|
+
result.cacheCallNote = !!process.env.USE_CACHE;
|
|
158
159
|
res.status(200).send(result);
|
|
159
160
|
}
|
|
160
161
|
else {
|
|
@@ -1005,6 +1006,7 @@ function createCoreRouter() {
|
|
|
1005
1006
|
if (extraDataTracking) {
|
|
1006
1007
|
extraData = extraDataTracking;
|
|
1007
1008
|
}
|
|
1009
|
+
extraData.requireDetails = req.query.requireDetails === 'true';
|
|
1008
1010
|
}
|
|
1009
1011
|
else {
|
|
1010
1012
|
res.status(400).send('Please go to Settings and authorize CRM platform');
|
package/lib/callLogComposer.js
CHANGED
|
@@ -531,7 +531,7 @@ function upsertAiNote({ body, aiNote, logFormat }) {
|
|
|
531
531
|
if (aiNoteRegex.test(result)) {
|
|
532
532
|
result = result.replace(aiNoteRegex, `- AI Note:\n${clearedAiNote}\n--- END`);
|
|
533
533
|
} else {
|
|
534
|
-
result +=
|
|
534
|
+
result += `\n- AI Note:\n${clearedAiNote}\n--- END\n`;
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
return result;
|
|
@@ -563,7 +563,7 @@ function upsertTranscript({ body, transcript, logFormat }) {
|
|
|
563
563
|
if (transcriptRegex.test(result)) {
|
|
564
564
|
result = result.replace(transcriptRegex, `- Transcript:\n${transcript}\n--- END`);
|
|
565
565
|
} else {
|
|
566
|
-
result +=
|
|
566
|
+
result += `\n- Transcript:\n${transcript}\n--- END\n`;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
return result;
|
|
@@ -669,7 +669,7 @@ function upsertRingSenseTranscript({ body, transcript, logFormat }) {
|
|
|
669
669
|
if (transcriptRegex.test(result)) {
|
|
670
670
|
result = result.replace(transcriptRegex, `- RingSense transcript:\n${clearedTranscript}\n--- END`);
|
|
671
671
|
} else {
|
|
672
|
-
result +=
|
|
672
|
+
result += `\n- RingSense transcript:\n${clearedTranscript}\n--- END\n`;
|
|
673
673
|
}
|
|
674
674
|
}
|
|
675
675
|
return result;
|
|
@@ -701,7 +701,7 @@ function upsertRingSenseSummary({ body, summary, logFormat }) {
|
|
|
701
701
|
if (summaryRegex.test(result)) {
|
|
702
702
|
result = result.replace(summaryRegex, `- RingSense summary:\n${summary}\n--- END`);
|
|
703
703
|
} else {
|
|
704
|
-
result +=
|
|
704
|
+
result += `\n- RingSense summary:\n${summary}\n--- END\n`;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
return result;
|
|
@@ -761,7 +761,7 @@ function upsertRingSenseBulletedSummary({ body, summary, logFormat }) {
|
|
|
761
761
|
if (summaryRegex.test(result)) {
|
|
762
762
|
result = result.replace(summaryRegex, `- RingSense bulleted summary:\n${summary}\n--- END`);
|
|
763
763
|
} else {
|
|
764
|
-
result +=
|
|
764
|
+
result += `\n- RingSense bulleted summary:\n${summary}\n--- END\n`;
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
767
|
return result;
|
package/package.json
CHANGED
package/releaseNotes.json
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
{
|
|
2
|
+
"1.7.5": {
|
|
3
|
+
"global": [
|
|
4
|
+
{
|
|
5
|
+
"type": "Fix",
|
|
6
|
+
"description": "A not found issue for call note cache"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"type": "Better",
|
|
10
|
+
"description": "Embedded URL list now defaults to all domain. (Meaning quick access button and click-to-dial widget will be rendered on all web pages by default)"
|
|
11
|
+
}
|
|
12
|
+
]
|
|
13
|
+
},
|
|
14
|
+
"1.7.4": {
|
|
15
|
+
"global": [
|
|
16
|
+
{
|
|
17
|
+
"type": "New",
|
|
18
|
+
"description": "Auto restart server-side logging when call log details setting changed"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "New",
|
|
22
|
+
"description": "Support to change quick access button size"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "New",
|
|
26
|
+
"description": "Support to open log form when during a call"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "Fix",
|
|
30
|
+
"description": "An edge case of unwanted call log in call queue scenario"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
},
|
|
2
34
|
"1.7.3": {
|
|
3
35
|
"global": [
|
|
4
36
|
{
|
|
@@ -39,6 +71,18 @@
|
|
|
39
71
|
}
|
|
40
72
|
]
|
|
41
73
|
},
|
|
74
|
+
"1.6.12": {
|
|
75
|
+
"global": [
|
|
76
|
+
{
|
|
77
|
+
"type": "New",
|
|
78
|
+
"description": "Support RingSense logging with server-side logging"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "Fix",
|
|
82
|
+
"description": "An edge case of unwanted call log in call queue scenario"
|
|
83
|
+
}
|
|
84
|
+
]
|
|
85
|
+
},
|
|
42
86
|
"1.6.11":{
|
|
43
87
|
"global": [
|
|
44
88
|
{
|