tango-app-api-analysis-zone 3.7.1-alpha.14 → 3.7.1-alpha.16
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
|
@@ -116,7 +116,7 @@ export const zoneSummaryTableV1 = async ( req, res ) => {
|
|
|
116
116
|
if ( reqestData.export ) {
|
|
117
117
|
reqestData.limit = 10000;
|
|
118
118
|
}
|
|
119
|
-
let LamdaURL = 'https://hxpnn5weq3lm4nqouk4pjm3chy0jmqdb.lambda-url.ap-south-1.on.aws/';
|
|
119
|
+
let LamdaURL = 'https://l6dgzeiq6lgcfk54uiofhhwini0yserp.lambda-url.ap-south-1.on.aws/'; // 'https://hxpnn5weq3lm4nqouk4pjm3chy0jmqdb.lambda-url.ap-south-1.on.aws/';
|
|
120
120
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
121
121
|
if ( resultData ) {
|
|
122
122
|
if ( resultData.status_code == '200' ) {
|
|
@@ -127,12 +127,13 @@ export const zoneSummaryTableV1 = async ( req, res ) => {
|
|
|
127
127
|
exportdata.push( {
|
|
128
128
|
'Date': element.date,
|
|
129
129
|
'Zone Name': element.zoneName,
|
|
130
|
+
...( element.zoneGroupName ? { 'Zone Group Name': element.zoneGroupName } : {} ),
|
|
130
131
|
'Store Name': element.storeName,
|
|
131
132
|
'Store ID': element.storeId,
|
|
132
133
|
...( element.storefootfallCount !== undefined && { 'Store FF': element.storefootfallCount } ),
|
|
133
134
|
...( reqestData.featureConfigs?.isNOB ?
|
|
134
|
-
{ 'Zone Wise NoB': element.
|
|
135
|
-
{ 'Zone Wise Conversion': element.
|
|
135
|
+
{ 'Zone Wise NoB': element.nob ?? 0 } :
|
|
136
|
+
{ 'Zone Wise Conversion': element.nob ?? 0 }
|
|
136
137
|
),
|
|
137
138
|
'Zone Conc.Rate': element.concentrationRate,
|
|
138
139
|
'Avg Dwell Time (Mins)': element.avgDwellTime,
|
|
@@ -171,7 +172,7 @@ export const zoneSummaryTableV1 = async ( req, res ) => {
|
|
|
171
172
|
export const zoneConcentrationSummaryTableV1 = async ( req, res ) => {
|
|
172
173
|
try {
|
|
173
174
|
let reqestData = req.body;
|
|
174
|
-
let LamdaURL = 'https://ebinpkkji5wghr6rwm7jojwstu0idgiu.lambda-url.ap-south-1.on.aws/';
|
|
175
|
+
let LamdaURL ='https://ygywlvudrnvmvklfwiugufzuky0vblph.lambda-url.ap-south-1.on.aws/'; // 'https://ebinpkkji5wghr6rwm7jojwstu0idgiu.lambda-url.ap-south-1.on.aws/';
|
|
175
176
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
176
177
|
if ( resultData ) {
|
|
177
178
|
if ( resultData.status_code == '200' ) {
|
|
@@ -457,7 +458,7 @@ export const zoneInteractionTableExport430 = async ( req, res ) => {
|
|
|
457
458
|
export const zoneConcentrationTableExport = async ( req, res ) => {
|
|
458
459
|
try {
|
|
459
460
|
let reqestData = req.body;
|
|
460
|
-
let LamdaURL = 'https://d6t5hy4qdautrffztmpeipslku0vforb.lambda-url.ap-south-1.on.aws/';
|
|
461
|
+
let LamdaURL = 'https://4bdorfgq75zujog7v3mdj7kuke0efiia.lambda-url.ap-south-1.on.aws/';// 'https://d6t5hy4qdautrffztmpeipslku0vforb.lambda-url.ap-south-1.on.aws/';
|
|
461
462
|
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
462
463
|
if ( resultData ) {
|
|
463
464
|
if ( resultData.status_code == '200' ) {
|
|
@@ -1074,3 +1075,45 @@ async function getClientConfig( clientId ) {
|
|
|
1074
1075
|
}
|
|
1075
1076
|
}
|
|
1076
1077
|
|
|
1078
|
+
|
|
1079
|
+
// New Api for shilla
|
|
1080
|
+
export const getZoneGroupAnalysis = async ( req, res ) => {
|
|
1081
|
+
try {
|
|
1082
|
+
let reqestData = req.body;
|
|
1083
|
+
let LamdaURL = 'https://vngwgn2actalutntl4ilv6elqm0pnhib.lambda-url.ap-south-1.on.aws/';
|
|
1084
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
1085
|
+
if ( resultData ) {
|
|
1086
|
+
if ( resultData.status_code == '200' ) {
|
|
1087
|
+
return res.sendSuccess( resultData );
|
|
1088
|
+
} else {
|
|
1089
|
+
return res.sendError( 'No Content', 204 );
|
|
1090
|
+
}
|
|
1091
|
+
} else {
|
|
1092
|
+
return res.sendError( 'No Content', 204 );
|
|
1093
|
+
}
|
|
1094
|
+
} catch ( error ) {
|
|
1095
|
+
logger.error( { error: error, message: req.query, function: 'getZoneGroupAnalysis' } );
|
|
1096
|
+
return res.sendError( { error: error }, 500 );
|
|
1097
|
+
}
|
|
1098
|
+
};
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
export const getViewInsightsV1 = async ( req, res ) => {
|
|
1102
|
+
try {
|
|
1103
|
+
let reqestData = req.body;
|
|
1104
|
+
let LamdaURL = 'https://f65azvtljclaxp6l7rnx65cdmm0lcgvp.lambda-url.ap-south-1.on.aws/';
|
|
1105
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
1106
|
+
if ( resultData ) {
|
|
1107
|
+
if ( resultData.status_code == '200' ) {
|
|
1108
|
+
return res.sendSuccess( resultData );
|
|
1109
|
+
} else {
|
|
1110
|
+
return res.sendError( 'No Content', 204 );
|
|
1111
|
+
}
|
|
1112
|
+
} else {
|
|
1113
|
+
return res.sendError( 'No Content', 204 );
|
|
1114
|
+
}
|
|
1115
|
+
} catch ( error ) {
|
|
1116
|
+
logger.error( { error: error, message: req.query, function: 'getViewInsightsV1' } );
|
|
1117
|
+
return res.sendError( { error: error }, 500 );
|
|
1118
|
+
}
|
|
1119
|
+
};
|
|
@@ -48,6 +48,8 @@ import {
|
|
|
48
48
|
getNewCustomerTravelZoneV1,
|
|
49
49
|
getNewAnalysisZoneV1,
|
|
50
50
|
getOverallStoreCardsV1,
|
|
51
|
+
getZoneGroupAnalysis,
|
|
52
|
+
getViewInsightsV1,
|
|
51
53
|
} from '../controllers/analysisZoneV1.controllers.js';
|
|
52
54
|
|
|
53
55
|
analysisZoneRouter
|
|
@@ -179,5 +181,7 @@ analysisZoneRouter
|
|
|
179
181
|
.post( '/getNewZoneShopperBubbleChart_v1', isAllowedSessionHandler, validate( validationDtos.validateTopPerformingZonesSchema ), getNewZoneShopperBubbleChartV1 )
|
|
180
182
|
.post( '/getNewCustomerTravelZone_v1', isAllowedSessionHandler, validate( validationDtos.validateTopPerformingZonesSchema ), getNewCustomerTravelZoneV1 )
|
|
181
183
|
.post( '/getNewAnalysisZone_v1', isAllowedSessionHandler, validate( validationDtos.validateTopPerformingZonesSchema ), getNewAnalysisZoneV1 )
|
|
182
|
-
.post( '/
|
|
184
|
+
.post( '/getZoneGroupAnalysis_v1', getZoneGroupAnalysis )
|
|
185
|
+
.post( '/getOverallStoreCards_v1', isAllowedSessionHandler, validate( validationDtos.validateTopPerformingZonesSchema ), getOverallStoreCardsV1 )
|
|
186
|
+
.post( '/getViewInsights_v1', getViewInsightsV1 );
|
|
183
187
|
export default analysisZoneRouter;
|