tango-app-api-audit 3.5.9 → 3.5.11

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-audit",
3
- "version": "3.5.9",
3
+ "version": "3.5.11",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -255,7 +255,7 @@ export async function getAuditFile( req, res ) {
255
255
  },
256
256
  ];
257
257
  }
258
- const auditInsertData = inserQuery? await aggregateUserAudit( inserQuery ): null;
258
+ const auditInsertData = inserQuery? await aggregateAuditStoreData( inserQuery ): null;
259
259
  const auditStatus =
260
260
  userDetails && userDetails.length > 0 ? userDetails[0].auditStatus : null;
261
261
  switch ( auditStatus ) {
@@ -537,9 +537,10 @@ export async function getAuditFile( req, res ) {
537
537
  fetchData.ContinuationToken = decodeURIComponent( inputData.nextId );
538
538
  }
539
539
  }
540
+ logger.info( { msg: msg, leve: '............1' } );
540
541
  const getQuery = msg.audit_type =='ReAudit'?
541
542
  {
542
- size: inputData?.limit || 2,
543
+ size: inputData?.limit || 500,
543
544
  _source: [ 'module', 'status', 'date', 'store_id', 'outputCluster', 'personPath', 'REIDCluster', 'isEmployee', 'isJunk', 'EmployeeStatusFinal' ], // Only fetch necessary fields
544
545
 
545
546
  query: {
@@ -571,7 +572,7 @@ export async function getAuditFile( req, res ) {
571
572
 
572
573
  }:
573
574
  {
574
- size: inputData?.limit || 2,
575
+ size: inputData?.limit || 500,
575
576
  _source: [ 'module', 'status', 'date', 'store_id', 'personPath', 'REIDCluster', 'EmployeeStatusProposed', 'isJunk', 'EmployeeStatusFinal' ], // Only fetch necessary fields
576
577
 
577
578
  query: {
@@ -597,7 +598,9 @@ export async function getAuditFile( req, res ) {
597
598
  },
598
599
 
599
600
  };
601
+ logger.info( { fetchData: fetchData, msg: msg, inputData: inputData, type: 'debug-bucketNameIssue' } );
600
602
  const list = msg.zone_id === 'track' ? inputData.nextId? await scrollResponse( inputData.nextId ):await searchOpenSearchData( msg.index_name, getQuery ): await listFileByPath( fetchData );
603
+ logger.info( { list: list, msg: msg, level: '.........2' } );
601
604
  const folderPath = msg.zone_id === 'track' ? list?.body?.hits?.hits : list.data;
602
605
  const nextQuery =msg.zone_id !== 'track' ? list.pageToken: '';
603
606
  if ( msg.zone_id === 'track' ) {