tango-app-api-trax 3.9.32 → 3.9.34
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 +2 -2
- package/src/controllers/gallery.controller.js +0 -2
- package/src/controllers/internalTrax.controller.js +5 -5
- package/src/controllers/teaxFlag.controller.js +5 -5
- package/src/controllers/trax.controller.js +7 -2
- package/src/services/app.service.js +20 -20
- package/src/services/approver.service.js +28 -28
- package/src/services/authentication.service.js +12 -12
- package/src/services/camera.service.js +24 -24
- package/src/services/checklist.service.js +39 -36
- package/src/services/checklistAssign.service.js +44 -44
- package/src/services/checklistQuestion.service.js +40 -40
- package/src/services/checklistlog.service.js +40 -40
- package/src/services/clientRequest.service.js +12 -12
- package/src/services/cluster.service.js +36 -36
- package/src/services/domain.service.js +33 -33
- package/src/services/download.services.js +48 -48
- package/src/services/group.service.js +28 -28
- package/src/services/lenskartEmployeeMapping.service.js +20 -20
- package/src/services/locus.service.js +41 -41
- package/src/services/notification.service.js +40 -40
- package/src/services/otp.service.js +24 -24
- package/src/services/planogram.service.js +12 -12
- package/src/services/processedTaskConfig.service.js +40 -40
- package/src/services/processedTaskList.service.js +36 -36
- package/src/services/processedchecklist.services.js +56 -56
- package/src/services/processedchecklistconfig.services.js +40 -40
- package/src/services/recurringFlagTracker.service.js +40 -40
- package/src/services/runAIFeatures.services.js +36 -36
- package/src/services/runAIRequest.services.js +44 -44
- package/src/services/store.service.js +36 -36
- package/src/services/tagging.service.js +12 -12
- package/src/services/taskConfig.service.js +40 -40
- package/src/services/teams.service.js +41 -41
- package/src/services/ticket.service.js +20 -20
- package/src/services/user.service.js +32 -32
- package/src/services/userAssignedstores.service.js +17 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-trax",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.34",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"path": "^0.12.7",
|
|
31
31
|
"puppeteer": "^24.39.1",
|
|
32
32
|
"swagger-ui-express": "^5.0.1",
|
|
33
|
-
"tango-api-schema": "^2.6.
|
|
33
|
+
"tango-api-schema": "^2.6.17",
|
|
34
34
|
"tango-app-api-middleware": "^3.5.2",
|
|
35
35
|
"url": "^0.11.4",
|
|
36
36
|
"winston": "^3.13.1",
|
|
@@ -271,7 +271,6 @@ export const checklistDropdown = async ( req, res ) => {
|
|
|
271
271
|
if ( !getTotalCount.length ) {
|
|
272
272
|
return res.sendError( { error: 'No Data Found' }, 204 );
|
|
273
273
|
}
|
|
274
|
-
|
|
275
274
|
if ( requestData.sortColumnName && requestData.sortColumnName != '' && requestData.sortBy && requestData.sortBy != '' ) {
|
|
276
275
|
findQuery.push( { $sort: { [requestData.sortColumnName]: requestData.sortBy } } );
|
|
277
276
|
} else {
|
|
@@ -279,7 +278,6 @@ export const checklistDropdown = async ( req, res ) => {
|
|
|
279
278
|
}
|
|
280
279
|
|
|
281
280
|
let getChecklistData = await processedchecklistconfigService.aggregate( findQuery );
|
|
282
|
-
|
|
283
281
|
let AiCheklist = getChecklistData.filter( ( data ) => data.checkListType != 'custom' );
|
|
284
282
|
let CustomCheklist = getChecklistData.filter( ( data ) => data.checkListType == 'custom' );
|
|
285
283
|
|
|
@@ -931,7 +931,7 @@ async function insertData( requestData ) {
|
|
|
931
931
|
},
|
|
932
932
|
} );
|
|
933
933
|
let getSections = await CLquestions.aggregate( sectionQuery );
|
|
934
|
-
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection' ].includes( getCLconfig.checkListType ) ) {
|
|
934
|
+
if ( getSections.length || [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
935
935
|
if ( getSections.length ) {
|
|
936
936
|
for ( let element3 of getSections ) {
|
|
937
937
|
let collectQuestions = {};
|
|
@@ -1226,11 +1226,11 @@ async function insertData( requestData ) {
|
|
|
1226
1226
|
// }
|
|
1227
1227
|
}
|
|
1228
1228
|
} else {
|
|
1229
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection' ].includes( getCLconfig.checkListType ) ) {
|
|
1229
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1230
1230
|
let storeNameList = allQuestion.map( ( item ) => item.store_id );
|
|
1231
|
-
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
1231
|
+
let storeDetails = await storeService.find( { clientId: getCLconfig.client_id, status: 'active', ...( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) ? { storeId: { $in: storeNameList } } : {} }, { storeId: 1 } );
|
|
1232
1232
|
let storeList = storeDetails.map( ( store ) => store.storeId );
|
|
1233
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection' ].includes( getCLconfig.checkListType ) ) {
|
|
1233
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1234
1234
|
allQuestion = allQuestion.filter( ( ele ) => storeList.includes( ele?.store_id ) );
|
|
1235
1235
|
} else {
|
|
1236
1236
|
allQuestion = storeDetails.map( ( item ) => {
|
|
@@ -1264,7 +1264,7 @@ async function insertData( requestData ) {
|
|
|
1264
1264
|
client_id: getCLconfig.client_id,
|
|
1265
1265
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => store.store_id ) : [],
|
|
1266
1266
|
};
|
|
1267
|
-
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection' ].includes( getCLconfig.checkListType ) ) {
|
|
1267
|
+
if ( [ 'storeopenandclose', 'mobileusagedetection', 'uniformdetection', 'customerunattended', 'staffleftinthemiddle', 'scrum', 'cleaning', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'employeemonitoring' ].includes( getCLconfig.checkListType ) ) {
|
|
1268
1268
|
let processData = {
|
|
1269
1269
|
aiStoreList: allQuestion.length ? allQuestion.map( ( store ) => {
|
|
1270
1270
|
return { storeName: store.storeName, storeId: store.store_id, events: store.events };
|
|
@@ -608,7 +608,7 @@ export const flagCardsV1 = async ( req, res ) => {
|
|
|
608
608
|
{
|
|
609
609
|
client_id: clientId,
|
|
610
610
|
publish: true,
|
|
611
|
-
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection' ] },
|
|
611
|
+
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'employeemonitoring' ] },
|
|
612
612
|
},
|
|
613
613
|
{ checkListType: 1 },
|
|
614
614
|
);
|
|
@@ -2747,7 +2747,7 @@ export const checklistDropdownV1 = async ( req, res ) => {
|
|
|
2747
2747
|
$or: [
|
|
2748
2748
|
{ questionFlag: { $gte: 1 } },
|
|
2749
2749
|
{ timeFlag: { $gte: 1 } },
|
|
2750
|
-
{ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'vehicle_check_in' ] } },
|
|
2750
|
+
{ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'vehicle_check_in', 'employeemonitoring' ] } },
|
|
2751
2751
|
{
|
|
2752
2752
|
runAIQuestionCount: { $gte: 1 },
|
|
2753
2753
|
},
|
|
@@ -2949,7 +2949,7 @@ export const flagComparisonCardsV2 = async ( req, res ) => {
|
|
|
2949
2949
|
{
|
|
2950
2950
|
client_id: requestData.clientId,
|
|
2951
2951
|
publish: true,
|
|
2952
|
-
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection' ] },
|
|
2952
|
+
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'employeemonitoring' ] },
|
|
2953
2953
|
},
|
|
2954
2954
|
{ checkListType: 1 },
|
|
2955
2955
|
);
|
|
@@ -3051,7 +3051,7 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
3051
3051
|
}
|
|
3052
3052
|
|
|
3053
3053
|
if ( requestData?.filter === 'all' ) {
|
|
3054
|
-
findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'vehicle_check_in' ] } } ] } );
|
|
3054
|
+
findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'vehicle_check_in', 'employeemonitoring' ] } } ] } );
|
|
3055
3055
|
} else if ( requestData?.filter === 'question' ) {
|
|
3056
3056
|
findAndQuery.push( { checkListType: 'custom' } );
|
|
3057
3057
|
findAndQuery.push( { questionFlag: { $gte: 1 } } );
|
|
@@ -3059,7 +3059,7 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
3059
3059
|
findAndQuery.push( { checkListType: 'custom' } );
|
|
3060
3060
|
findAndQuery.push( { timeFlag: { $gte: 1 } } );
|
|
3061
3061
|
} else if ( requestData?.filter === 'detection' ) {
|
|
3062
|
-
findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'vehicle_check_in' ] } } );
|
|
3062
|
+
findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring', 'unattendeddetection', 'vehicle_check_in', 'employeemonitoring' ] } } );
|
|
3063
3063
|
} else if ( requestData?.filter === 'runAI' ) {
|
|
3064
3064
|
if ( req.body.runAIChecklistName ) {
|
|
3065
3065
|
findAndQuery.push( { checkListName: { $in: req.body.runAIChecklistName } } );
|
|
@@ -616,6 +616,11 @@ export const zoneList = async ( req, res ) => {
|
|
|
616
616
|
'Retail Shelf Monitoring',
|
|
617
617
|
'Store Mopping Compliance Checklist',
|
|
618
618
|
'Occupancy Detection',
|
|
619
|
+
'Unattended Detection',
|
|
620
|
+
'Employee Monitoring',
|
|
621
|
+
'Customer Unattended',
|
|
622
|
+
|
|
623
|
+
|
|
619
624
|
];
|
|
620
625
|
const allowedChecklistsStreams = [
|
|
621
626
|
'Camera Angle Change Compliance',
|
|
@@ -4137,7 +4142,7 @@ async function updateOpenSearch( user, data ) {
|
|
|
4137
4142
|
export const aiChecklist = async ( req, res ) => {
|
|
4138
4143
|
try {
|
|
4139
4144
|
let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
|
|
4140
|
-
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'occupancydetection' ];
|
|
4145
|
+
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'occupancydetection', 'employeemonitoring' ];
|
|
4141
4146
|
let checklistDetails = [];
|
|
4142
4147
|
let publishList = [];
|
|
4143
4148
|
let unpublishList = [];
|
|
@@ -4150,7 +4155,7 @@ export const aiChecklist = async ( req, res ) => {
|
|
|
4150
4155
|
checklistDetails = [ ...publishList, ...unpublishList ];
|
|
4151
4156
|
|
|
4152
4157
|
checklistDetails.forEach( ( item ) => {
|
|
4153
|
-
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'storehygienemonitoring' ].includes( item.checkListType ) ) {
|
|
4158
|
+
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'unattendeddetection', 'storehygienemonitoring', 'employeemonitoring' ].includes( item.checkListType ) ) {
|
|
4154
4159
|
item.storeCount = storeDetails;
|
|
4155
4160
|
}
|
|
4156
4161
|
} );
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import model from 'tango-api-schema';
|
|
2
|
-
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
-
|
|
4
|
-
const _methods = {
|
|
5
|
-
async aggregate( query ={} ) {
|
|
6
|
-
return model.appVersionModel.aggregate( query );
|
|
7
|
-
},
|
|
8
|
-
async updateOne( query, record ) {
|
|
9
|
-
return model.appVersionModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
10
|
-
},
|
|
11
|
-
async findOne( query ={}, field={} ) {
|
|
12
|
-
return model.appVersionModel.findOne( query, field );
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const _svc = createLoggableService( _methods, 'appversions' );
|
|
17
|
-
|
|
18
|
-
export const aggregate = ( ...args ) => _svc.aggregate( ...args );
|
|
19
|
-
export const updateOne = ( ...args ) => _svc.updateOne( ...args );
|
|
20
|
-
export const findOne
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
+
|
|
4
|
+
const _methods = {
|
|
5
|
+
async aggregate( query ={} ) {
|
|
6
|
+
return model.appVersionModel.aggregate( query );
|
|
7
|
+
},
|
|
8
|
+
async updateOne( query, record ) {
|
|
9
|
+
return model.appVersionModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
10
|
+
},
|
|
11
|
+
async findOne( query ={}, field={} ) {
|
|
12
|
+
return model.appVersionModel.findOne( query, field );
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const _svc = createLoggableService( _methods, 'appversions' );
|
|
17
|
+
|
|
18
|
+
export const aggregate = ( ...args ) => _svc.aggregate( ...args );
|
|
19
|
+
export const updateOne = ( ...args ) => _svc.updateOne( ...args );
|
|
20
|
+
export const findOne = ( ...args ) => _svc.findOne( ...args );
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import model from 'tango-api-schema';
|
|
2
|
-
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
-
|
|
4
|
-
const _methods = {
|
|
5
|
-
async create( data ) {
|
|
6
|
-
return model.traxApproverModel.create( data );
|
|
7
|
-
},
|
|
8
|
-
async updateMany( query={}, record={} ) {
|
|
9
|
-
return model.traxApproverModel.updateMany( query, { $set: record } );
|
|
10
|
-
},
|
|
11
|
-
async insertMany( data = [] ) {
|
|
12
|
-
return model.traxApproverModel.insertMany( data );
|
|
13
|
-
},
|
|
14
|
-
async find( query ={}, field={} ) {
|
|
15
|
-
return model.traxApproverModel.find( query, field );
|
|
16
|
-
},
|
|
17
|
-
async findOne( query ={}, field={} ) {
|
|
18
|
-
return model.traxApproverModel.findOne( query, field );
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const _svc = createLoggableService( _methods, 'approvers' );
|
|
23
|
-
|
|
24
|
-
export const create
|
|
25
|
-
export const updateMany = ( ...args ) => _svc.updateMany( ...args );
|
|
26
|
-
export const insertMany = ( ...args ) => _svc.insertMany( ...args );
|
|
27
|
-
export const find
|
|
28
|
-
export const findOne
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
+
|
|
4
|
+
const _methods = {
|
|
5
|
+
async create( data ) {
|
|
6
|
+
return model.traxApproverModel.create( data );
|
|
7
|
+
},
|
|
8
|
+
async updateMany( query={}, record={} ) {
|
|
9
|
+
return model.traxApproverModel.updateMany( query, { $set: record } );
|
|
10
|
+
},
|
|
11
|
+
async insertMany( data = [] ) {
|
|
12
|
+
return model.traxApproverModel.insertMany( data );
|
|
13
|
+
},
|
|
14
|
+
async find( query ={}, field={} ) {
|
|
15
|
+
return model.traxApproverModel.find( query, field );
|
|
16
|
+
},
|
|
17
|
+
async findOne( query ={}, field={} ) {
|
|
18
|
+
return model.traxApproverModel.findOne( query, field );
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const _svc = createLoggableService( _methods, 'approvers' );
|
|
23
|
+
|
|
24
|
+
export const create = ( ...args ) => _svc.create( ...args );
|
|
25
|
+
export const updateMany = ( ...args ) => _svc.updateMany( ...args );
|
|
26
|
+
export const insertMany = ( ...args ) => _svc.insertMany( ...args );
|
|
27
|
+
export const find = ( ...args ) => _svc.find( ...args );
|
|
28
|
+
export const findOne = ( ...args ) => _svc.findOne( ...args );
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import authenticationModel from 'tango-api-schema/schema/authentication.model.js';
|
|
2
|
-
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
-
|
|
4
|
-
const _methods = {
|
|
5
|
-
async create( data ) {
|
|
6
|
-
return authenticationModel.create( data );
|
|
7
|
-
},
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
const _svc = createLoggableService( _methods, 'authentications' );
|
|
11
|
-
|
|
12
|
-
export const create = ( ...args ) => _svc.create( ...args );
|
|
1
|
+
import authenticationModel from 'tango-api-schema/schema/authentication.model.js';
|
|
2
|
+
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
+
|
|
4
|
+
const _methods = {
|
|
5
|
+
async create( data ) {
|
|
6
|
+
return authenticationModel.create( data );
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const _svc = createLoggableService( _methods, 'authentications' );
|
|
11
|
+
|
|
12
|
+
export const create = ( ...args ) => _svc.create( ...args );
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import model from 'tango-api-schema';
|
|
2
|
-
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
-
|
|
4
|
-
const _methods = {
|
|
5
|
-
async aggregate( query ={} ) {
|
|
6
|
-
return model.cameraModel.aggregate( query );
|
|
7
|
-
},
|
|
8
|
-
async updateOne( query, record ) {
|
|
9
|
-
return model.cameraModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
10
|
-
},
|
|
11
|
-
async findOne( query ={}, field={} ) {
|
|
12
|
-
return model.cameraModel.findOne( query, field );
|
|
13
|
-
},
|
|
14
|
-
async find( query ={}, field={} ) {
|
|
15
|
-
return model.cameraModel.find( query, field );
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const _svc = createLoggableService( _methods, 'cameras' );
|
|
20
|
-
|
|
21
|
-
export const aggregate = ( ...args ) => _svc.aggregate( ...args );
|
|
22
|
-
export const updateOne = ( ...args ) => _svc.updateOne( ...args );
|
|
23
|
-
export const findOne
|
|
24
|
-
export const find
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
+
|
|
4
|
+
const _methods = {
|
|
5
|
+
async aggregate( query ={} ) {
|
|
6
|
+
return model.cameraModel.aggregate( query );
|
|
7
|
+
},
|
|
8
|
+
async updateOne( query, record ) {
|
|
9
|
+
return model.cameraModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
10
|
+
},
|
|
11
|
+
async findOne( query ={}, field={} ) {
|
|
12
|
+
return model.cameraModel.findOne( query, field );
|
|
13
|
+
},
|
|
14
|
+
async find( query ={}, field={} ) {
|
|
15
|
+
return model.cameraModel.find( query, field );
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const _svc = createLoggableService( _methods, 'cameras' );
|
|
20
|
+
|
|
21
|
+
export const aggregate = ( ...args ) => _svc.aggregate( ...args );
|
|
22
|
+
export const updateOne = ( ...args ) => _svc.updateOne( ...args );
|
|
23
|
+
export const findOne = ( ...args ) => _svc.findOne( ...args );
|
|
24
|
+
export const find = ( ...args ) => _svc.find( ...args );
|
|
@@ -1,36 +1,39 @@
|
|
|
1
|
-
import model from 'tango-api-schema';
|
|
2
|
-
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
-
|
|
4
|
-
const _methods = {
|
|
5
|
-
async findOne( query={}, field={} ) {
|
|
6
|
-
return model.checklistconfigModel.findOne( query, field );
|
|
7
|
-
},
|
|
8
|
-
async find( query={}, field={} ) {
|
|
9
|
-
return model.checklistconfigModel.find( query, field );
|
|
10
|
-
},
|
|
11
|
-
async create( document = {} ) {
|
|
12
|
-
return model.checklistconfigModel.create( document );
|
|
13
|
-
},
|
|
14
|
-
async deleteOne( query = {} ) {
|
|
15
|
-
return model.checklistconfigModel.deleteOne( query );
|
|
16
|
-
},
|
|
17
|
-
async updateOne( query = {}, record={} ) {
|
|
18
|
-
return model.checklistconfigModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
19
|
-
},
|
|
20
|
-
async updateMany( query = {}, record={} ) {
|
|
21
|
-
return model.checklistconfigModel.updateMany( query, { $set: record } );
|
|
22
|
-
},
|
|
23
|
-
async aggregate( query = {} ) {
|
|
24
|
-
return model.checklistconfigModel.aggregate( query )
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
+
|
|
4
|
+
const _methods = {
|
|
5
|
+
async findOne( query={}, field={} ) {
|
|
6
|
+
return model.checklistconfigModel.findOne( query, field );
|
|
7
|
+
},
|
|
8
|
+
async find( query={}, field={} ) {
|
|
9
|
+
return model.checklistconfigModel.find( query, field );
|
|
10
|
+
},
|
|
11
|
+
async create( document = {} ) {
|
|
12
|
+
return model.checklistconfigModel.create( document );
|
|
13
|
+
},
|
|
14
|
+
async deleteOne( query = {} ) {
|
|
15
|
+
return model.checklistconfigModel.deleteOne( query );
|
|
16
|
+
},
|
|
17
|
+
async updateOne( query = {}, record={} ) {
|
|
18
|
+
return model.checklistconfigModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
19
|
+
},
|
|
20
|
+
async updateMany( query = {}, record={} ) {
|
|
21
|
+
return model.checklistconfigModel.updateMany( query, { $set: record } );
|
|
22
|
+
},
|
|
23
|
+
async aggregate( query = {} ) {
|
|
24
|
+
return model.checklistconfigModel.aggregate( query ).collation( {
|
|
25
|
+
locale: 'en_US',
|
|
26
|
+
numericOrdering: true,
|
|
27
|
+
} ); ;
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const _svc = createLoggableService( _methods, 'checklists' );
|
|
32
|
+
|
|
33
|
+
export const findOne = ( ...args ) => _svc.findOne( ...args );
|
|
34
|
+
export const find = ( ...args ) => _svc.find( ...args );
|
|
35
|
+
export const create = ( ...args ) => _svc.create( ...args );
|
|
36
|
+
export const deleteOne = ( ...args ) => _svc.deleteOne( ...args );
|
|
37
|
+
export const updateOne = ( ...args ) => _svc.updateOne( ...args );
|
|
38
|
+
export const updateMany = ( ...args ) => _svc.updateMany( ...args );
|
|
39
|
+
export const aggregate = ( ...args ) => _svc.aggregate( ...args );
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import model from 'tango-api-schema';
|
|
2
|
-
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
-
|
|
4
|
-
const _methods = {
|
|
5
|
-
async find( query={}, field={} ) {
|
|
6
|
-
return model.checklistassignconfigModel.find( query, field );
|
|
7
|
-
},
|
|
8
|
-
async findOne( query={}, field={} ) {
|
|
9
|
-
return model.checklistassignconfigModel.findOne( query, field );
|
|
10
|
-
},
|
|
11
|
-
async create( document = {} ) {
|
|
12
|
-
return model.checklistassignconfigModel.create( document );
|
|
13
|
-
},
|
|
14
|
-
async insertMany( document = {} ) {
|
|
15
|
-
return model.checklistassignconfigModel.insertMany( document );
|
|
16
|
-
},
|
|
17
|
-
async deleteMany( document = {} ) {
|
|
18
|
-
return model.checklistassignconfigModel.deleteMany( document );
|
|
19
|
-
},
|
|
20
|
-
async updateMany( query = {}, record={} ) {
|
|
21
|
-
return model.checklistassignconfigModel.updateMany( query, { $set: record } );
|
|
22
|
-
},
|
|
23
|
-
async updateOne( query = {}, record={} ) {
|
|
24
|
-
return model.checklistassignconfigModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
25
|
-
},
|
|
26
|
-
async aggregate( query = {} ) {
|
|
27
|
-
return model.checklistassignconfigModel.aggregate( query );
|
|
28
|
-
},
|
|
29
|
-
async count( query = {} ) {
|
|
30
|
-
return model.checklistassignconfigModel.countDocuments( query );
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const _svc = createLoggableService( _methods, 'checklistassigns' );
|
|
35
|
-
|
|
36
|
-
export const find
|
|
37
|
-
export const findOne
|
|
38
|
-
export const create
|
|
39
|
-
export const insertMany = ( ...args ) => _svc.insertMany( ...args );
|
|
40
|
-
export const deleteMany = ( ...args ) => _svc.deleteMany( ...args );
|
|
41
|
-
export const updateMany = ( ...args ) => _svc.updateMany( ...args );
|
|
42
|
-
export const updateOne
|
|
43
|
-
export const aggregate
|
|
44
|
-
export const count
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
+
|
|
4
|
+
const _methods = {
|
|
5
|
+
async find( query={}, field={} ) {
|
|
6
|
+
return model.checklistassignconfigModel.find( query, field );
|
|
7
|
+
},
|
|
8
|
+
async findOne( query={}, field={} ) {
|
|
9
|
+
return model.checklistassignconfigModel.findOne( query, field );
|
|
10
|
+
},
|
|
11
|
+
async create( document = {} ) {
|
|
12
|
+
return model.checklistassignconfigModel.create( document );
|
|
13
|
+
},
|
|
14
|
+
async insertMany( document = {} ) {
|
|
15
|
+
return model.checklistassignconfigModel.insertMany( document );
|
|
16
|
+
},
|
|
17
|
+
async deleteMany( document = {} ) {
|
|
18
|
+
return model.checklistassignconfigModel.deleteMany( document );
|
|
19
|
+
},
|
|
20
|
+
async updateMany( query = {}, record={} ) {
|
|
21
|
+
return model.checklistassignconfigModel.updateMany( query, { $set: record } );
|
|
22
|
+
},
|
|
23
|
+
async updateOne( query = {}, record={} ) {
|
|
24
|
+
return model.checklistassignconfigModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
25
|
+
},
|
|
26
|
+
async aggregate( query = {} ) {
|
|
27
|
+
return model.checklistassignconfigModel.aggregate( query );
|
|
28
|
+
},
|
|
29
|
+
async count( query = {} ) {
|
|
30
|
+
return model.checklistassignconfigModel.countDocuments( query );
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const _svc = createLoggableService( _methods, 'checklistassigns' );
|
|
35
|
+
|
|
36
|
+
export const find = ( ...args ) => _svc.find( ...args );
|
|
37
|
+
export const findOne = ( ...args ) => _svc.findOne( ...args );
|
|
38
|
+
export const create = ( ...args ) => _svc.create( ...args );
|
|
39
|
+
export const insertMany = ( ...args ) => _svc.insertMany( ...args );
|
|
40
|
+
export const deleteMany = ( ...args ) => _svc.deleteMany( ...args );
|
|
41
|
+
export const updateMany = ( ...args ) => _svc.updateMany( ...args );
|
|
42
|
+
export const updateOne = ( ...args ) => _svc.updateOne( ...args );
|
|
43
|
+
export const aggregate = ( ...args ) => _svc.aggregate( ...args );
|
|
44
|
+
export const count = ( ...args ) => _svc.count( ...args );
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import model from 'tango-api-schema';
|
|
2
|
-
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
-
|
|
4
|
-
const _methods = {
|
|
5
|
-
async find( query={}, field={} ) {
|
|
6
|
-
return model.checklistquestionconfigModel.find( query, field );
|
|
7
|
-
},
|
|
8
|
-
async findOne( query={}, field={} ) {
|
|
9
|
-
return model.checklistquestionconfigModel.findOne( query, field );
|
|
10
|
-
},
|
|
11
|
-
async create( document = {} ) {
|
|
12
|
-
return model.checklistquestionconfigModel.create( document );
|
|
13
|
-
},
|
|
14
|
-
async insertMany( document = {} ) {
|
|
15
|
-
return model.checklistquestionconfigModel.insertMany( document );
|
|
16
|
-
},
|
|
17
|
-
async updateMany( query = {}, record={} ) {
|
|
18
|
-
return model.checklistquestionconfigModel.updateMany( query, { $set: record } );
|
|
19
|
-
},
|
|
20
|
-
async deleteMany( query = {} ) {
|
|
21
|
-
return model.checklistquestionconfigModel.deleteMany( query );
|
|
22
|
-
},
|
|
23
|
-
async aggregate( query = {} ) {
|
|
24
|
-
return model.checklistquestionconfigModel.aggregate( query );
|
|
25
|
-
},
|
|
26
|
-
async findSort( query={}, field={}, sort = {} ) {
|
|
27
|
-
return model.checklistquestionconfigModel.find( query, field ).sort( sort );
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const _svc = createLoggableService( _methods, 'checklistquestions' );
|
|
32
|
-
|
|
33
|
-
export const find
|
|
34
|
-
export const findOne
|
|
35
|
-
export const create
|
|
36
|
-
export const insertMany = ( ...args ) => _svc.insertMany( ...args );
|
|
37
|
-
export const updateMany = ( ...args ) => _svc.updateMany( ...args );
|
|
38
|
-
export const deleteMany = ( ...args ) => _svc.deleteMany( ...args );
|
|
39
|
-
export const aggregate
|
|
40
|
-
export const findSort
|
|
1
|
+
import model from 'tango-api-schema';
|
|
2
|
+
import { createLoggableService } from '../logging/createLoggableService.js';
|
|
3
|
+
|
|
4
|
+
const _methods = {
|
|
5
|
+
async find( query={}, field={} ) {
|
|
6
|
+
return model.checklistquestionconfigModel.find( query, field );
|
|
7
|
+
},
|
|
8
|
+
async findOne( query={}, field={} ) {
|
|
9
|
+
return model.checklistquestionconfigModel.findOne( query, field );
|
|
10
|
+
},
|
|
11
|
+
async create( document = {} ) {
|
|
12
|
+
return model.checklistquestionconfigModel.create( document );
|
|
13
|
+
},
|
|
14
|
+
async insertMany( document = {} ) {
|
|
15
|
+
return model.checklistquestionconfigModel.insertMany( document );
|
|
16
|
+
},
|
|
17
|
+
async updateMany( query = {}, record={} ) {
|
|
18
|
+
return model.checklistquestionconfigModel.updateMany( query, { $set: record } );
|
|
19
|
+
},
|
|
20
|
+
async deleteMany( query = {} ) {
|
|
21
|
+
return model.checklistquestionconfigModel.deleteMany( query );
|
|
22
|
+
},
|
|
23
|
+
async aggregate( query = {} ) {
|
|
24
|
+
return model.checklistquestionconfigModel.aggregate( query );
|
|
25
|
+
},
|
|
26
|
+
async findSort( query={}, field={}, sort = {} ) {
|
|
27
|
+
return model.checklistquestionconfigModel.find( query, field ).sort( sort );
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const _svc = createLoggableService( _methods, 'checklistquestions' );
|
|
32
|
+
|
|
33
|
+
export const find = ( ...args ) => _svc.find( ...args );
|
|
34
|
+
export const findOne = ( ...args ) => _svc.findOne( ...args );
|
|
35
|
+
export const create = ( ...args ) => _svc.create( ...args );
|
|
36
|
+
export const insertMany = ( ...args ) => _svc.insertMany( ...args );
|
|
37
|
+
export const updateMany = ( ...args ) => _svc.updateMany( ...args );
|
|
38
|
+
export const deleteMany = ( ...args ) => _svc.deleteMany( ...args );
|
|
39
|
+
export const aggregate = ( ...args ) => _svc.aggregate( ...args );
|
|
40
|
+
export const findSort = ( ...args ) => _svc.findSort( ...args );
|