tango-app-api-client 3.3.0-beta.2 → 3.3.0-beta.4

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.2",
3
+ "version": "3.3.0-beta.4",
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.31",
29
29
  "tango-app-api-middleware": "^3.1.30",
30
30
  "winston": "^3.11.0",
31
31
  "winston-daily-rotate-file": "^5.0.0"
@@ -867,6 +867,7 @@ export async function updateFeatureConfiguration( req, res ) {
867
867
  conversionValue: req.body?.conversionValue, infraAlertCondition: req.body?.infraAlertCondition, infraAlertValue: req.body?.infraAlertValue, isFootfallDirectory: req.body?.isFootfallDirectory,
868
868
  isNormalized: req.body?.isNormalized, isPasserByData: req.body?.isPasserByData, missedOpportunityCalculation: req.body?.missedOpportunityCalculation, open: req.body?.open,
869
869
  isExcludedArea: req.body?.isExcludedArea, isCameraDisabled: req.body?.isCameraDisabled, isbillingDisabled: req.body?.isbillingDisabled, isNewDashboard: req.body?.isNewDashboard,
870
+ isFootfallAuditStores: req.body?.isFootfallAuditStores, isNewTraffic: req.body?.isNewTraffic, isNewZone: req.body?.isNewZone, isNewReports: req.body?.isNewReports,
870
871
  } );
871
872
 
872
873
  let updateKeys = [];
@@ -953,6 +954,7 @@ export async function domainDetailsConfiguration( req, res ) {
953
954
  const openSearch = JSON.parse( process.env.OPENSEARCH );
954
955
  const updateAck = await domainDetailsConfigurationUpdate( {
955
956
  clientId: req.params?.id, domainName: req.body?.domainName, isEnable: req.body?.isEnable,
957
+ enableWhitelisting: req.body?.enableWhitelisting, allowedIps: req.body?.allowedIps, enableOtp: req.body?.enableOtp,
956
958
  } );
957
959
 
958
960
  let updateKeys = [];
@@ -113,6 +113,10 @@ export const featureConfigurationSchemaBody = joi.object(
113
113
  isCameraDisabled: joi.boolean().optional(),
114
114
  isbillingDisabled: joi.boolean().optional(),
115
115
  isNewDashboard: joi.boolean().optional(),
116
+ isFootfallAuditStores: joi.boolean().optional(),
117
+ isNewTraffic: joi.boolean().optional(),
118
+ isNewZone: joi.boolean().optional(),
119
+ isNewReports: joi.boolean().optional(),
116
120
  },
117
121
  );
118
122
 
@@ -131,6 +135,11 @@ export const domainDetailsSchemaBody = joi.object(
131
135
  .pattern( /\..*/ )
132
136
  .message( 'Enter a valid domain' ) ).optional(),
133
137
  isEnable: joi.boolean().optional(),
138
+ enableWhitelisting: joi.boolean().optional(),
139
+ allowedIps: joi.array().items( joi.string()
140
+ .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/ )
141
+ .message( 'Enter a valid ip address' ) ).optional(),
142
+ enableOtp: joi.boolean().optional(),
134
143
  },
135
144
  );
136
145
 
@@ -133,7 +133,8 @@ export function featureConfigurationUpdate( {
133
133
  close, conversionCalculation, conversionCondition,
134
134
  conversionValue, infraAlertCondition, infraAlertValue, isFootfallDirectory,
135
135
  isNormalized, isPasserByData, missedOpportunityCalculation, open, isExcludedArea,
136
- isCameraDisabled, isbillingDisabled, isNewDashboard,
136
+ isCameraDisabled, isbillingDisabled, isNewDashboard, isFootfallAuditStores, isNewTraffic,
137
+ isNewZone, isNewReports,
137
138
  } ) {
138
139
  return clientModel.updateOne( { clientId: clientId },
139
140
  {
@@ -157,16 +158,23 @@ export function featureConfigurationUpdate( {
157
158
  'featureConfigs.isCameraDisabled': isCameraDisabled,
158
159
  'featureConfigs.isbillingDisabled': isbillingDisabled,
159
160
  'featureConfigs.isNewDashboard': isNewDashboard,
161
+ 'featureConfigs.isFootfallAuditStores': isFootfallAuditStores,
162
+ 'featureConfigs.isNewTraffic': isNewTraffic,
163
+ 'featureConfigs.isNewZone': isNewZone,
164
+ 'featureConfigs.isNewReports': isNewReports,
160
165
  },
161
166
  } );
162
167
  }
163
168
 
164
- export function domainDetailsConfigurationUpdate( { clientId, domainName, isEnable } ) {
169
+ export function domainDetailsConfigurationUpdate( { clientId, domainName, isEnable, enableWhitelisting, allowedIps, enableOtp } ) {
165
170
  return clientModel.updateOne( { clientId: clientId },
166
171
  {
167
172
  $set: {
168
- 'ssoLogin.domainName': domainName,
169
- 'ssoLogin.isEnable': isEnable,
173
+ 'domainConfig.ssoLogin.domainName': domainName,
174
+ 'domainConfig.ssoLogin.isEnable': isEnable,
175
+ 'domainConfig.ipWhitelisting.enableWhitelisting': enableWhitelisting,
176
+ 'domainConfig.ipWhitelisting.allowedIps': allowedIps,
177
+ 'domainConfig.enableOtp': enableOtp,
170
178
  },
171
179
  } );
172
180
  }