tango-app-api-analysis-traffic 3.0.0-alpha.20 → 3.0.0-alpha.22
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
|
@@ -144,27 +144,6 @@ export const overallCardsV1 = async ( req, res ) => {
|
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
export const overallHourlyChartV1 = async ( req, res ) => {
|
|
148
|
-
try {
|
|
149
|
-
let reqestData = req.body;
|
|
150
|
-
reqestData.hourFormat = 12;
|
|
151
|
-
let LamdaURL = 'https://p3xcs56mkjj4sfugvsibhyto3i0gdbda.lambda-url.ap-south-1.on.aws/';
|
|
152
|
-
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
153
|
-
if ( resultData ) {
|
|
154
|
-
if ( resultData.status_code == '200' ) {
|
|
155
|
-
return res.sendSuccess( resultData );
|
|
156
|
-
} else {
|
|
157
|
-
return res.sendError( 'No Content', 204 );
|
|
158
|
-
}
|
|
159
|
-
} else {
|
|
160
|
-
return res.sendError( 'No Content', 204 );
|
|
161
|
-
}
|
|
162
|
-
} catch ( error ) {
|
|
163
|
-
logger.error( { error: error, message: req.query, function: 'cardsFunnelV1' } );
|
|
164
|
-
return res.sendError( { error: error }, 500 );
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
|
|
168
147
|
export const overallChartV1 = async ( req, res ) => {
|
|
169
148
|
try {
|
|
170
149
|
let reqestData = req.body;
|
|
@@ -286,26 +265,6 @@ export const footfallDirectoryV1 = async ( req, res ) => {
|
|
|
286
265
|
}
|
|
287
266
|
};
|
|
288
267
|
|
|
289
|
-
export const footfallTrendV1 = async ( req, res ) => {
|
|
290
|
-
try {
|
|
291
|
-
let reqestData = req.body;
|
|
292
|
-
let LamdaURL = 'https://l5uacls7kfyham5d7pd3i6c6pq0pflem.lambda-url.ap-south-1.on.aws/';
|
|
293
|
-
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
294
|
-
if ( resultData ) {
|
|
295
|
-
if ( resultData.status_code == '200' ) {
|
|
296
|
-
return res.sendSuccess( resultData );
|
|
297
|
-
} else {
|
|
298
|
-
return res.sendError( 'No Content', 204 );
|
|
299
|
-
}
|
|
300
|
-
} else {
|
|
301
|
-
return res.sendError( 'No Content', 204 );
|
|
302
|
-
}
|
|
303
|
-
} catch ( error ) {
|
|
304
|
-
logger.error( { error: error, message: req.query, function: 'cardsFunnelV1' } );
|
|
305
|
-
return res.sendError( { error: error }, 500 );
|
|
306
|
-
}
|
|
307
|
-
};
|
|
308
|
-
|
|
309
268
|
export const storeOperationV1 = async ( req, res ) => {
|
|
310
269
|
try {
|
|
311
270
|
let reqestData = req.body;
|
|
@@ -326,26 +285,6 @@ export const storeOperationV1 = async ( req, res ) => {
|
|
|
326
285
|
}
|
|
327
286
|
};
|
|
328
287
|
|
|
329
|
-
export const performanceMatrixV1 = async ( req, res ) => {
|
|
330
|
-
try {
|
|
331
|
-
let reqestData = req.body;
|
|
332
|
-
let LamdaURL = 'https://5l3pjpivqpyboludmbridailpu0axrov.lambda-url.ap-south-1.on.aws/';
|
|
333
|
-
let resultData = await LamdaServiceCall( LamdaURL, reqestData );
|
|
334
|
-
if ( resultData ) {
|
|
335
|
-
if ( resultData.status_code == '200' ) {
|
|
336
|
-
return res.sendSuccess( resultData );
|
|
337
|
-
} else {
|
|
338
|
-
return res.sendError( 'No Content', 204 );
|
|
339
|
-
}
|
|
340
|
-
} else {
|
|
341
|
-
return res.sendError( 'No Content', 204 );
|
|
342
|
-
}
|
|
343
|
-
} catch ( error ) {
|
|
344
|
-
logger.error( { error: error, message: req.query, function: 'performanceMatrixV1' } );
|
|
345
|
-
return res.sendError( { error: error }, 500 );
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
|
|
349
288
|
export const zoneDwellTimeSplitV1 = async ( req, res ) => {
|
|
350
289
|
try {
|
|
351
290
|
let reqestData = req.body;
|
|
@@ -6,12 +6,12 @@ const baseSchema = {
|
|
|
6
6
|
storeId: joi.array().required().empty(),
|
|
7
7
|
fromDate: joi.string().required(),
|
|
8
8
|
toDate: joi.string().required(),
|
|
9
|
+
valueType: joi.string().optional().allow( '' ),
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
// Schema for Card Funnel
|
|
12
13
|
export const validateCardFunnelSchema = joi.object( {
|
|
13
14
|
...baseSchema,
|
|
14
|
-
valueType: joi.string().required(),
|
|
15
15
|
} );
|
|
16
16
|
|
|
17
17
|
export const validateCardFunnelParams = {
|
|
@@ -21,7 +21,6 @@ export const validateCardFunnelParams = {
|
|
|
21
21
|
// Schema for Card Graph (extends baseSchema with additional fields)
|
|
22
22
|
export const validateCardGraphSchema = joi.object( {
|
|
23
23
|
...baseSchema,
|
|
24
|
-
valueType: joi.string().required(),
|
|
25
24
|
dateType: joi.string().required(),
|
|
26
25
|
} );
|
|
27
26
|
|
|
@@ -149,7 +148,7 @@ export const validateFootfallTrendSchema = joi.object( {
|
|
|
149
148
|
...baseSchema,
|
|
150
149
|
dateType: joi.string().required(),
|
|
151
150
|
filterBy: joi.string().required(),
|
|
152
|
-
processType: joi.string().
|
|
151
|
+
processType: joi.string().optional().allow( '' ),
|
|
153
152
|
forecast: joi.boolean().optional(),
|
|
154
153
|
limit: joi.number().required(),
|
|
155
154
|
offset: joi.number().required(),
|
|
@@ -8,15 +8,12 @@ import {
|
|
|
8
8
|
recapVideoV1,
|
|
9
9
|
densityDwellV1,
|
|
10
10
|
overallCardsV1,
|
|
11
|
-
overallHourlyChartV1,
|
|
12
11
|
overallChartV1,
|
|
13
12
|
singleStoreChartV1,
|
|
14
13
|
demographicChartV1,
|
|
15
14
|
footfallDirectoryFoldersV1,
|
|
16
15
|
footfallDirectoryV1,
|
|
17
|
-
footfallTrendV1,
|
|
18
16
|
storeOperationV1,
|
|
19
|
-
performanceMatrixV1,
|
|
20
17
|
zoneDwellTimeSplitV1,
|
|
21
18
|
isAllowedClient,
|
|
22
19
|
getMySubscription,
|
|
@@ -25,163 +22,81 @@ import {
|
|
|
25
22
|
|
|
26
23
|
mobileTrafficAnalysisRouter
|
|
27
24
|
.post( '/cardsFunnel_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
28
|
-
|
|
29
25
|
userType: [ 'tango', 'client' ], access: [
|
|
30
|
-
|
|
31
26
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
32
|
-
|
|
33
27
|
],
|
|
34
|
-
|
|
35
28
|
} ), validate( validationDtos.validateCardFunnelParams ), cardsFunnelV1 )
|
|
36
29
|
|
|
37
30
|
.post( '/cardsGraphs_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
38
|
-
|
|
39
31
|
userType: [ 'tango', 'client' ], access: [
|
|
40
|
-
|
|
41
32
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
42
|
-
|
|
43
33
|
],
|
|
44
|
-
|
|
45
34
|
} ), validate( validationDtos.validateCardGraphParams ), cardsGraphsV1 )
|
|
46
35
|
|
|
47
36
|
.post( '/recapVideo_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
48
|
-
|
|
49
37
|
userType: [ 'tango', 'client' ], access: [
|
|
50
|
-
|
|
51
38
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
52
|
-
|
|
53
39
|
],
|
|
54
|
-
|
|
55
40
|
} ), validate( validationDtos.validateRecapVideoParams ), recapVideoV1 )
|
|
56
41
|
|
|
57
42
|
.post( '/densityDwell_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
58
|
-
|
|
59
43
|
userType: [ 'tango', 'client' ], access: [
|
|
60
|
-
|
|
61
44
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
62
|
-
|
|
63
45
|
],
|
|
64
|
-
|
|
65
46
|
} ), validate( validationDtos.validateDensityDwellParams ), densityDwellV1 )
|
|
66
47
|
|
|
67
48
|
.post( '/overallCards_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
68
|
-
|
|
69
49
|
userType: [ 'tango', 'client' ], access: [
|
|
70
|
-
|
|
71
50
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
72
|
-
|
|
73
51
|
],
|
|
74
|
-
|
|
75
52
|
} ), validate( validationDtos.validateOverallCharParams ), overallCardsV1 )
|
|
76
53
|
|
|
77
|
-
.post( '/overallHourlyChart_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
78
|
-
|
|
79
|
-
userType: [ 'tango', 'client' ], access: [
|
|
80
|
-
|
|
81
|
-
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
82
|
-
|
|
83
|
-
],
|
|
84
|
-
|
|
85
|
-
} ), validate( validationDtos.validateOverallCharParams ), overallHourlyChartV1 )
|
|
86
|
-
|
|
87
54
|
.post( '/overallChart_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
88
|
-
|
|
89
55
|
userType: [ 'tango', 'client' ], access: [
|
|
90
|
-
|
|
91
56
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
92
|
-
|
|
93
57
|
],
|
|
94
|
-
|
|
95
58
|
} ), validate( validationDtos.validateOverallCharParams ), overallChartV1 )
|
|
96
59
|
|
|
97
60
|
.post( '/singleStoreChart_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
98
|
-
|
|
99
61
|
userType: [ 'tango', 'client' ], access: [
|
|
100
|
-
|
|
101
62
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
102
|
-
|
|
103
63
|
],
|
|
104
|
-
|
|
105
64
|
} ), validate( validationDtos.validateSingleStoreChartParams ), singleStoreChartV1 )
|
|
106
65
|
|
|
107
66
|
.post( '/demographicChart_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
108
|
-
|
|
109
67
|
userType: [ 'tango', 'client' ], access: [
|
|
110
|
-
|
|
111
68
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
112
|
-
|
|
113
69
|
],
|
|
114
|
-
|
|
115
70
|
} ), validate( validationDtos.validateDemographicChartParams ), demographicChartV1 )
|
|
116
71
|
|
|
117
72
|
.post( '/buyerChart_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
118
|
-
|
|
119
73
|
userType: [ 'tango', 'client' ], access: [
|
|
120
|
-
|
|
121
74
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
122
|
-
|
|
123
75
|
],
|
|
124
|
-
|
|
125
76
|
} ), validate( validationDtos.validateBuyerChartParams ), buyerChartV1 )
|
|
126
77
|
|
|
127
78
|
.post( '/footfallDirectoryFolders_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
128
|
-
|
|
129
79
|
userType: [ 'tango', 'client' ], access: [
|
|
130
|
-
|
|
131
80
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
132
|
-
|
|
133
81
|
],
|
|
134
|
-
|
|
135
82
|
} ), validate( validationDtos.validateFootfallDirectoryFoldersParams ), footfallDirectoryFoldersV1 )
|
|
136
83
|
|
|
137
84
|
.post( '/footfallDirectory_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
138
|
-
|
|
139
85
|
userType: [ 'tango', 'client' ], access: [
|
|
140
|
-
|
|
141
86
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
142
|
-
|
|
143
87
|
],
|
|
144
|
-
|
|
145
88
|
} ), validate( validationDtos.validateFootfallDirectoryParams ), footfallDirectoryV1 )
|
|
146
89
|
|
|
147
|
-
.post( '/footfallTrend_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
148
|
-
|
|
149
|
-
userType: [ 'tango', 'client' ], access: [
|
|
150
|
-
|
|
151
|
-
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
152
|
-
|
|
153
|
-
],
|
|
154
|
-
|
|
155
|
-
} ), validate( validationDtos.validateFootfallTrendParams ), footfallTrendV1 )
|
|
156
|
-
|
|
157
90
|
.post( '/storeOperation_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
158
|
-
|
|
159
91
|
userType: [ 'tango', 'client' ], access: [
|
|
160
|
-
|
|
161
92
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
162
|
-
|
|
163
93
|
],
|
|
164
|
-
|
|
165
94
|
} ), validate( validationDtos.validateStoreOperationParams ), storeOperationV1 )
|
|
166
95
|
|
|
167
|
-
.post( '/performanceMatrix_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
168
|
-
|
|
169
|
-
userType: [ 'tango', 'client' ], access: [
|
|
170
|
-
|
|
171
|
-
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
172
|
-
|
|
173
|
-
],
|
|
174
|
-
|
|
175
|
-
} ), validate( validationDtos.validateperformanceMatrixParams ), performanceMatrixV1 )
|
|
176
|
-
|
|
177
96
|
.post( '/zoneDwellTimeSplit_v1', isAllowedSessionHandler, isAllowedClient, authorize( {
|
|
178
|
-
|
|
179
97
|
userType: [ 'tango', 'client' ], access: [
|
|
180
|
-
|
|
181
98
|
{ featureName: 'analytics', name: 'tangoTraffic', permissions: [ 'isView' ] },
|
|
182
|
-
|
|
183
99
|
],
|
|
184
|
-
|
|
185
100
|
} ), validate( validationDtos.validateStoreOperationParams ), zoneDwellTimeSplitV1 )
|
|
186
101
|
|
|
187
102
|
.post( '/getMySubscription_v1', isAllowedSessionHandler, validate( validationDtos.getMyProductParams ), getMySubscription );
|