@app-connect/core 1.7.4 → 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 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/package.json CHANGED
@@ -1,67 +1,67 @@
1
- {
2
- "name": "@app-connect/core",
3
- "version": "1.7.4",
4
- "description": "RingCentral App Connect Core",
5
- "main": "index.js",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/ringcentral/rc-unified-crm-extension.git"
9
- },
10
- "keywords": [
11
- "RingCentral",
12
- "App Connect"
13
- ],
14
- "author": "RingCentral Labs",
15
- "license": "MIT",
16
- "peerDependencies": {
17
- "axios": "^1.12.2",
18
- "express": "^4.21.2",
19
- "pg": "^8.8.0",
20
- "sequelize": "^6.29.0",
21
- "moment": "^2.29.4",
22
- "moment-timezone": "^0.5.39"
23
- },
24
- "dependencies": {
25
- "@aws-sdk/client-dynamodb": "^3.751.0",
26
- "body-parser": "^1.20.3",
27
- "client-oauth2": "^4.3.3",
28
- "cors": "^2.8.5",
29
- "country-state-city": "^3.2.1",
30
- "dotenv": "^16.0.3",
31
- "dynamoose": "^4.0.3",
32
- "jsonwebtoken": "^9.0.0",
33
- "mixpanel": "^0.18.0",
34
- "shortid": "^2.2.17",
35
- "tz-lookup": "^6.1.25",
36
- "ua-parser-js": "^1.0.38"
37
- },
38
- "scripts": {
39
- "test": "jest",
40
- "test:watch": "jest --watch",
41
- "test:coverage": "jest --coverage",
42
- "test:ci": "jest --ci --coverage --watchAll=false"
43
- },
44
- "devDependencies": {
45
- "@eslint/js": "^9.22.0",
46
- "@octokit/rest": "^19.0.5",
47
- "axios": "^1.12.2",
48
- "express": "^4.21.2",
49
- "eslint": "^9.22.0",
50
- "globals": "^16.0.0",
51
- "jest": "^29.3.1",
52
- "moment": "^2.29.4",
53
- "moment-timezone": "^0.5.39",
54
- "nock": "^13.2.9",
55
- "pg": "^8.8.0",
56
- "sequelize": "^6.29.0",
57
- "sqlite3": "^5.1.2",
58
- "supertest": "^6.3.1"
59
- },
60
- "overrides": {
61
- "js-object-utilities": "2.2.1"
62
- },
63
- "bugs": {
64
- "url": "https://github.com/ringcentral/rc-unified-crm-extension/issues"
65
- },
66
- "homepage": "https://github.com/ringcentral/rc-unified-crm-extension#readme"
67
- }
1
+ {
2
+ "name": "@app-connect/core",
3
+ "version": "1.7.5",
4
+ "description": "RingCentral App Connect Core",
5
+ "main": "index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/ringcentral/rc-unified-crm-extension.git"
9
+ },
10
+ "keywords": [
11
+ "RingCentral",
12
+ "App Connect"
13
+ ],
14
+ "author": "RingCentral Labs",
15
+ "license": "MIT",
16
+ "peerDependencies": {
17
+ "axios": "^1.12.2",
18
+ "express": "^4.21.2",
19
+ "pg": "^8.8.0",
20
+ "sequelize": "^6.29.0",
21
+ "moment": "^2.29.4",
22
+ "moment-timezone": "^0.5.39"
23
+ },
24
+ "dependencies": {
25
+ "@aws-sdk/client-dynamodb": "^3.751.0",
26
+ "body-parser": "^1.20.3",
27
+ "client-oauth2": "^4.3.3",
28
+ "cors": "^2.8.5",
29
+ "country-state-city": "^3.2.1",
30
+ "dotenv": "^16.0.3",
31
+ "dynamoose": "^4.0.3",
32
+ "jsonwebtoken": "^9.0.0",
33
+ "mixpanel": "^0.18.0",
34
+ "shortid": "^2.2.17",
35
+ "tz-lookup": "^6.1.25",
36
+ "ua-parser-js": "^1.0.38"
37
+ },
38
+ "scripts": {
39
+ "test": "jest",
40
+ "test:watch": "jest --watch",
41
+ "test:coverage": "jest --coverage",
42
+ "test:ci": "jest --ci --coverage --watchAll=false"
43
+ },
44
+ "devDependencies": {
45
+ "@eslint/js": "^9.22.0",
46
+ "@octokit/rest": "^19.0.5",
47
+ "axios": "^1.12.2",
48
+ "express": "^4.21.2",
49
+ "eslint": "^9.22.0",
50
+ "globals": "^16.0.0",
51
+ "jest": "^29.3.1",
52
+ "moment": "^2.29.4",
53
+ "moment-timezone": "^0.5.39",
54
+ "nock": "^13.2.9",
55
+ "pg": "^8.8.0",
56
+ "sequelize": "^6.29.0",
57
+ "sqlite3": "^5.1.2",
58
+ "supertest": "^6.3.1"
59
+ },
60
+ "overrides": {
61
+ "js-object-utilities": "2.2.1"
62
+ },
63
+ "bugs": {
64
+ "url": "https://github.com/ringcentral/rc-unified-crm-extension/issues"
65
+ },
66
+ "homepage": "https://github.com/ringcentral/rc-unified-crm-extension#readme"
67
+ }
package/releaseNotes.json CHANGED
@@ -1,4 +1,16 @@
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
+ },
2
14
  "1.7.4": {
3
15
  "global": [
4
16
  {