tango-app-api-analysis-zone 3.7.1-alpha.8 → 3.7.1-alpha.9
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
|
@@ -123,6 +123,8 @@ export const zoneSummaryTableV1 = async ( req, res ) => {
|
|
|
123
123
|
'Zone Name': element.zoneName,
|
|
124
124
|
'Store Name': element.storeName,
|
|
125
125
|
'Store ID': element.storeId,
|
|
126
|
+
...( element.storefootfallCount !== undefined && { 'Store FF': element.storefootfallCount } ),
|
|
127
|
+
...( element.nob !== undefined && { 'Zone Wise NoB': element.nob } ),
|
|
126
128
|
'Zone Conc.Rate': element.concentrationRate,
|
|
127
129
|
'Avg Dwell Time (Mins)': element.avgDwellTime,
|
|
128
130
|
'Zone FF': element.footfallCount,
|
|
@@ -904,4 +906,118 @@ export const getSelectedZoneFFV2 = async ( req, res ) => {
|
|
|
904
906
|
};
|
|
905
907
|
|
|
906
908
|
// end v2 API's for pantprojects//
|
|
909
|
+
// pant New Api start date 19-12-2025
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
export const getNewHoTColdZoneV1 = async ( req, res ) => {
|
|
913
|
+
try {
|
|
914
|
+
let reqestData = req.body;
|
|
915
|
+
let LamdaURL = 'https://j7e5uxgkna6qnuu4vip57kl2wu0pqxza.lambda-url.ap-south-1.on.aws/';
|
|
916
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
917
|
+
if ( resultData ) {
|
|
918
|
+
return res.sendSuccess( resultData );
|
|
919
|
+
} else {
|
|
920
|
+
return res.sendError( 'No Content', 204 );
|
|
921
|
+
}
|
|
922
|
+
} catch ( error ) {
|
|
923
|
+
logger.error( { error: error, message: req.query, function: 'getNewHoTColdZoneV1' } );
|
|
924
|
+
return res.sendError( { error: error }, 500 );
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
export const getNewZoneShopperAnalysisV1 = async ( req, res ) => {
|
|
929
|
+
try {
|
|
930
|
+
let reqestData = req.body;
|
|
931
|
+
let LamdaURL = 'https://sekueyolczfjl2ggy4hadzxxxu0zqcmt.lambda-url.ap-south-1.on.aws/';
|
|
932
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
933
|
+
if ( resultData ) {
|
|
934
|
+
if ( resultData.status_code == '200' ) {
|
|
935
|
+
return res.sendSuccess( resultData );
|
|
936
|
+
} else {
|
|
937
|
+
return res.sendError( 'No Content', 204 );
|
|
938
|
+
}
|
|
939
|
+
} else {
|
|
940
|
+
return res.sendError( 'No Content', 204 );
|
|
941
|
+
}
|
|
942
|
+
} catch ( error ) {
|
|
943
|
+
logger.error( { error: error, message: req.query, function: 'getNewZoneShopperAnalysisV1' } );
|
|
944
|
+
return res.sendError( { error: error }, 500 );
|
|
945
|
+
}
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
export const getNewZoneShopperBubbleChartV1 = async ( req, res ) => {
|
|
949
|
+
try {
|
|
950
|
+
let reqestData = req.body;
|
|
951
|
+
let LamdaURL = 'https://iqh6vcxtdxeszpfgdenhsrnvwq0rseou.lambda-url.ap-south-1.on.aws/';
|
|
952
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
953
|
+
if ( resultData ) {
|
|
954
|
+
if ( resultData.status_code == '200' ) {
|
|
955
|
+
return res.sendSuccess( resultData );
|
|
956
|
+
} else {
|
|
957
|
+
return res.sendError( 'No Content', 204 );
|
|
958
|
+
}
|
|
959
|
+
} else {
|
|
960
|
+
return res.sendError( 'No Content', 204 );
|
|
961
|
+
}
|
|
962
|
+
} catch ( error ) {
|
|
963
|
+
logger.error( { error: error, message: req.query, function: 'getNewZoneShopperBubbleChartV1' } );
|
|
964
|
+
return res.sendError( { error: error }, 500 );
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
|
|
968
|
+
export const getNewCustomerTravelZoneV1 = async ( req, res ) => {
|
|
969
|
+
try {
|
|
970
|
+
let reqestData = req.body;
|
|
971
|
+
let LamdaURL = 'https://id7qgpex6qbft4kcnloqdrby2q0hyldr.lambda-url.ap-south-1.on.aws/';
|
|
972
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
973
|
+
if ( resultData ) {
|
|
974
|
+
if ( resultData.status_code == '200' ) {
|
|
975
|
+
return res.sendSuccess( resultData );
|
|
976
|
+
} else {
|
|
977
|
+
return res.sendError( 'No Content', 204 );
|
|
978
|
+
}
|
|
979
|
+
} else {
|
|
980
|
+
return res.sendError( 'No Content', 204 );
|
|
981
|
+
}
|
|
982
|
+
} catch ( error ) {
|
|
983
|
+
logger.error( { error: error, message: req.query, function: 'getNewCustomerTravelZoneV1' } );
|
|
984
|
+
return res.sendError( { error: error }, 500 );
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
|
|
988
|
+
export const getNewAnalysisZoneV1 = async ( req, res ) => {
|
|
989
|
+
try {
|
|
990
|
+
let reqestData = req.body;
|
|
991
|
+
let LamdaURL = 'https://udcada6kh2bpchpgmigky4bxee0drhwb.lambda-url.ap-south-1.on.aws/';
|
|
992
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
993
|
+
if ( resultData ) {
|
|
994
|
+
return res.sendSuccess( resultData );
|
|
995
|
+
} else {
|
|
996
|
+
return res.sendError( 'No Content', 204 );
|
|
997
|
+
}
|
|
998
|
+
} catch ( error ) {
|
|
999
|
+
logger.error( { error: error, message: req.query, function: 'getNewAnalysisZoneV1' } );
|
|
1000
|
+
return res.sendError( { error: error }, 500 );
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
1003
|
+
|
|
1004
|
+
export const getOverallStoreCardsV1 = async ( req, res ) => {
|
|
1005
|
+
try {
|
|
1006
|
+
let reqestData = req.body;
|
|
1007
|
+
let LamdaURL = 'https://fdeqsx2kouac3n4wodmczoxyke0xpikn.lambda-url.ap-south-1.on.aws/';
|
|
1008
|
+
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
1009
|
+
if ( resultData ) {
|
|
1010
|
+
if ( resultData.status_code == '200' ) {
|
|
1011
|
+
return res.sendSuccess( resultData );
|
|
1012
|
+
} else {
|
|
1013
|
+
return res.sendError( 'No Content', 204 );
|
|
1014
|
+
}
|
|
1015
|
+
} else {
|
|
1016
|
+
return res.sendError( 'No Content', 204 );
|
|
1017
|
+
}
|
|
1018
|
+
} catch ( error ) {
|
|
1019
|
+
logger.error( { error: error, message: req.query, function: 'getOverallStoreCardsV1' } );
|
|
1020
|
+
return res.sendError( { error: error }, 500 );
|
|
1021
|
+
}
|
|
1022
|
+
};
|
|
907
1023
|
|
|
@@ -42,6 +42,12 @@ import {
|
|
|
42
42
|
getNewZoneFFV2,
|
|
43
43
|
getSelectedZoneFFV2,
|
|
44
44
|
getZoneAPIFFV2,
|
|
45
|
+
getNewHoTColdZoneV1,
|
|
46
|
+
getNewZoneShopperAnalysisV1,
|
|
47
|
+
getNewZoneShopperBubbleChartV1,
|
|
48
|
+
getNewCustomerTravelZoneV1,
|
|
49
|
+
getNewAnalysisZoneV1,
|
|
50
|
+
getOverallStoreCardsV1,
|
|
45
51
|
} from '../controllers/analysisZoneV1.controllers.js';
|
|
46
52
|
|
|
47
53
|
analysisZoneRouter
|
|
@@ -167,5 +173,11 @@ analysisZoneRouter
|
|
|
167
173
|
|
|
168
174
|
.post( '/getNewZoneFF_v2', getNewZoneFFV2 )
|
|
169
175
|
.post( '/getSelectedZoneFF_v2', getSelectedZoneFFV2 )
|
|
170
|
-
.post( '/getZoneAPI_v2', getZoneAPIFFV2 )
|
|
176
|
+
.post( '/getZoneAPI_v2', getZoneAPIFFV2 )
|
|
177
|
+
.post( '/getNewHoTColdZone_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateTopPerformingZonesSchema ), getNewHoTColdZoneV1 )
|
|
178
|
+
.post( '/getNewZoneShopperAnalysis_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateTopPerformingZonesSchema ), getNewZoneShopperAnalysisV1 )
|
|
179
|
+
.post( '/getNewZoneShopperBubbleChart_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateTopPerformingZonesSchema ), getNewZoneShopperBubbleChartV1 )
|
|
180
|
+
.post( '/getNewCustomerTravelZone_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateTopPerformingZonesSchema ), getNewCustomerTravelZoneV1 )
|
|
181
|
+
.post( '/getNewAnalysisZone_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateTopPerformingZonesSchema ), getNewAnalysisZoneV1 )
|
|
182
|
+
.post( '/getOverallStoreCards_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateTopPerformingZonesSchema ), getOverallStoreCardsV1 );
|
|
171
183
|
export default analysisZoneRouter;
|