tango-app-api-client 3.3.0-beta.1 → 3.3.0-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-client",
3
- "version": "3.3.0-beta.1",
3
+ "version": "3.3.0-beta.3",
4
4
  "description": "client",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "mongodb": "^6.3.0",
26
26
  "nodemon": "^3.0.3",
27
27
  "swagger-ui-express": "^5.0.0",
28
- "tango-api-schema": "^2.1.15",
28
+ "tango-api-schema": "^2.1.27",
29
29
  "tango-app-api-middleware": "^3.1.30",
30
30
  "winston": "^3.11.0",
31
31
  "winston-daily-rotate-file": "^5.0.0"
@@ -953,6 +953,7 @@ export async function domainDetailsConfiguration( req, res ) {
953
953
  const openSearch = JSON.parse( process.env.OPENSEARCH );
954
954
  const updateAck = await domainDetailsConfigurationUpdate( {
955
955
  clientId: req.params?.id, domainName: req.body?.domainName, isEnable: req.body?.isEnable,
956
+ enableWhitelisting: req.body?.enableWhitelisting, allowedIps: req.body?.allowedIps, enableOtp: req.body?.enableOtp,
956
957
  } );
957
958
 
958
959
  let updateKeys = [];
@@ -131,6 +131,11 @@ export const domainDetailsSchemaBody = joi.object(
131
131
  .pattern( /\..*/ )
132
132
  .message( 'Enter a valid domain' ) ).optional(),
133
133
  isEnable: joi.boolean().optional(),
134
+ enableWhitelisting: joi.boolean().optional(),
135
+ allowedIps: joi.array().items( joi.string()
136
+ .pattern( /\b((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/ )
137
+ .message( 'Enter a valid ip address' ) ).optional(),
138
+ enableOtp: joi.boolean().optional(),
134
139
  },
135
140
  );
136
141
 
@@ -133,7 +133,7 @@ export function featureConfigurationUpdate( {
133
133
  close, conversionCalculation, conversionCondition,
134
134
  conversionValue, infraAlertCondition, infraAlertValue, isFootfallDirectory,
135
135
  isNormalized, isPasserByData, missedOpportunityCalculation, open, isExcludedArea,
136
- isCameraDisabled, isbillingDisabled,
136
+ isCameraDisabled, isbillingDisabled, isNewDashboard,
137
137
  } ) {
138
138
  return clientModel.updateOne( { clientId: clientId },
139
139
  {
@@ -156,16 +156,20 @@ export function featureConfigurationUpdate( {
156
156
  'featureConfigs.updateFeatureConfig': false,
157
157
  'featureConfigs.isCameraDisabled': isCameraDisabled,
158
158
  'featureConfigs.isbillingDisabled': isbillingDisabled,
159
+ 'featureConfigs.isNewDashboard': isNewDashboard,
159
160
  },
160
161
  } );
161
162
  }
162
163
 
163
- export function domainDetailsConfigurationUpdate( { clientId, domainName, isEnable } ) {
164
+ export function domainDetailsConfigurationUpdate( { clientId, domainName, isEnable, enableWhitelisting, allowedIps, enableOtp } ) {
164
165
  return clientModel.updateOne( { clientId: clientId },
165
166
  {
166
167
  $set: {
167
- 'ssoLogin.domainName': domainName,
168
- 'ssoLogin.isEnable': isEnable,
168
+ 'domainConfig.ssoLogin.domainName': domainName,
169
+ 'domainConfig.ssoLogin.isEnable': isEnable,
170
+ 'domainConfig.ipWhitelisting.enableWhitelisting': enableWhitelisting,
171
+ 'domainConfig.ipWhitelisting.allowedIps': allowedIps,
172
+ 'domainConfig.enableOtp': enableOtp,
169
173
  },
170
174
  } );
171
175
  }