@app-connect/core 1.7.27 → 1.7.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/handlers/auth.js CHANGED
@@ -34,6 +34,8 @@ async function onOAuthCallback({ platform, hostname, tokenUrl, query, hashedRcEx
34
34
  if (!oauthInfo) {
35
35
  oauthInfo = await platformModule.getOauthInfo({ tokenUrl, hostname, rcAccountId: query.rcAccountId, proxyId, proxyConfig, userEmail, isFromMCP });
36
36
  }
37
+ const resolvedHostname = oauthInfo?.hostname ?? hostname;
38
+ const resolvedTokenUrl = oauthInfo?.accessTokenUri ?? tokenUrl;
37
39
  if (oauthInfo.failMessage) {
38
40
  return {
39
41
  userInfo: null,
@@ -53,7 +55,7 @@ async function onOAuthCallback({ platform, hostname, tokenUrl, query, hashedRcEx
53
55
  const oauthApp = oauth.getOAuthApp(oauthInfo);
54
56
  const { accessToken, refreshToken, expires, data } = await oauthApp.code.getToken(callbackUri, overridingOAuthOption);
55
57
  const authHeader = `Bearer ${accessToken}`;
56
- const { successful, platformUserInfo, returnMessage } = await platformModule.getUserInfo({ authHeader, tokenUrl, apiUrl, hostname, platform, username, callbackUri, query, proxyId, proxyConfig, userEmail, data });
58
+ const { successful, platformUserInfo, returnMessage } = await platformModule.getUserInfo({ authHeader, tokenUrl: resolvedTokenUrl, apiUrl, hostname: resolvedHostname, platform, username, callbackUri, query, proxyId, proxyConfig, userEmail, data });
57
59
 
58
60
  if (successful) {
59
61
  let userInfo = null;
@@ -61,10 +63,10 @@ async function onOAuthCallback({ platform, hostname, tokenUrl, query, hashedRcEx
61
63
  userInfo = await saveUserInfo({
62
64
  platformUserInfo,
63
65
  platform,
64
- tokenUrl,
66
+ tokenUrl: resolvedTokenUrl,
65
67
  apiUrl,
66
68
  username,
67
- hostname: platformUserInfo?.overridingHostname ? platformUserInfo.overridingHostname : hostname,
69
+ hostname: platformUserInfo?.overridingHostname ? platformUserInfo.overridingHostname : resolvedHostname,
68
70
  accessToken,
69
71
  refreshToken,
70
72
  tokenExpiry: isNaN(expires) ? null : expires,
package/index.js CHANGED
@@ -3,7 +3,6 @@ const cors = require('cors')
3
3
  const bodyParser = require('body-parser');
4
4
  require('body-parser-xml')(bodyParser);
5
5
  const dynamoose = require('dynamoose');
6
- const Sequelize = require('sequelize');
7
6
  const { DynamoDB } = require('@aws-sdk/client-dynamodb');
8
7
  const axios = require('axios');
9
8
  const { UserModel } = require('./models/userModel');
@@ -36,10 +35,6 @@ const s3ErrorLogReport = require('./lib/s3ErrorLogReport');
36
35
  const pluginCore = require('./handlers/plugin');
37
36
  const { handleDatabaseError } = require('./lib/errorHandler');
38
37
  const { updateAuthSession } = require('./lib/authSession');
39
- const {
40
- migrateCallLogsExtensionNumberSqlite,
41
- sqliteCallLogsPkIncludesExtension,
42
- } = require('./lib/migrateCallLogsSchema');
43
38
  const managedAuthCore = require('./handlers/managedAuth');
44
39
  const managedOAuthCore = require('./handlers/managedOAuth');
45
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-connect/core",
3
- "version": "1.7.27",
3
+ "version": "1.7.29",
4
4
  "description": "RingCentral App Connect Core",
5
5
  "main": "index.js",
6
6
  "repository": {
package/releaseNotes.json CHANGED
@@ -1,4 +1,12 @@
1
1
  {
2
+ "1.7.29": {
3
+ "global": [
4
+ {
5
+ "type": "New",
6
+ "description": "Conditional rendering of logging form fields by contact type"
7
+ }
8
+ ]
9
+ },
2
10
  "1.7.27": {
3
11
  "global": [
4
12
  {