tango-app-api-analysis-zone 3.0.0-alpha.16 → 3.0.0-alpha.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,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-analysis-zone",
3
- "version": "3.0.0-alpha.16",
3
+ "version": "3.0.0-alpha.17",
4
4
  "description": "zone Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -22,26 +22,26 @@ export const zonecards = async ( req, res ) => {
22
22
  let result = {
23
23
  'card': {
24
24
  'footfall': {
25
- 'count': 100, // Store Footfall Count
25
+ 'count': 2067, // Store Footfall Count
26
26
  'zoneName': 'Entry', // highest Zone Footfall
27
- 'zoneFootfallCount': 40,
27
+ 'zoneFootfallCount': 1234,
28
28
  },
29
29
  'impression': {
30
- 'rate': 89.5, // Store impression rate
31
- 'zoneName': 'EXit', // highest Impression(Concentration)
32
- 'zoneImpressionRate': 40.0,
30
+ 'rate': 65, // Store impression rate
31
+ 'zoneName': 'Vincent Chase', // highest Impression(Concentration)
32
+ 'zoneImpressionRate': 32,
33
33
  },
34
34
  'bounced': {
35
- 'rate': 89.5, // Store bounced rate
36
- 'zoneName': 'EXit', // highest Bounced
35
+ 'rate': 56, // Store bounced rate
36
+ 'zoneName': 'John Jacobs', // highest Bounced
37
37
  },
38
38
  'engagers': {
39
- 'rate': 89.5, // Store engagers rate
40
- 'zoneName': 'EXit', // highest Engagers
39
+ 'rate': 89, // Store engagers rate
40
+ 'zoneName': 'Air', // highest Engagers
41
41
  },
42
42
  'avgDwellTime': {
43
- 'rate': 89.5, // Store avgDwellTime rate
44
- 'zoneName': 'EXit', // highest Average Dwell Time
43
+ 'rate': 57, // Store avgDwellTime rate
44
+ 'zoneName': 'Exit', // highest Average Dwell Time
45
45
  },
46
46
  },
47
47
  };
@@ -71,11 +71,11 @@ export const topPerformingZones = async ( req, res ) => {
71
71
 
72
72
  let result = {
73
73
  'topPerformingZones': [
74
- { 'zoneName': 'zone-0', 'footfallCount': 100, 'bouncedCount': 40, 'engagersCount': 30, 'impressionRate': 50.0 },
75
- { 'zoneName': 'zone-0', 'footfallCount': 98, 'bouncedCount': 38, 'engagersCount': 28, 'impressionRate': 48.5 },
76
- { 'zoneName': 'zone-0', 'footfallCount': 96, 'bouncedCount': 36, 'engagersCount': 26, 'impressionRate': 46.5 },
77
- { 'zoneName': 'zone-0', 'footfallCount': 94, 'bouncedCount': 34, 'engagersCount': 24, 'impressionRate': 44.5 },
78
- { 'zoneName': 'zone-0', 'footfallCount': 92, 'bouncedCount': 32, 'engagersCount': 22, 'impressionRate': 42.5 },
74
+ { 'zoneName': 'Entry', 'footfallCount': 100, 'bouncedCount': 40, 'engagersCount': 30, 'impressionRate': 50 },
75
+ { 'zoneName': 'John Jacobs', 'footfallCount': 98, 'bouncedCount': 38, 'engagersCount': 28, 'impressionRate': 48 },
76
+ { 'zoneName': 'Vincent Chase', 'footfallCount': 96, 'bouncedCount': 36, 'engagersCount': 26, 'impressionRate': 46 },
77
+ { 'zoneName': 'Air', 'footfallCount': 94, 'bouncedCount': 34, 'engagersCount': 24, 'impressionRate': 44 },
78
+ { 'zoneName': 'Exit', 'footfallCount': 92, 'bouncedCount': 32, 'engagersCount': 22, 'impressionRate': 42 },
79
79
  ],
80
80
  };
81
81
  return res.sendSuccess( result );
@@ -104,11 +104,11 @@ export const topPerformingStores = async ( req, res ) => {
104
104
 
105
105
  let result = {
106
106
  'topPerformingStores': [
107
- { 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': 'zone-0', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
108
- { 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': 'zone-1', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
109
- { 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': 'zone-2', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
110
- { 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': 'zone-3', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
111
- { 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': 'zone-4', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
107
+ { 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': 'Entry', 'zoneFootfallCount': 90, 'impressionRate': 40, 'avgDwellTime': 39 },
108
+ { 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': 'John Jacobs', 'zoneFootfallCount': 30, 'impressionRate': 30, 'avgDwellTime': 128 },
109
+ { 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': 'Vincent Chase', 'zoneFootfallCount': 50, 'impressionRate': 60, 'avgDwellTime': 35 },
110
+ { 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': 'Air', 'zoneFootfallCount': 70, 'impressionRate': 44, 'avgDwellTime': 33 },
111
+ { 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': 'Exit', 'zoneFootfallCount': 40, 'impressionRate': 48, 'avgDwellTime': 24 },
112
112
  ],
113
113
  };
114
114
  return res.sendSuccess( result );
@@ -142,7 +142,7 @@ export const zoneSummaryTable = async ( req, res ) => {
142
142
  'storeName': 'LKST400',
143
143
  'date': '2024-01-01',
144
144
  'storeId': '11-10',
145
- 'zoneName': 'zone-1',
145
+ 'zoneName': 'John Jacobs',
146
146
  'footfallCount': 400,
147
147
  'bouncedCount': 40,
148
148
  'engagersCount': 60,
@@ -157,6 +157,177 @@ export const zoneSummaryTable = async ( req, res ) => {
157
157
  'maleCount': 40,
158
158
  'femaleCount': 50,
159
159
  },
160
+ {
161
+ 'storeName': 'LKST400',
162
+ 'date': '2024-01-01',
163
+ 'storeId': '11-10',
164
+ 'zoneName': 'Vincent Chase',
165
+ 'footfallCount': 400,
166
+ 'bouncedCount': 40,
167
+ 'engagersCount': 60,
168
+ 'impressionRate': 70.5,
169
+ 'avgDwellTime': 50,
170
+ 'bellow12': 30,
171
+ '13-19': 50,
172
+ '20-30': 40,
173
+ '31-45': 20,
174
+ '46-59': 30,
175
+ '60 above': 60,
176
+ 'maleCount': 40,
177
+ 'femaleCount': 50,
178
+ },
179
+ {
180
+ 'storeName': 'LKST400',
181
+ 'date': '2024-01-01',
182
+ 'storeId': '11-10',
183
+ 'zoneName': 'Vincent Chase',
184
+ 'footfallCount': 400,
185
+ 'bouncedCount': 40,
186
+ 'engagersCount': 60,
187
+ 'impressionRate': 70.5,
188
+ 'avgDwellTime': 50,
189
+ 'bellow12': 30,
190
+ '13-19': 50,
191
+ '20-30': 40,
192
+ '31-45': 20,
193
+ '46-59': 30,
194
+ '60 above': 60,
195
+ 'maleCount': 40,
196
+ 'femaleCount': 50,
197
+ },
198
+ {
199
+ 'storeName': 'LKST400',
200
+ 'date': '2024-01-01',
201
+ 'storeId': '11-10',
202
+ 'zoneName': 'Entry',
203
+ 'footfallCount': 400,
204
+ 'bouncedCount': 40,
205
+ 'engagersCount': 60,
206
+ 'impressionRate': 70.5,
207
+ 'avgDwellTime': 50,
208
+ 'bellow12': 30,
209
+ '13-19': 50,
210
+ '20-30': 40,
211
+ '31-45': 20,
212
+ '46-59': 30,
213
+ '60 above': 60,
214
+ 'maleCount': 40,
215
+ 'femaleCount': 50,
216
+ },
217
+ {
218
+ 'storeName': 'LKST400',
219
+ 'date': '2024-01-01',
220
+ 'storeId': '11-10',
221
+ 'zoneName': 'Exit',
222
+ 'footfallCount': 400,
223
+ 'bouncedCount': 40,
224
+ 'engagersCount': 60,
225
+ 'impressionRate': 70.5,
226
+ 'avgDwellTime': 50,
227
+ 'bellow12': 30,
228
+ '13-19': 50,
229
+ '20-30': 40,
230
+ '31-45': 20,
231
+ '46-59': 30,
232
+ '60 above': 60,
233
+ 'maleCount': 40,
234
+ 'femaleCount': 50,
235
+ },
236
+ {
237
+ 'storeName': 'LKST400',
238
+ 'date': '2024-01-01',
239
+ 'storeId': '11-10',
240
+ 'zoneName': 'Exit',
241
+ 'footfallCount': 400,
242
+ 'bouncedCount': 40,
243
+ 'engagersCount': 60,
244
+ 'impressionRate': 70.5,
245
+ 'avgDwellTime': 50,
246
+ 'bellow12': 30,
247
+ '13-19': 50,
248
+ '20-30': 40,
249
+ '31-45': 20,
250
+ '46-59': 30,
251
+ '60 above': 60,
252
+ 'maleCount': 40,
253
+ 'femaleCount': 50,
254
+ },
255
+ {
256
+ 'storeName': 'LKST400',
257
+ 'date': '2024-01-01',
258
+ 'storeId': '11-10',
259
+ 'zoneName': 'John Jacobs',
260
+ 'footfallCount': 400,
261
+ 'bouncedCount': 40,
262
+ 'engagersCount': 60,
263
+ 'impressionRate': 70.5,
264
+ 'avgDwellTime': 50,
265
+ 'bellow12': 30,
266
+ '13-19': 50,
267
+ '20-30': 40,
268
+ '31-45': 20,
269
+ '46-59': 30,
270
+ '60 above': 60,
271
+ 'maleCount': 40,
272
+ 'femaleCount': 50,
273
+ },
274
+ {
275
+ 'storeName': 'LKST400',
276
+ 'date': '2024-01-01',
277
+ 'storeId': '11-10',
278
+ 'zoneName': 'John Jacobs',
279
+ 'footfallCount': 400,
280
+ 'bouncedCount': 40,
281
+ 'engagersCount': 60,
282
+ 'impressionRate': 70.5,
283
+ 'avgDwellTime': 50,
284
+ 'bellow12': 30,
285
+ '13-19': 50,
286
+ '20-30': 40,
287
+ '31-45': 20,
288
+ '46-59': 30,
289
+ '60 above': 60,
290
+ 'maleCount': 40,
291
+ 'femaleCount': 50,
292
+ },
293
+ {
294
+ 'storeName': 'LKST400',
295
+ 'date': '2024-01-01',
296
+ 'storeId': '11-10',
297
+ 'zoneName': 'Air',
298
+ 'footfallCount': 400,
299
+ 'bouncedCount': 40,
300
+ 'engagersCount': 60,
301
+ 'impressionRate': 70.5,
302
+ 'avgDwellTime': 50,
303
+ 'bellow12': 30,
304
+ '13-19': 50,
305
+ '20-30': 40,
306
+ '31-45': 20,
307
+ '46-59': 30,
308
+ '60 above': 60,
309
+ 'maleCount': 40,
310
+ 'femaleCount': 50,
311
+ },
312
+ {
313
+ 'storeName': 'LKST400',
314
+ 'date': '2024-01-01',
315
+ 'storeId': '11-10',
316
+ 'zoneName': 'Air',
317
+ 'footfallCount': 400,
318
+ 'bouncedCount': 40,
319
+ 'engagersCount': 60,
320
+ 'impressionRate': 70.5,
321
+ 'avgDwellTime': 50,
322
+ 'bellow12': 30,
323
+ '13-19': 50,
324
+ '20-30': 40,
325
+ '31-45': 20,
326
+ '46-59': 30,
327
+ '60 above': 60,
328
+ 'maleCount': 40,
329
+ 'femaleCount': 50,
330
+ }
160
331
  ],
161
332
  };
162
333
  return res.sendSuccess( result );
@@ -185,9 +356,13 @@ export const availableZoneNames = async ( req, res ) => {
185
356
 
186
357
  let result = {
187
358
  'availableZoneData': [
188
- { 'zoneName': 'zone-1' },
189
- { 'zoneName': 'zone-2' },
190
- { 'zoneName': 'zone-3' },
359
+ { 'zoneName': 'Overall Zones' },
360
+ { 'zoneName': 'Entrance' },
361
+ { 'zoneName': 'Vincent Chase' },
362
+ { 'zoneName': 'John Jacobs' },
363
+ { 'zoneName': 'Premium Section' },
364
+ { 'zoneName': 'Billing' },
365
+ { 'zoneName': 'Entrance/Exit' },
191
366
  ],
192
367
  };
193
368
  return res.sendSuccess( result );
@@ -217,7 +392,7 @@ export const zoneConcentrationSummary = async ( req, res ) => {
217
392
  let result = {
218
393
  'zoneConcentrationData': [
219
394
  {
220
- 'zoneName': 'zone-1',
395
+ 'zoneName': 'Overall Zones',
221
396
  'footfall': {
222
397
  'zoneCount': 10,
223
398
  'storeRate': 65.0,
@@ -22,26 +22,26 @@ export const zonecards = async ( req, res ) => {
22
22
  let result = {
23
23
  'card': {
24
24
  'footfall': {
25
- 'count': 100, // Store Footfall Count
25
+ 'count': 2067, // Store Footfall Count
26
26
  'zoneName': 'Entry', // highest Zone Footfall
27
- 'zoneFootfallCount': 40,
27
+ 'zoneFootfallCount': 1234,
28
28
  },
29
29
  'impression': {
30
- 'rate': 89.5, // Store impression rate
31
- 'zoneName': 'EXit', // highest Impression(Concentration)
32
- 'zoneImpressionRate': 40.0,
30
+ 'rate': 65, // Store impression rate
31
+ 'zoneName': 'Vincent Chase', // highest Impression(Concentration)
32
+ 'zoneImpressionRate': 32,
33
33
  },
34
34
  'bounced': {
35
- 'rate': 89.5, // Store bounced rate
36
- 'zoneName': 'EXit', // highest Bounced
35
+ 'rate': 56, // Store bounced rate
36
+ 'zoneName': 'John Jacobs', // highest Bounced
37
37
  },
38
38
  'engagers': {
39
- 'rate': 89.5, // Store engagers rate
40
- 'zoneName': 'EXit', // highest Engagers
39
+ 'rate': 89, // Store engagers rate
40
+ 'zoneName': 'Air', // highest Engagers
41
41
  },
42
42
  'avgDwellTime': {
43
- 'rate': 89.5, // Store avgDwellTime rate
44
- 'zoneName': 'EXit', // highest Average Dwell Time
43
+ 'rate': 57, // Store avgDwellTime rate
44
+ 'zoneName': 'Exit', // highest Average Dwell Time
45
45
  },
46
46
  },
47
47
  };
@@ -71,11 +71,11 @@ export const topPerformingZones = async ( req, res ) => {
71
71
 
72
72
  let result = {
73
73
  'topPerformingZones': [
74
- { 'zoneName': 'zone-0', 'footfallCount': 100, 'bouncedCount': 40, 'engagersCount': 30, 'impressionRate': 50.0 },
75
- { 'zoneName': 'zone-0', 'footfallCount': 98, 'bouncedCount': 38, 'engagersCount': 28, 'impressionRate': 48.5 },
76
- { 'zoneName': 'zone-0', 'footfallCount': 96, 'bouncedCount': 36, 'engagersCount': 26, 'impressionRate': 46.5 },
77
- { 'zoneName': 'zone-0', 'footfallCount': 94, 'bouncedCount': 34, 'engagersCount': 24, 'impressionRate': 44.5 },
78
- { 'zoneName': 'zone-0', 'footfallCount': 92, 'bouncedCount': 32, 'engagersCount': 22, 'impressionRate': 42.5 },
74
+ { 'zoneName': 'Entry', 'footfallCount': 100, 'bouncedCount': 40, 'engagersCount': 30, 'impressionRate': 50 },
75
+ { 'zoneName': 'John Jacobs', 'footfallCount': 98, 'bouncedCount': 38, 'engagersCount': 28, 'impressionRate': 48 },
76
+ { 'zoneName': 'Vincent Chase', 'footfallCount': 96, 'bouncedCount': 36, 'engagersCount': 26, 'impressionRate': 46 },
77
+ { 'zoneName': 'Air', 'footfallCount': 94, 'bouncedCount': 34, 'engagersCount': 24, 'impressionRate': 44 },
78
+ { 'zoneName': 'Exit', 'footfallCount': 92, 'bouncedCount': 32, 'engagersCount': 22, 'impressionRate': 42 },
79
79
  ],
80
80
  };
81
81
  return res.sendSuccess( result );
@@ -104,11 +104,11 @@ export const topPerformingStores = async ( req, res ) => {
104
104
 
105
105
  let result = {
106
106
  'topPerformingStores': [
107
- { 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': 'zone-0', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
108
- { 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': 'zone-1', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
109
- { 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': 'zone-2', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
110
- { 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': 'zone-3', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
111
- { 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': 'zone-4', 'zoneFootfallCount': 90, 'impressionRate': 40.4, 'avgDwellTime': 39.9 },
107
+ { 'storeName': 'LKST11-300', 'storeId': '11-300', 'zoneName': 'Entry', 'zoneFootfallCount': 90, 'impressionRate': 40, 'avgDwellTime': 39 },
108
+ { 'storeName': 'LKST11-301', 'storeId': '11-301', 'zoneName': 'John Jacobs', 'zoneFootfallCount': 30, 'impressionRate': 30, 'avgDwellTime': 128 },
109
+ { 'storeName': 'LKST11-302', 'storeId': '11-302', 'zoneName': 'Vincent Chase', 'zoneFootfallCount': 50, 'impressionRate': 60, 'avgDwellTime': 35 },
110
+ { 'storeName': 'LKST11-303', 'storeId': '11-303', 'zoneName': 'Air', 'zoneFootfallCount': 70, 'impressionRate': 44, 'avgDwellTime': 33 },
111
+ { 'storeName': 'LKST11-304', 'storeId': '11-304', 'zoneName': 'Exit', 'zoneFootfallCount': 40, 'impressionRate': 48, 'avgDwellTime': 24 },
112
112
  ],
113
113
  };
114
114
  return res.sendSuccess( result );
@@ -117,7 +117,6 @@ export const topPerformingStores = async ( req, res ) => {
117
117
  return res.sendError( { error: error }, 500 );
118
118
  }
119
119
  };
120
-
121
120
  export const zoneConcentrationSummary = async ( req, res ) => {
122
121
  try {
123
122
  let reqestData = req.body;
@@ -139,7 +138,7 @@ export const zoneConcentrationSummary = async ( req, res ) => {
139
138
  let result = {
140
139
  'zoneConcentrationData': [
141
140
  {
142
- 'zoneName': 'zone-1',
141
+ 'zoneName': 'Overall Zones',
143
142
  'footfall': {
144
143
  'zoneCount': 10,
145
144
  'storeRate': 65.0,