tango-app-api-audit 3.4.0-alpha.16 → 3.4.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
|
@@ -1226,7 +1226,7 @@ export async function getAuditFile( req, res ) {
|
|
|
1226
1226
|
export async function getUpdatedFile( req, res ) {
|
|
1227
1227
|
try {
|
|
1228
1228
|
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
1229
|
-
const inputData = req.
|
|
1229
|
+
const inputData = req.body;
|
|
1230
1230
|
const msg = req?.TraxData?.sqs?.Body;
|
|
1231
1231
|
logger.info( { msg: msg } );
|
|
1232
1232
|
let result =[];
|
|
@@ -1387,7 +1387,7 @@ export async function getUpdatedFile( req, res ) {
|
|
|
1387
1387
|
} );
|
|
1388
1388
|
} catch ( error ) {
|
|
1389
1389
|
const err = error.message || 'Internal Server Error';
|
|
1390
|
-
logger.error( { error: error, data: req.
|
|
1390
|
+
logger.error( { error: error, data: req.body, function: 'getUpdatedFile' } );
|
|
1391
1391
|
return res.sendError( err, 500 );
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
@@ -44,54 +44,17 @@ export const traxAuditDocs = {
|
|
|
44
44
|
},
|
|
45
45
|
},
|
|
46
46
|
'/v3/trax-audit/get-updated-file': {
|
|
47
|
-
|
|
47
|
+
post: {
|
|
48
48
|
tags: [ 'Trax Audit' ],
|
|
49
49
|
description: 'Get a file via queue message',
|
|
50
50
|
operationId: 'get-updated-file',
|
|
51
|
-
|
|
52
|
-
{
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
require: true,
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
in: 'query',
|
|
60
|
-
name: 'fileDate',
|
|
61
|
-
scema: j2s( getUpdatedFileSchema ).swagger,
|
|
62
|
-
require: true,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
in: 'query',
|
|
66
|
-
name: 'moduleType',
|
|
67
|
-
scema: j2s( getUpdatedFileSchema ).swagger,
|
|
68
|
-
require: true,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
in: 'query',
|
|
72
|
-
name: 'auditId',
|
|
73
|
-
scema: j2s( getUpdatedFileSchema ).swagger,
|
|
74
|
-
require: true,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
in: 'query',
|
|
78
|
-
name: 'streamName',
|
|
79
|
-
scema: j2s( getUpdatedFileSchema ).swagger,
|
|
80
|
-
require: false,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
in: 'query',
|
|
84
|
-
name: 'question',
|
|
85
|
-
scema: j2s( getUpdatedFileSchema ).swagger,
|
|
86
|
-
require: false,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
in: 'query',
|
|
90
|
-
name: 'tempId',
|
|
91
|
-
scema: j2s( getUpdatedFileSchema ).swagger,
|
|
92
|
-
require: false,
|
|
51
|
+
requestBody: {
|
|
52
|
+
content: {
|
|
53
|
+
'application/json': {
|
|
54
|
+
schema: j2s( getUpdatedFileSchema ).swagger,
|
|
55
|
+
},
|
|
93
56
|
},
|
|
94
|
-
|
|
57
|
+
},
|
|
95
58
|
responses: {
|
|
96
59
|
200: { description: 'Successful' },
|
|
97
60
|
401: { description: 'Unauthorized User' },
|
|
@@ -18,7 +18,7 @@ traxAuditRouter.post( '/work-space', isAllowedSessionHandler, validate( workSpac
|
|
|
18
18
|
|
|
19
19
|
// Y/n
|
|
20
20
|
traxAuditRouter.get( '/get-file', isAllowedSessionHandler, validate( getFileValid ), isExistsQueue, getAuditFile );
|
|
21
|
-
traxAuditRouter.
|
|
21
|
+
traxAuditRouter.post( '/get-updated-file', isAllowedSessionHandler, validate( getUpdatedFileValid ), isTraxAuditDocumentExist, getUpdatedFile );
|
|
22
22
|
traxAuditRouter.post( '/save-binary-audit', isAllowedSessionHandler, validate( saveValid ), validateBinaryAudit, saveBinary );
|
|
23
23
|
|
|
24
24
|
// metrcis
|
|
@@ -59,7 +59,7 @@ export async function validateBinaryAudit( req, res, next ) {
|
|
|
59
59
|
|
|
60
60
|
export async function isTraxAuditDocumentExist( req, res, next ) {
|
|
61
61
|
try {
|
|
62
|
-
const inputData = req.
|
|
62
|
+
const inputData = req.body;
|
|
63
63
|
let query = {};
|
|
64
64
|
switch ( inputData.moduleType ) {
|
|
65
65
|
case 'unattended-customer':
|