tango-app-api-audit 3.6.31 → 3.6.33
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
|
@@ -2124,38 +2124,57 @@ export async function summaryList( req, res ) {
|
|
|
2124
2124
|
let RMEmail = '';
|
|
2125
2125
|
let clusterName='';
|
|
2126
2126
|
if ( item?._source?.storeId&&item?._source?.storeId!='' ) {
|
|
2127
|
-
const rmListQuery =[
|
|
2127
|
+
// const rmListQuery =[
|
|
2128
|
+
// {
|
|
2129
|
+
// $match: {
|
|
2130
|
+
// $and: [
|
|
2131
|
+
// {
|
|
2132
|
+
// clientId: { $eq: inputData?.clientId },
|
|
2133
|
+
// },
|
|
2134
|
+
// {
|
|
2135
|
+
// configureType: { $eq: 'user' },
|
|
2136
|
+
// },
|
|
2137
|
+
// ],
|
|
2138
|
+
// },
|
|
2139
|
+
// },
|
|
2140
|
+
// {
|
|
2141
|
+
// $unwind: {
|
|
2142
|
+
// path: '$userList', preserveNullAndEmptyArrays: true,
|
|
2143
|
+
// },
|
|
2144
|
+
// },
|
|
2145
|
+
// {
|
|
2146
|
+
// $group: {
|
|
2147
|
+
// _id: null,
|
|
2148
|
+
// list: { $addToSet: '$userList.email' },
|
|
2149
|
+
// },
|
|
2150
|
+
// },
|
|
2151
|
+
// {
|
|
2152
|
+
// $project: {
|
|
2153
|
+
// _id: 0,
|
|
2154
|
+
// list: 1,
|
|
2155
|
+
// },
|
|
2156
|
+
// },
|
|
2157
|
+
// ];
|
|
2158
|
+
// const getRMList = await aggregateEyeTestConfig( rmListQuery );
|
|
2159
|
+
|
|
2160
|
+
const getRMList = [
|
|
2128
2161
|
{
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
},
|
|
2144
|
-
},
|
|
2145
|
-
{
|
|
2146
|
-
$group: {
|
|
2147
|
-
_id: null,
|
|
2148
|
-
list: { $addToSet: '$userList.email' },
|
|
2149
|
-
},
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
$project: {
|
|
2153
|
-
_id: 0,
|
|
2154
|
-
list: 1,
|
|
2155
|
-
},
|
|
2162
|
+
list: [ 'marellapudi.ajay@lenskart.com',
|
|
2163
|
+
'anirban.ghosh@lenskart.com',
|
|
2164
|
+
'avadhesh.kumar@lenskart.com',
|
|
2165
|
+
'ayush.gupta1@lenskart.in',
|
|
2166
|
+
'dhirendra.bisht@thelenskart.com',
|
|
2167
|
+
'mueen.khan@thelenskart.com',
|
|
2168
|
+
'reshma.shetty@lenskart.in',
|
|
2169
|
+
'srinivas.reddy@thelenskart.com',
|
|
2170
|
+
'suresh.r@thelenskart.com',
|
|
2171
|
+
'krishna.thulasi@lenskart.in',
|
|
2172
|
+
'vijeesh.vl@lenskart.in',
|
|
2173
|
+
'kunal.sharma@lenskart.mobi',
|
|
2174
|
+
'',
|
|
2175
|
+
],
|
|
2156
2176
|
},
|
|
2157
2177
|
];
|
|
2158
|
-
const getRMList = await aggregateEyeTestConfig( rmListQuery );
|
|
2159
2178
|
let getCluster = [];
|
|
2160
2179
|
if ( getRMList && getRMList?.length > 0 ) {
|
|
2161
2180
|
const getRMQuery = [
|
|
@@ -2574,7 +2593,7 @@ export async function emailAlertLog( req, res ) {
|
|
|
2574
2593
|
'range': {
|
|
2575
2594
|
'createdAt': {
|
|
2576
2595
|
'gte': dayjs( inputData.fromDate ),
|
|
2577
|
-
'lte': dayjs( inputData.toDate ),
|
|
2596
|
+
'lte': dayjs( `${inputData.toDate} ${dayjs().format( 'HH:mm:ss' )}` ),
|
|
2578
2597
|
},
|
|
2579
2598
|
},
|
|
2580
2599
|
},
|
|
@@ -2585,8 +2604,6 @@ export async function emailAlertLog( req, res ) {
|
|
|
2585
2604
|
|
|
2586
2605
|
let search = {
|
|
2587
2606
|
'must': filter,
|
|
2588
|
-
'should': [],
|
|
2589
|
-
'minimum_should_match': 1,
|
|
2590
2607
|
};
|
|
2591
2608
|
if ( inputData.searchValue && inputData.searchValue !== '' ) {
|
|
2592
2609
|
search ={
|
|
@@ -2649,27 +2666,39 @@ export async function emailAlertLog( req, res ) {
|
|
|
2649
2666
|
},
|
|
2650
2667
|
},
|
|
2651
2668
|
],
|
|
2652
|
-
|
|
2669
|
+
'minimum_should_match': 1,
|
|
2653
2670
|
|
|
2654
2671
|
};
|
|
2655
2672
|
}
|
|
2656
2673
|
|
|
2657
2674
|
if ( inputData.RMList && inputData.RMList?.length > 0 ) {
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2675
|
+
filter.push(
|
|
2676
|
+
{
|
|
2677
|
+
bool: {
|
|
2678
|
+
should: inputData.RMList.map( ( email ) => ( {
|
|
2679
|
+
wildcard: {
|
|
2680
|
+
'RMEmail.keyword': `*${email}*`,
|
|
2681
|
+
},
|
|
2682
|
+
} ) ),
|
|
2683
|
+
minimum_should_match: 1, // at least one should match
|
|
2684
|
+
},
|
|
2685
|
+
},
|
|
2686
|
+
);
|
|
2664
2687
|
}
|
|
2665
2688
|
|
|
2666
2689
|
if ( inputData.cluster && inputData.cluster?.length > 0 ) {
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2690
|
+
filter.push(
|
|
2691
|
+
{
|
|
2692
|
+
bool: {
|
|
2693
|
+
should: inputData.cluster.map( ( cluster ) => ( {
|
|
2694
|
+
wildcard: {
|
|
2695
|
+
'cluster.keyword': `*${cluster}*`,
|
|
2696
|
+
},
|
|
2697
|
+
} ) ),
|
|
2698
|
+
minimum_should_match: 1, // at least one should match
|
|
2699
|
+
},
|
|
2700
|
+
},
|
|
2701
|
+
);
|
|
2673
2702
|
}
|
|
2674
2703
|
const getQuery = {
|
|
2675
2704
|
'size': inputData.isExport == true? 50000 : inputData?.limit || 10,
|