tango-app-api-trax 3.4.0-soplink2-0 → 3.4.1-activitylog-1
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/index.js +1 -0
- package/package.json +3 -3
- package/src/controllers/activityLog.controller.js +49 -27
- package/src/controllers/download.controller.js +117 -3
- package/src/controllers/gallery.controller.js +18 -14
- package/src/controllers/internalTrax.controller.js +675 -10
- package/src/controllers/mobileTrax.controller.js +38 -962
- package/src/controllers/teaxFlag.controller.js +61 -3
- package/src/controllers/trax.controller.js +541 -289
- package/src/controllers/traxDashboard.controllers.js +1 -2
- package/src/dtos/downloadValidation.dtos.js +1 -1
- package/src/hbs/login-otp.hbs +943 -943
- package/src/routes/download.router.js +4 -0
- package/src/routes/internalTraxApi.router.js +3 -1
- package/src/routes/mobileTrax.routes.js +0 -3
- package/src/routes/trax.routes.js +5 -3
- package/src/routes/traxFlag.router.js +5 -1
- package/src/services/processedchecklistconfig.services.js +1 -1
|
@@ -11,13 +11,17 @@ import {
|
|
|
11
11
|
getChecklistFromZipId,
|
|
12
12
|
getPDFCSVChecklistDetails,
|
|
13
13
|
cancelDownload,
|
|
14
|
+
downloadInsertAI,
|
|
15
|
+
getAiChecklistDataFromZipId,
|
|
14
16
|
} from '../controllers/download.controller.js';
|
|
15
17
|
|
|
16
18
|
downloadRouter
|
|
17
19
|
.post( '/downloadInsert', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [] } ] } ), validate( downloadValidationDtos.validateDownloadInsertParams ), downloadInsert )
|
|
20
|
+
.post( '/downloadInsertAI', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [] } ] } ), validate( downloadValidationDtos.validateDownloadInsertParams ), downloadInsertAI )
|
|
18
21
|
.post( '/downloadList', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [] } ] } ), validate( downloadValidationDtos.validateDownloadListParams ), downloadList )
|
|
19
22
|
.post( '/downloadUpdate', downloadUpdate ) // isAllowedInternalAPIHandler,
|
|
20
23
|
.get( '/getChecklistFromZipId', getChecklistFromZipId ) // isAllowedInternalAPIHandler,
|
|
24
|
+
.get( '/getAiChecklistDataFromZipId', getAiChecklistDataFromZipId ) // isAllowedInternalAPIHandler,
|
|
21
25
|
.post( '/getChecklistDetails', getPDFCSVChecklistDetails )
|
|
22
26
|
.put( '/cancelDownload/:id', isAllowedSessionHandler, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [] } ] } ), cancelDownload );
|
|
23
27
|
|
|
@@ -16,10 +16,12 @@ internalTraxRouter
|
|
|
16
16
|
.get( '/profile', isAllowedMobileSessionHandler, internalController.getUserStoreList )
|
|
17
17
|
.post( '/pushNotification', isAllowedInternalAPIHandler, internalController.pushNotification )
|
|
18
18
|
.post( '/taskPushNotification', isAllowedInternalAPIHandler, internalController.taskPushNotification )
|
|
19
|
+
.post( '/AiPushNotificationAlert', isAllowedInternalAPIHandler, internalController.AiPushNotificationAlert )
|
|
19
20
|
.get( '/checklist', isAllowedInternalAPIHandler, internalController.internalAPIChecklist )
|
|
20
21
|
.post( '/getPDFCSVChecklistDetails', isAllowedInternalAPIHandler, internalController.getPDFCSVChecklistDetails )
|
|
21
22
|
.get( '/getOTP', isAllowedInternalAPIHandler, internalController.getOTP )
|
|
22
23
|
.get( '/getDownloads', isAllowedInternalAPIHandler, internalController.getDownloads )
|
|
23
|
-
.post( '/sendPushNotification', isAllowedInternalAPIHandler, internalController.internalSendPushNotification )
|
|
24
|
+
.post( '/sendPushNotification', isAllowedInternalAPIHandler, internalController.internalSendPushNotification )
|
|
25
|
+
.post( '/sendAiPushNotification', isAllowedInternalAPIHandler, internalController.internalAISendPushNotification );
|
|
24
26
|
|
|
25
27
|
|
|
@@ -9,18 +9,15 @@ mobileRouter
|
|
|
9
9
|
.get( '/storeList', isAllowedSessionHandler, mobileController.storeList )
|
|
10
10
|
.get( '/storeListv1', isAllowedSessionHandler, mobileController.storeListv1 )
|
|
11
11
|
.post( '/startCheckList', isAllowedSessionHandler, validate( startValidation ), mobileController.startChecklist )
|
|
12
|
-
.post( '/startCheckListv1', isAllowedSessionHandler, validate( startValidation ), mobileController.startChecklistv1 )
|
|
13
12
|
.post( '/startTask', isAllowedSessionHandler, validate( startValidation ), mobileController.startTask )
|
|
14
13
|
.post( '/submitCheckList', isAllowedSessionHandler, mobileController.sopMobilechecklistValidater, mobileController.sopMobilechecklistQuestionValidator, mobileController.sopMobilechecklistMultiSectionFormatter, mobileController.submitChecklist )
|
|
15
14
|
.post( '/submitCheckListv5', isAllowedSessionHandler, mobileController.sopMobilechecklistValidater, mobileController.sopMobilechecklistQuestionValidatorv1, mobileController.sopMobilechecklistMultiSectionFormatterv1, mobileController.submitChecklist )
|
|
16
|
-
.post( '/submitCheckListv6', isAllowedSessionHandler, mobileController.sopMobilechecklistValidater, mobileController.sopMobilechecklistQuestionValidatorv1, mobileController.sopMobilechecklistMultiSectionFormatterv2, mobileController.submitChecklist )
|
|
17
15
|
.post( '/submitTask', isAllowedSessionHandler, mobileController.sopMobilechecklistValidater, mobileController.sopMobileTaskQuestionValidator, mobileController.sopMobileTaskMultiSectionFormatter, mobileController.submitTask )
|
|
18
16
|
.get( '/dashboard', isAllowedSessionHandler, validate( dashboardValidation ), mobileController.dashboard )
|
|
19
17
|
.get( '/dashboardv1', isAllowedSessionHandler, validate( dashboardValidation ), mobileController.dashboardv1 )
|
|
20
18
|
.get( '/checklist', isAllowedSessionHandler, validate( mobileChecklistValidation ), mobileController.checklist )
|
|
21
19
|
.get( '/checklistv1', isAllowedSessionHandler, validate( mobileChecklistValidation ), mobileController.checklistv1 )
|
|
22
20
|
.get( '/checklistQuestionList', isAllowedSessionHandler, mobileController.questionList )
|
|
23
|
-
.get( '/checklistQuestionListv1', isAllowedSessionHandler, mobileController.questionListv1 )
|
|
24
21
|
.get( '/taskQuestionList', isAllowedSessionHandler, mobileController.taskQuestionList )
|
|
25
22
|
.post( '/uploadAnswerImage', isAllowedSessionHandler, mobileController.uploadAnswerImage )
|
|
26
23
|
.get( '/appVersion', mobileController.appVersion )
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import express from 'express';
|
|
2
|
-
import { isAllowedSessionHandler, validate, accessVerification, isAllowedClient
|
|
2
|
+
import { isAllowedSessionHandler, validate, accessVerification, isAllowedClient } from 'tango-app-api-middleware';
|
|
3
3
|
import { checklistValidation, checklistDetailsValidation, runaiValidation, checklistPageSchema, duplicateValidation, updateChecklistValidation, uploadUserValidation, aichecklistValidation, publishValidation, selectAssign } from '../dtos/validation.dtos.js';
|
|
4
4
|
import * as traxController from '../controllers/trax.controller.js';
|
|
5
5
|
|
|
@@ -25,10 +25,12 @@ traxRouter
|
|
|
25
25
|
.get( '/zoneList', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [ ] } ] } ), traxController.zoneList )
|
|
26
26
|
.get( '/aichecklist', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [ ] } ] } ), validate( aichecklistValidation ), traxController.aiChecklist )
|
|
27
27
|
.get( '/predefinedChecklist', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [ ] } ] } ), validate( aichecklistValidation ), traxController.preDefinedChecklist )
|
|
28
|
-
.post( '/selectAssign',
|
|
28
|
+
.post( '/selectAssign', validate( selectAssign ), traxController.selectAssign )
|
|
29
29
|
.post( '/assign', isAllowedSessionHandler, traxController.checklistAssign )
|
|
30
30
|
// .post( '/assignUpload', isAllowedSessionHandler, traxController.assignChecklistUser )
|
|
31
|
-
.post( '/updateAssign', isAllowedSessionHandler, traxController.updateAssign )
|
|
31
|
+
.post( '/updateAssign', isAllowedSessionHandler, traxController.updateAssign )
|
|
32
|
+
.post( '/updateAiConfigure', isAllowedSessionHandler, traxController.updateAiConfigure )
|
|
33
|
+
.get( '/getAiDetails', isAllowedSessionHandler, traxController.getAiDetails );
|
|
32
34
|
;
|
|
33
35
|
|
|
34
36
|
// isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [ ] } ] } ),
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
checklistDropdownV1,
|
|
21
21
|
flagTablesV2,
|
|
22
22
|
flagComparisonCardsV2,
|
|
23
|
+
checklistCountByType,
|
|
23
24
|
} from '../controllers/teaxFlag.controller.js';
|
|
24
25
|
import { isAllowedSessionHandler } from 'tango-app-api-middleware';
|
|
25
26
|
import { accessVerification } from 'tango-app-api-middleware';
|
|
@@ -76,7 +77,10 @@ traxFlagRouter
|
|
|
76
77
|
flagComparisonCardsV2 )
|
|
77
78
|
.post( '/flagTablesV2', isAllowedSessionHandler,
|
|
78
79
|
accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [] } ] } ),
|
|
79
|
-
flagTablesV2 )
|
|
80
|
+
flagTablesV2 )
|
|
81
|
+
.post( '/checklistCountByType', isAllowedSessionHandler,
|
|
82
|
+
accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'checklist', permissions: [] } ] } ),
|
|
83
|
+
checklistCountByType );
|
|
80
84
|
|
|
81
85
|
|
|
82
86
|
export default traxFlagRouter;
|
|
@@ -9,7 +9,7 @@ export const findOne = ( query = {}, record = {} ) => {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export const updateOne = ( query = {}, record = {} ) => {
|
|
12
|
-
return model.processedchecklistconfigModel.updateOne( query, { $set: record } );
|
|
12
|
+
return model.processedchecklistconfigModel.updateOne( query, { $set: record }, { upsert: true } );
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export const updateMany = ( query = {}, record = {} ) => {
|