tango-app-api-analysis-traffic 3.8.16-dev → 3.8.17
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,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-analysis-traffic",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.17",
|
|
4
4
|
"description": "Traffic Analysis",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"start": "nodemon --exec \"eslint --fix . && node
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node index.js\""
|
|
9
9
|
},
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=18.10.0"
|
|
@@ -1433,7 +1433,18 @@ export const summaryTableV3 = async ( req, res ) => {
|
|
|
1433
1433
|
if ( !getClientData ) {
|
|
1434
1434
|
return res.sendError( 'Invalid Client Id', 400 );
|
|
1435
1435
|
}
|
|
1436
|
-
|
|
1436
|
+
// Footfall-only view defaults to the client-level config. Store 455-26
|
|
1437
|
+
// (client 455) is an exception: when it is the only selected store it must
|
|
1438
|
+
// show the full columns, so force the footfall-only view off for it.
|
|
1439
|
+
let isFootfallView = getClientData?.featureConfigs?.isFootfallView;
|
|
1440
|
+
if (
|
|
1441
|
+
reqestData.clientId === '455' &&
|
|
1442
|
+
Array.isArray( reqestData.storeId ) &&
|
|
1443
|
+
reqestData.storeId.length === 1 &&
|
|
1444
|
+
reqestData.storeId[0] === '455-26'
|
|
1445
|
+
) {
|
|
1446
|
+
isFootfallView = false;
|
|
1447
|
+
}
|
|
1437
1448
|
reqestData.featureConfigs = getClientData.featureConfigs;
|
|
1438
1449
|
let LamdaURL = 'https://ewen2vlmxmhieea4elztlbjuey0ddqee.lambda-url.ap-south-1.on.aws/';
|
|
1439
1450
|
let resultData;
|
|
@@ -1581,7 +1592,7 @@ export const summaryTableV3 = async ( req, res ) => {
|
|
|
1581
1592
|
return res.sendError( 'No Content', 204 );
|
|
1582
1593
|
}
|
|
1583
1594
|
} else {
|
|
1584
|
-
return res.sendSuccess( resultData );
|
|
1595
|
+
return res.sendSuccess( { ...resultData, isFootfallView } );
|
|
1585
1596
|
}
|
|
1586
1597
|
} else {
|
|
1587
1598
|
return res.sendError( 'No Content', 204 );
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
2
|
import { validate, isAllowedSessionHandler, getAssinedStore } from 'tango-app-api-middleware';
|
|
3
|
+
import { isAllowedClient } from '../controllers/mobileTraffic.controllers.js';
|
|
3
4
|
import * as validationDtos from '../dtos/validation.dtos.js';
|
|
4
5
|
|
|
5
6
|
export const analysisTrafficRouter = express.Router();
|
|
@@ -117,65 +118,65 @@ analysisTrafficRouter
|
|
|
117
118
|
.post( '/headerLocations', headerLocations )
|
|
118
119
|
.post( '/headerGroups', headerGroups )
|
|
119
120
|
.post( '/headerStores', headerStores )
|
|
120
|
-
.post( '/cardsFunnel_v1', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), cardsFunnelV1 )
|
|
121
|
-
.post( '/funnel_v1', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), funnelV1 )
|
|
122
|
-
.post( '/cardsGraphs_v1', isAllowedSessionHandler, validate( validationDtos.validateCardGraphParams ), cardsGraphsV1 )
|
|
123
|
-
.post( '/recapVideo_v1', isAllowedSessionHandler, validate( validationDtos.validateRecapVideoParams ), recapVideoV1 )
|
|
124
|
-
.post( '/densityDwell_v1', isAllowedSessionHandler, validate( validationDtos.validateDensityDwellParams ), densityDwellV1 )
|
|
125
|
-
.post( '/overallCards_v1', isAllowedSessionHandler, validate( validationDtos.validateOverallCharParams ), overallCardsV1 )
|
|
126
|
-
.post( '/overallHourlyChart_v1', isAllowedSessionHandler, validate( validationDtos.validateOverallCharParams ), overallHourlyChartV1 )
|
|
127
|
-
.post( '/overallChart_v1', isAllowedSessionHandler, validate( validationDtos.validateOverallCharParams ), overallChartV1 )
|
|
128
|
-
.post( '/singleStoreChart_v1', isAllowedSessionHandler, validate( validationDtos.validateSingleStoreChartParams ), singleStoreChartV1 )
|
|
129
|
-
.post( '/demographicChart_v1', isAllowedSessionHandler, validate( validationDtos.validateDemographicChartParams ), demographicChartV1 )
|
|
130
|
-
.post( '/buyerChart_v1', isAllowedSessionHandler, validate( validationDtos.validateBuyerChartParams ), buyerChartV1 )
|
|
131
|
-
.post( '/footfallDirectoryFolders_v1', isAllowedSessionHandler, validate( validationDtos.validateFootfallDirectoryFoldersParams ), footfallDirectoryFoldersV1 )
|
|
132
|
-
.post( '/footfallDirectory_v1', isAllowedSessionHandler, validate( validationDtos.validateFootfallDirectoryParams ), footfallDirectoryV1 )
|
|
133
|
-
.post( '/summaryTable_v1', isAllowedSessionHandler, validate( validationDtos.validateSummaryTableParams ), summaryTableV1 )
|
|
134
|
-
.post( '/footfallTrend_v1', isAllowedSessionHandler, validate( validationDtos.validateFootfallTrendParams ), footfallTrendV1 )
|
|
135
|
-
.post( '/storeOperation_v1', isAllowedSessionHandler, validate( validationDtos.validateStoreOperationParams ), storeOperationV1 )
|
|
136
|
-
.post( '/performanceMatrix_v1', isAllowedSessionHandler, validate( validationDtos.validateperformanceMatrixParams ), performanceMatrixV1 )
|
|
137
|
-
.post( '/zoneDwellTimeSplit_v1', isAllowedSessionHandler, validate( validationDtos.validateStoreOperationParams ), zoneDwellTimeSplitV1 )
|
|
138
|
-
.post( '/storesMap_v1', isAllowedSessionHandler, validate( validationDtos.validateStoresMapParams ), storesMapV1 )
|
|
139
|
-
.post( '/headerLocations_v1', isAllowedSessionHandler, validate( validationDtos.validateHeaderParams ), headerLocationsV1 )
|
|
140
|
-
.post( '/headerGroups_v1', isAllowedSessionHandler, validate( validationDtos.validateHeaderParams ), headerGroupsV1 )
|
|
141
|
-
.post( '/headerStores_v1', isAllowedSessionHandler, validate( validationDtos.validateHeaderParams ), headerStoresV1 )
|
|
121
|
+
.post( '/cardsFunnel_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), cardsFunnelV1 )
|
|
122
|
+
.post( '/funnel_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), funnelV1 )
|
|
123
|
+
.post( '/cardsGraphs_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardGraphParams ), cardsGraphsV1 )
|
|
124
|
+
.post( '/recapVideo_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateRecapVideoParams ), recapVideoV1 )
|
|
125
|
+
.post( '/densityDwell_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateDensityDwellParams ), densityDwellV1 )
|
|
126
|
+
.post( '/overallCards_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateOverallCharParams ), overallCardsV1 )
|
|
127
|
+
.post( '/overallHourlyChart_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateOverallCharParams ), overallHourlyChartV1 )
|
|
128
|
+
.post( '/overallChart_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateOverallCharParams ), overallChartV1 )
|
|
129
|
+
.post( '/singleStoreChart_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateSingleStoreChartParams ), singleStoreChartV1 )
|
|
130
|
+
.post( '/demographicChart_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateDemographicChartParams ), demographicChartV1 )
|
|
131
|
+
.post( '/buyerChart_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateBuyerChartParams ), buyerChartV1 )
|
|
132
|
+
.post( '/footfallDirectoryFolders_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateFootfallDirectoryFoldersParams ), footfallDirectoryFoldersV1 )
|
|
133
|
+
.post( '/footfallDirectory_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateFootfallDirectoryParams ), footfallDirectoryV1 )
|
|
134
|
+
.post( '/summaryTable_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateSummaryTableParams ), summaryTableV1 )
|
|
135
|
+
.post( '/footfallTrend_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateFootfallTrendParams ), footfallTrendV1 )
|
|
136
|
+
.post( '/storeOperation_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateStoreOperationParams ), storeOperationV1 )
|
|
137
|
+
.post( '/performanceMatrix_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateperformanceMatrixParams ), performanceMatrixV1 )
|
|
138
|
+
.post( '/zoneDwellTimeSplit_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateStoreOperationParams ), zoneDwellTimeSplitV1 )
|
|
139
|
+
.post( '/storesMap_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateStoresMapParams ), storesMapV1 )
|
|
140
|
+
.post( '/headerLocations_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParams ), headerLocationsV1 )
|
|
141
|
+
.post( '/headerGroups_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParams ), headerGroupsV1 )
|
|
142
|
+
.post( '/headerStores_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParams ), headerStoresV1 )
|
|
142
143
|
.post( '/getMySubscription', isAllowedSessionHandler, validate( validationDtos.getMyProductParams ), getMySubscription )
|
|
143
144
|
.post( '/getStoreMapData_v1', isAllowedSessionHandler, validate( validationDtos.getStoreCameraImageParams ), getStoreMapData )
|
|
144
145
|
.post( '/getStoreMapData', isAllowedSessionHandler, validate( validationDtos.getStoreCameraImageParams ), getStoreMapDataV3 )
|
|
145
|
-
.post( '/headerStores_v2', isAllowedSessionHandler, validate( validationDtos.validateHeaderParamsv2 ), getAssinedStore, headerStoresV2 )
|
|
146
|
-
.post( '/headercluster_v2', isAllowedSessionHandler, validate( validationDtos.validateHeaderParams ), getAssinedStore, headerClustersV2 )
|
|
147
|
-
.post( '/headerLocations_v2', isAllowedSessionHandler, validate( validationDtos.validateHeaderParams ), getAssinedStore, headerLocationsV2 )
|
|
148
|
-
.post( '/cardsFunnel_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), cardsFunnelV3 )
|
|
149
|
-
.post( '/footfallCards_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), footfallCardsV3 )
|
|
150
|
-
.post( '/conversionCards_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), conversionCardsV3 )
|
|
151
|
-
.post( '/bouncedCards_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), bouncedCardsV3 )
|
|
152
|
-
.post( '/engagersCards_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), engagersCardsV3 )
|
|
153
|
-
.post( '/missedOpportunityCards_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), missedOpportunityCardsV3 )
|
|
154
|
-
.post( '/potentialBuyersCards_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), potentialBuyersCardsV3 )
|
|
155
|
-
.post( '/potentialBuyersDistributionCards_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), potentialBuyersDistributionCardsV3 )
|
|
156
|
-
.post( '/funnel_v3', isAllowedSessionHandler, validate( validationDtos.validateCardFunnelParams ), funnelV3 )
|
|
157
|
-
.post( '/cardsGraphs_v3', isAllowedSessionHandler, validate( validationDtos.validateCardGraphParams ), cardsGraphsV3 )
|
|
158
|
-
.post( '/recapVideo_v3', isAllowedSessionHandler, validate( validationDtos.validateRecapVideoParams ), recapVideoV3 )
|
|
159
|
-
.post( '/densityDwell_v3', isAllowedSessionHandler, validate( validationDtos.validateDensityDwellParams ), densityDwellV3 )
|
|
160
|
-
.post( '/trafficDensityDwell_v3', isAllowedSessionHandler, validate( validationDtos.validateDensityDwellParams ), trafficDensityDwellV3 )
|
|
161
|
-
.post( '/overallCards_v3', isAllowedSessionHandler, validate( validationDtos.validateOverallCharParams ), overallCardsV3 )
|
|
162
|
-
.post( '/overallHourlyChart_v3', isAllowedSessionHandler, validate( validationDtos.validateOverallHourlyCharParams ), overallHourlyChartV3 )
|
|
163
|
-
.post( '/overallChart_v3', isAllowedSessionHandler, validate( validationDtos.validateOverallCharParams ), overallChartV3 )
|
|
164
|
-
.post( '/singleStoreChart_v3', isAllowedSessionHandler, validate( validationDtos.validateSingleStoreChartParams ), singleStoreChartV3 )
|
|
165
|
-
.post( '/demographicChart_v3', isAllowedSessionHandler, validate( validationDtos.validateDemographicChartParams ), demographicChartV3 )
|
|
166
|
-
.post( '/buyerChart_v3', isAllowedSessionHandler, validate( validationDtos.validateBuyerChartParams ), buyerChartV3 )
|
|
167
|
-
.post( '/footfallDirectoryFolders_v3', isAllowedSessionHandler, validate( validationDtos.validateFootfallDirectoryFoldersParams ), footfallDirectoryFoldersV3 )
|
|
168
|
-
.post( '/footfallDirectory_v3', isAllowedSessionHandler, validate( validationDtos.validateFootfallDirectoryParams ), footfallDirectoryV3 )
|
|
169
|
-
.post( '/summaryTable_v3', isAllowedSessionHandler, validate( validationDtos.validateSummaryTableParams ), summaryTableV3 )
|
|
170
|
-
.post( '/footfallTrend_v3', isAllowedSessionHandler, validate( validationDtos.validateFootfallTrendParams ), footfallTrendV3 )
|
|
171
|
-
.post( '/storeOperation_v3', isAllowedSessionHandler, validate( validationDtos.validateStoreOperationParams ), storeOperationV3 )
|
|
172
|
-
.post( '/performanceMatrix_v3', isAllowedSessionHandler, validate( validationDtos.validateperformanceMatrixParams ), performanceMatrixV3 )
|
|
173
|
-
.post( '/zoneDwellTimeSplit_v3', isAllowedSessionHandler, validate( validationDtos.validateStoreOperationParams ), zoneDwellTimeSplitV3 )
|
|
174
|
-
.post( '/storesMap_v1', isAllowedSessionHandler, validate( validationDtos.validateStoresMapParams ), storesMapV1 )
|
|
146
|
+
.post( '/headerStores_v2', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParamsv2 ), getAssinedStore, headerStoresV2 )
|
|
147
|
+
.post( '/headercluster_v2', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParams ), getAssinedStore, headerClustersV2 )
|
|
148
|
+
.post( '/headerLocations_v2', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateHeaderParams ), getAssinedStore, headerLocationsV2 )
|
|
149
|
+
.post( '/cardsFunnel_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), cardsFunnelV3 )
|
|
150
|
+
.post( '/footfallCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), footfallCardsV3 )
|
|
151
|
+
.post( '/conversionCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), conversionCardsV3 )
|
|
152
|
+
.post( '/bouncedCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), bouncedCardsV3 )
|
|
153
|
+
.post( '/engagersCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), engagersCardsV3 )
|
|
154
|
+
.post( '/missedOpportunityCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), missedOpportunityCardsV3 )
|
|
155
|
+
.post( '/potentialBuyersCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), potentialBuyersCardsV3 )
|
|
156
|
+
.post( '/potentialBuyersDistributionCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), potentialBuyersDistributionCardsV3 )
|
|
157
|
+
.post( '/funnel_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardFunnelParams ), funnelV3 )
|
|
158
|
+
.post( '/cardsGraphs_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCardGraphParams ), cardsGraphsV3 )
|
|
159
|
+
.post( '/recapVideo_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateRecapVideoParams ), recapVideoV3 )
|
|
160
|
+
.post( '/densityDwell_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateDensityDwellParams ), densityDwellV3 )
|
|
161
|
+
.post( '/trafficDensityDwell_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateDensityDwellParams ), trafficDensityDwellV3 )
|
|
162
|
+
.post( '/overallCards_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateOverallCharParams ), overallCardsV3 )
|
|
163
|
+
.post( '/overallHourlyChart_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateOverallHourlyCharParams ), overallHourlyChartV3 )
|
|
164
|
+
.post( '/overallChart_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateOverallCharParams ), overallChartV3 )
|
|
165
|
+
.post( '/singleStoreChart_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateSingleStoreChartParams ), singleStoreChartV3 )
|
|
166
|
+
.post( '/demographicChart_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateDemographicChartParams ), demographicChartV3 )
|
|
167
|
+
.post( '/buyerChart_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateBuyerChartParams ), buyerChartV3 )
|
|
168
|
+
.post( '/footfallDirectoryFolders_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateFootfallDirectoryFoldersParams ), footfallDirectoryFoldersV3 )
|
|
169
|
+
.post( '/footfallDirectory_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateFootfallDirectoryParams ), footfallDirectoryV3 )
|
|
170
|
+
.post( '/summaryTable_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateSummaryTableParams ), summaryTableV3 )
|
|
171
|
+
.post( '/footfallTrend_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateFootfallTrendParams ), footfallTrendV3 )
|
|
172
|
+
.post( '/storeOperation_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateStoreOperationParams ), storeOperationV3 )
|
|
173
|
+
.post( '/performanceMatrix_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateperformanceMatrixParams ), performanceMatrixV3 )
|
|
174
|
+
.post( '/zoneDwellTimeSplit_v3', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateStoreOperationParams ), zoneDwellTimeSplitV3 )
|
|
175
|
+
.post( '/storesMap_v1', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateStoresMapParams ), storesMapV1 )
|
|
175
176
|
.post( '/headerUserEmails_v2', isAllowedSessionHandler, getUserEmails )
|
|
176
|
-
.post( '/headerCountry_v2', isAllowedSessionHandler, validate( validationDtos.validateCountryHeaderParamsv2 ), getAssinedStore, headerCountryV2 )
|
|
177
|
+
.post( '/headerCountry_v2', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateCountryHeaderParamsv2 ), getAssinedStore, headerCountryV2 )
|
|
177
178
|
.post( '/checkTodayReportStatus', isAllowedSessionHandler, checkTodayReportStatus )
|
|
178
179
|
.post( '/headerZoneV2', isAllowedSessionHandler, headerZoneV2 )
|
|
179
180
|
.post( '/trafficDensityExport_v2', managerTrafficDensityExport )
|
|
180
|
-
.post( '/get-store-list-v2', isAllowedSessionHandler, validate( validationDtos.validateGetStoreList ), getStoreListv2 );
|
|
181
|
+
.post( '/get-store-list-v2', isAllowedSessionHandler, isAllowedClient, validate( validationDtos.validateGetStoreList ), getStoreListv2 );
|
|
181
182
|
export default analysisTrafficRouter;
|