tango-app-api-client 3.4.0-beta.6 → 3.4.0-beta.7
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
|
@@ -996,7 +996,7 @@ export async function updateTicketConfiguration( req, res ) {
|
|
|
996
996
|
|
|
997
997
|
// Map and rename keys from previous client info for UI display and logging
|
|
998
998
|
const oldData = {
|
|
999
|
-
InfraDowntimeType: findClient?.ticketConfigs?.downTimeType,
|
|
999
|
+
InfraDowntimeType: findClient?.ticketConfigs?.downTimeType==0? 'Single Camera': 'All Cameras',
|
|
1000
1000
|
AutoReAssignInstallation: findClient?.ticketConfigs?.installationReAssign,
|
|
1001
1001
|
InfraDowntime: findClient?.ticketConfigs?.infraDownTime,
|
|
1002
1002
|
InfraFiles: findClient?.ticketConfigs?.MinFilesCount,
|
|
@@ -1009,7 +1009,7 @@ export async function updateTicketConfiguration( req, res ) {
|
|
|
1009
1009
|
|
|
1010
1010
|
// Map and rename keys from current client info for UI display and logging
|
|
1011
1011
|
const newData ={
|
|
1012
|
-
InfraDowntimeType: updatedClient?.ticketConfigs?.downTimeType,
|
|
1012
|
+
InfraDowntimeType: updatedClient?.ticketConfigs?.downTimeType==0? 'Single Camera': 'All Cameras',
|
|
1013
1013
|
AutoReAssignInstallation: updatedClient?.ticketConfigs?.installationReAssign,
|
|
1014
1014
|
InfraDowntime: updatedClient?.ticketConfigs?.infraDownTime,
|
|
1015
1015
|
InfraFiles: updatedClient?.ticketConfigs?.MinFilesCount,
|
|
@@ -1136,9 +1136,9 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1136
1136
|
const oldData = {
|
|
1137
1137
|
StoreOpenTime: previousData?.featureConfigs?.open,
|
|
1138
1138
|
StoreCloseTime: previousData?.featureConfigs?.close,
|
|
1139
|
-
ConversionCalculations: previousData?.featureConfigs?.conversionCalculation,
|
|
1140
|
-
MissedOpportunityCalculation: previousData?.featureConfigs?.missedOpportunityCalculation,
|
|
1141
|
-
PotentialCalculations: previousData?.featureConfigs?.billableCalculation,
|
|
1139
|
+
ConversionCalculations: previousData?.featureConfigs?.conversionCalculation=='footfall-count'? 'Footfall Count': postData?.featureConfigs?.conversionCalculation=='engagers-count'?'Engagers Count':'Potential Entities',
|
|
1140
|
+
MissedOpportunityCalculation: previousData?.featureConfigs?.missedOpportunityCalculation=='engagers-conversion'? 'Engagers - Conversion': 'Potential Entities - Conversion',
|
|
1141
|
+
PotentialCalculations: previousData?.featureConfigs?.billableCalculation=='footfall-count'? 'Footfall Count': 'Engagers Count',
|
|
1142
1142
|
ConversionCondition: previousData?.featureConfigs?.conversion.condition,
|
|
1143
1143
|
ConversionValue: previousData?.featureConfigs?.conversion.value,
|
|
1144
1144
|
MissedOpportunityFromCondition: previousData?.featureConfigs?.missedOpportunityFrom?.condition,
|
|
@@ -1149,7 +1149,6 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1149
1149
|
BouncedLimitValue: previousData?.featureConfigs?.bouncedLimit?.value,
|
|
1150
1150
|
InfraAlertValue: previousData?.featureConfigs?.infraAlert?.value,
|
|
1151
1151
|
InfraAlertCondition: previousData?.featureConfigs?.infraAlert?.condition,
|
|
1152
|
-
ConversionCalculations: previousData?.featureConfigs?.conversionCalculation,
|
|
1153
1152
|
ExcludedArea: previousData?.featureConfigs?.isExcludedArea ==true ? 'Enabled': 'Disabled',
|
|
1154
1153
|
PasserBydata: previousData?.featureConfigs?.isPasserByData ==true ? 'Enabled': 'Disabled',
|
|
1155
1154
|
NormalizedDataDuringDowntime: previousData?.featureConfigs?.isNormalized ==true ? 'Enabled': 'Disabled',
|
|
@@ -1173,9 +1172,9 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1173
1172
|
const newData ={
|
|
1174
1173
|
StoreOpenTime: postData?.featureConfigs?.open,
|
|
1175
1174
|
StoreCloseTime: postData?.featureConfigs?.close,
|
|
1176
|
-
ConversionCalculations: postData?.featureConfigs?.conversionCalculation,
|
|
1177
|
-
MissedOpportunityCalculation: postData?.featureConfigs?.missedOpportunityCalculation,
|
|
1178
|
-
PotentialCalculations: postData?.featureConfigs?.billableCalculation,
|
|
1175
|
+
ConversionCalculations: postData?.featureConfigs?.conversionCalculation=='footfall-count'? 'Footfall Count': postData?.featureConfigs?.conversionCalculation=='engagers-count'?'Engagers Count':'Potential Entities',
|
|
1176
|
+
MissedOpportunityCalculation: postData?.featureConfigs?.missedOpportunityCalculation=='engagers-conversion'? 'Engagers - Conversion': 'Potential Entities - Conversion',
|
|
1177
|
+
PotentialCalculations: postData?.featureConfigs?.billableCalculation=='footfall-count'? 'Footfall Count':'Engagers Count',
|
|
1179
1178
|
ConversionCondition: postData?.featureConfigs?.conversion.condition,
|
|
1180
1179
|
ConversionValue: postData?.featureConfigs?.conversion.value,
|
|
1181
1180
|
MissedOpportunityFromCondition: postData?.featureConfigs?.missedOpportunityFrom?.condition,
|
|
@@ -1186,7 +1185,6 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1186
1185
|
BouncedLimitValue: postData?.featureConfigs?.bouncedLimit?.value,
|
|
1187
1186
|
InfraAlertValue: postData?.featureConfigs?.infraAlert?.value,
|
|
1188
1187
|
InfraAlertCondition: postData?.featureConfigs?.infraAlert?.condition,
|
|
1189
|
-
ConversionCalculations: postData?.featureConfigs?.conversionCalculation,
|
|
1190
1188
|
ExcludedArea: postData?.featureConfigs?.isExcludedArea ==true ? 'Enabled': 'Disabled',
|
|
1191
1189
|
PasserBydata: postData?.featureConfigs?.isPasserByData ==true ? 'Enabled': 'Disabled',
|
|
1192
1190
|
NormalizedDataDuringDowntime: postData?.featureConfigs?.isNormalized ==true ? 'Enabled': 'Disabled',
|
|
@@ -1490,20 +1488,22 @@ export async function auditConfiguration( req, res ) {
|
|
|
1490
1488
|
};
|
|
1491
1489
|
await updateOneClient( query, record );
|
|
1492
1490
|
|
|
1493
|
-
|
|
1494
1491
|
// Map and rename keys from previous client info for UI display and logging
|
|
1495
|
-
const oldData =
|
|
1496
|
-
AuditStatus:
|
|
1497
|
-
MappingPercentage:
|
|
1498
|
-
AuditCount:
|
|
1499
|
-
|
|
1492
|
+
const oldData ={
|
|
1493
|
+
AuditStatus: previousClient?.auditConfigs?.audit ==true ? 'Enable': 'Disable',
|
|
1494
|
+
MappingPercentage: previousClient?.auditConfigs?.ratio,
|
|
1495
|
+
AuditCount: previousClient?.auditConfigs?.count,
|
|
1500
1496
|
};
|
|
1501
1497
|
|
|
1498
|
+
const currentClient = await findOneClient( query, fields );
|
|
1499
|
+
currentClient.auditConfigs.ratio = currentClient?.auditConfigs?.ratio? ( currentClient.auditConfigs.ratio )*100 : null;
|
|
1500
|
+
|
|
1502
1501
|
// Map and rename keys from current client info for UI display and logging
|
|
1503
|
-
const newData ={
|
|
1504
|
-
AuditStatus:
|
|
1505
|
-
MappingPercentage:
|
|
1506
|
-
AuditCount:
|
|
1502
|
+
const newData = {
|
|
1503
|
+
AuditStatus: currentClient?.auditConfigs?.audit ==true ? 'Enable': 'Disable',
|
|
1504
|
+
MappingPercentage: currentClient?.auditConfigs?.ratio,
|
|
1505
|
+
AuditCount: currentClient?.auditConfigs?.count,
|
|
1506
|
+
|
|
1507
1507
|
};
|
|
1508
1508
|
const logObj = {
|
|
1509
1509
|
clientId: req.params?.id,
|
|
@@ -1516,12 +1516,7 @@ export async function auditConfiguration( req, res ) {
|
|
|
1516
1516
|
showTo: [ 'tango' ],
|
|
1517
1517
|
changes: [ `Audit config for client id ${req.params?.id}` ],
|
|
1518
1518
|
previous: previousClient.auditConfigs,
|
|
1519
|
-
current:
|
|
1520
|
-
clientId: req.params?.id,
|
|
1521
|
-
count: inputData.count,
|
|
1522
|
-
audit: inputData.audit,
|
|
1523
|
-
ratio: inputData.ratio,
|
|
1524
|
-
},
|
|
1519
|
+
current: currentClient.auditConfigs,
|
|
1525
1520
|
oldData: oldData,
|
|
1526
1521
|
newData: newData,
|
|
1527
1522
|
};
|
|
@@ -2690,7 +2685,8 @@ function splitCamelCase( text ) {
|
|
|
2690
2685
|
return text.replace( /([a-z])([A-Z])/g, '$1 $2' ) // Add space between camelCase words
|
|
2691
2686
|
.replace( /([a-zA-Z])(\d+)/g, '$1 $2' ) // Add space between letters and numbers
|
|
2692
2687
|
.replace( /(\d+)([a-zA-Z])/g, '$1 $2' )
|
|
2693
|
-
.trim()
|
|
2688
|
+
.trim()
|
|
2689
|
+
.replace( /^./, ( match ) => match.toUpperCase() ); // Capitalize the first letter
|
|
2694
2690
|
}
|
|
2695
2691
|
|
|
2696
2692
|
async function postApi( url, data ) {
|