tango-app-api-trax 3.7.50 → 3.7.52
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-trax",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.52",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"mongodb": "^6.8.0",
|
|
28
28
|
"nodemon": "^3.1.4",
|
|
29
29
|
"path": "^0.12.7",
|
|
30
|
-
"tango-api-schema": "^2.5.
|
|
30
|
+
"tango-api-schema": "^2.5.59",
|
|
31
31
|
"tango-app-api-middleware": "^3.5.2",
|
|
32
32
|
"url": "^0.11.4",
|
|
33
33
|
"winston": "^3.13.1",
|
|
@@ -307,7 +307,7 @@ export async function PCLconfigCreation( req, res ) {
|
|
|
307
307
|
},
|
|
308
308
|
} );
|
|
309
309
|
let getSections = await CLquestions.aggregate( sectionQuery );
|
|
310
|
-
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', '
|
|
310
|
+
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) {
|
|
311
311
|
if ( getSections.length ) {
|
|
312
312
|
for ( let element3 of getSections ) {
|
|
313
313
|
let collectQuestions = {};
|
|
@@ -631,11 +631,11 @@ export async function PCLconfigCreation( req, res ) {
|
|
|
631
631
|
// }
|
|
632
632
|
}
|
|
633
633
|
} else {
|
|
634
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring',
|
|
634
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) {
|
|
635
635
|
let storeNameList = allQuestion.map( ( item ) => item.store_id );
|
|
636
|
-
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
636
|
+
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
637
637
|
let storeList = storeDetails.map( ( store ) => store.storeId );
|
|
638
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ].includes( getCLconfig.checkListType ) ) {
|
|
638
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) {
|
|
639
639
|
allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
|
|
640
640
|
} else {
|
|
641
641
|
allQuestion = storeDetails.map( ( item ) => {
|
|
@@ -669,7 +669,7 @@ export async function PCLconfigCreation( req, res ) {
|
|
|
669
669
|
client_id: getCLconfig.client_id,
|
|
670
670
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
|
|
671
671
|
};
|
|
672
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ].includes( getCLconfig.checkListType ) ) {
|
|
672
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ,'queuealert'].includes( getCLconfig.checkListType ) ) {
|
|
673
673
|
let processData = {
|
|
674
674
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
|
|
675
675
|
return { storeName: store.storeName, storeId: store.store_id, events: store.events };
|
|
@@ -910,7 +910,7 @@ async function insertData( requestData ) {
|
|
|
910
910
|
},
|
|
911
911
|
} );
|
|
912
912
|
let getSections = await CLquestions.aggregate( sectionQuery );
|
|
913
|
-
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring',
|
|
913
|
+
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) {
|
|
914
914
|
if ( getSections.length ) {
|
|
915
915
|
for ( let element3 of getSections ) {
|
|
916
916
|
let collectQuestions = {};
|
|
@@ -1205,11 +1205,11 @@ async function insertData( requestData ) {
|
|
|
1205
1205
|
// }
|
|
1206
1206
|
}
|
|
1207
1207
|
} else {
|
|
1208
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring',
|
|
1208
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ,'queuealert'].includes( getCLconfig.checkListType ) ) {
|
|
1209
1209
|
let storeNameList = allQuestion.map( ( item ) => item.store_id );
|
|
1210
|
-
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
1210
|
+
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
1211
1211
|
let storeList = storeDetails.map( ( store ) => store.storeId );
|
|
1212
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ].includes( getCLconfig.checkListType ) ) {
|
|
1212
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) {
|
|
1213
1213
|
allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
|
|
1214
1214
|
} else {
|
|
1215
1215
|
allQuestion = storeDetails.map( ( item ) => {
|
|
@@ -1243,7 +1243,7 @@ async function insertData( requestData ) {
|
|
|
1243
1243
|
client_id: getCLconfig.client_id,
|
|
1244
1244
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
|
|
1245
1245
|
};
|
|
1246
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ].includes( getCLconfig.checkListType ) ) {
|
|
1246
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( getCLconfig.checkListType ) ) {
|
|
1247
1247
|
let processData = {
|
|
1248
1248
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
|
|
1249
1249
|
return { storeName: store.storeName, storeId: store.store_id, events: store.events };
|
|
@@ -4093,7 +4093,7 @@ async function updateOpenSearch( user, data ) {
|
|
|
4093
4093
|
export const aiChecklist = async ( req, res ) => {
|
|
4094
4094
|
try {
|
|
4095
4095
|
let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
|
|
4096
|
-
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', '
|
|
4096
|
+
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'boxalert', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ];
|
|
4097
4097
|
let checklistDetails = [];
|
|
4098
4098
|
let publishList = [];
|
|
4099
4099
|
let unpublishList = [];
|
|
@@ -4106,7 +4106,7 @@ export const aiChecklist = async ( req, res ) => {
|
|
|
4106
4106
|
checklistDetails = [ ...publishList, ...unpublishList ];
|
|
4107
4107
|
|
|
4108
4108
|
checklistDetails.forEach( ( item ) => {
|
|
4109
|
-
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering' ].includes( item.checkListType ) ) {
|
|
4109
|
+
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering','queuealert' ].includes( item.checkListType ) ) {
|
|
4110
4110
|
item.storeCount = storeDetails;
|
|
4111
4111
|
}
|
|
4112
4112
|
} );
|