tango-app-api-analysis-zone 3.0.0-alpha.12 → 3.0.0-alpha.14

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.12",
3
+ "version": "3.0.0-alpha.14",
4
4
  "description": "zone Analysis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -135,27 +135,30 @@ export const zoneSummaryTable = async ( req, res ) => {
135
135
  return res.sendError( { error: 'Server Error' }, 500 );
136
136
  }
137
137
 
138
- let result = [
139
- {
140
- 'storeName': 'LKST400',
141
- 'date': '2024-01-01',
142
- 'storeId': '11-10',
143
- 'zoneName': 'zone-1',
144
- 'footfallCount': 400,
145
- 'bouncedCount': 40,
146
- 'engagersCount': 60,
147
- 'impressionRate': 70.5,
148
- 'avgDwellTime': 50,
149
- 'bellow12': 30,
150
- '13-19': 50,
151
- '20-30': 40,
152
- '31-45': 20,
153
- '46-59': 30,
154
- '60 above': 60,
155
- 'maleCount': 40,
156
- 'femaleCount': 50,
157
- },
158
- ];
138
+ let result = {
139
+ 'totalCount': 300,
140
+ 'zoneSummaryData': [
141
+ {
142
+ 'storeName': 'LKST400',
143
+ 'date': '2024-01-01',
144
+ 'storeId': '11-10',
145
+ 'zoneName': 'zone-1',
146
+ 'footfallCount': 400,
147
+ 'bouncedCount': 40,
148
+ 'engagersCount': 60,
149
+ 'impressionRate': 70.5,
150
+ 'avgDwellTime': 50,
151
+ 'bellow12': 30,
152
+ '13-19': 50,
153
+ '20-30': 40,
154
+ '31-45': 20,
155
+ '46-59': 30,
156
+ '60 above': 60,
157
+ 'maleCount': 40,
158
+ 'femaleCount': 50,
159
+ },
160
+ ],
161
+ };
159
162
  return res.sendSuccess( result );
160
163
  } catch ( error ) {
161
164
  logger.error( { error: error, message: req.query, function: 'zoneSummaryTable' } );
@@ -211,39 +214,69 @@ export const zoneConcentrationSummary = async ( req, res ) => {
211
214
  return res.sendError( { error: 'Server Error' }, 500 );
212
215
  }
213
216
 
214
- let result = [
215
- {
216
- 'zoneName': 'zone-1',
217
- 'footfall': {
218
- 'zoneCount': 10,
219
- 'storeRate': 65.0,
220
- },
221
- 'impression': {
222
- 'zoneRate': 10.0,
223
- 'storeRate': 65.0,
224
- },
225
- 'bounced': {
226
- 'zoneCount': 10,
227
- 'storeRate': 65.0,
228
- },
229
- 'engagers': {
230
- 'zoneCount': 10,
231
- 'storeRate': 65.0,
232
- },
233
- 'avgDwellTime': {
234
- 'zoneAvgDwellTime': 10,
235
- 'storeAvgDwellTime': 65,
217
+ let result = {
218
+ 'zoneConcentrationData': [
219
+ {
220
+ 'zoneName': 'zone-1',
221
+ 'footfall': {
222
+ 'zoneCount': 10,
223
+ 'storeRate': 65.0,
224
+ },
225
+ 'impression': {
226
+ 'zoneRate': 10.0,
227
+ 'storeRate': 65.0,
228
+ },
229
+ 'bounced': {
230
+ 'zoneCount': 10,
231
+ 'storeRate': 65.0,
232
+ },
233
+ 'engagers': {
234
+ 'zoneCount': 10,
235
+ 'storeRate': 65.0,
236
+ },
237
+ 'avgDwellTime': {
238
+ 'zoneAvgDwellTime': 10,
239
+ 'storeAvgDwellTime': 65,
240
+ },
241
+ 'ageAnalysis': [
242
+ {
243
+ 'category': 'Below 12',
244
+ 'value': 1,
245
+ },
246
+ {
247
+ 'category': 'Age 13-19',
248
+ 'value': 1,
249
+ },
250
+ {
251
+ 'category': 'Age 20-30',
252
+ 'value': 39,
253
+ },
254
+ {
255
+ 'category': 'Age 31-45',
256
+ 'value': 40,
257
+ },
258
+ {
259
+ 'category': 'Age 46-59',
260
+ 'value': 10,
261
+ },
262
+ {
263
+ 'category': 'Above 60',
264
+ 'value': 8,
265
+ },
266
+ ],
267
+ 'genderAnalysis': [
268
+ {
269
+ 'category': 'Male',
270
+ 'value': 50,
271
+ },
272
+ {
273
+ 'category': 'Female',
274
+ 'value': 50,
275
+ },
276
+ ],
236
277
  },
237
- 'bellow-12': 30.0, // Rate
238
- '13-19': 50.0,
239
- '20-30': 40.0,
240
- '31-45': 20.0,
241
- '46-59': 30.0,
242
- '60-above': 60.0,
243
- 'maleRate': 40.0,
244
- 'femaleRate': 50.0,
245
- },
246
- ];
278
+ ],
279
+ };
247
280
  return res.sendSuccess( result );
248
281
  } catch ( error ) {
249
282
  logger.error( { error: error, message: req.query, function: 'zoneConcentrationSummary' } );
@@ -303,12 +336,20 @@ export const overallStoreConcentrationHeatmap = async ( req, res ) => {
303
336
  'overallStoreConcentrationData': {
304
337
  'ImageURLs': [
305
338
  {
306
- 'streamName': 'ABC',
307
- 'URL': 'DEFGHI',
339
+ 'streamName': 'cam1',
340
+ 'URL': 'https://devtangoretail-api.tangoeye.ai/heatmapimg1.jpeg',
341
+ },
342
+ {
343
+ 'streamName': 'cam2',
344
+ 'URL': 'https://devtangoretail-api.tangoeye.ai/heatmapimg2.jpeg',
345
+ },
346
+ {
347
+ 'streamName': 'cam3',
348
+ 'URL': 'https://devtangoretail-api.tangoeye.ai/heatmapimg3.jpeg',
308
349
  },
309
350
  {
310
- 'streamName': 'ABC-1',
311
- 'URL': 'DEFGHI-1',
351
+ 'streamName': 'cam4',
352
+ 'URL': 'https://devtangoretail-api.tangoeye.ai/heatmapimg4.jpeg',
312
353
  },
313
354
  ],
314
355
  },