tango-app-api-audit 3.4.68-beta.19 → 3.4.68-beta.20

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.4.68-beta.19",
3
+ "version": "3.4.68-beta.20",
4
4
  "description": "audit & audit metrics apis",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -63,61 +63,100 @@ export async function getList( req, res ) {
63
63
  };
64
64
 
65
65
  if ( inputData.searchValue && inputData.searchValue !== '' ) {
66
- search ={
67
- 'must': filter,
68
- 'should': [
69
- {
70
- 'wildcard': {
71
- 'storeName.keyword': {
72
- 'value': `*${inputData.searchValue}*`,
66
+ if ( inputData.type&&inputData.type==='remote' ) {
67
+ search ={
68
+ 'must': filter,
69
+ 'should': [
70
+ {
71
+ 'wildcard': {
72
+ 'storeName.keyword': {
73
+ 'value': `*${inputData.searchValue}*`,
74
+ },
73
75
  },
74
76
  },
75
- },
76
- {
77
- 'wildcard': {
78
- 'storeId.keyword': {
79
- 'value': `*${inputData.searchValue}*`,
77
+ {
78
+ 'wildcard': {
79
+ 'storeId.keyword': {
80
+ 'value': `*${inputData.searchValue}*`,
81
+ },
80
82
  },
81
83
  },
82
- },
83
- {
84
- 'wildcard': {
85
- 'engagementId.keyword': {
86
- 'value': `*${inputData.searchValue}*`,
84
+ {
85
+ 'wildcard': {
86
+ 'engagementId.keyword': {
87
+ 'value': `*${inputData.searchValue}*`,
88
+ },
87
89
  },
88
90
  },
89
- },
90
- {
91
- 'wildcard': {
92
- 'queueId.keyword': {
93
- 'value': `*${inputData.searchValue}*`,
91
+
92
+ {
93
+ 'wildcard': {
94
+ 'auditStatus.keyword': {
95
+ 'value': `*${inputData.searchValue}*`,
96
+ },
94
97
  },
95
98
  },
96
- },
97
- {
98
- 'wildcard': {
99
- 'optumId.keyword': {
100
- 'value': `*${inputData.searchValue}*`,
99
+ ],
100
+ 'minimum_should_match': 1,
101
+ };
102
+ } else {
103
+ search ={
104
+ 'must': filter,
105
+ 'should': [
106
+ {
107
+ 'wildcard': {
108
+ 'storeName.keyword': {
109
+ 'value': `*${inputData.searchValue}*`,
110
+ },
101
111
  },
102
112
  },
103
- },
104
- {
105
- 'wildcard': {
106
- 'visitorsType.keyword': {
107
- 'value': `*${inputData.searchValue}*`,
113
+ {
114
+ 'wildcard': {
115
+ 'storeId.keyword': {
116
+ 'value': `*${inputData.searchValue}*`,
117
+ },
108
118
  },
109
119
  },
110
- },
111
- {
112
- 'wildcard': {
113
- 'auditStatus.keyword': {
114
- 'value': `*${inputData.searchValue}*`,
120
+ {
121
+ 'wildcard': {
122
+ 'engagementId.keyword': {
123
+ 'value': `*${inputData.searchValue}*`,
124
+ },
115
125
  },
116
126
  },
117
- },
118
- ],
119
- 'minimum_should_match': 1,
120
- };
127
+ {
128
+ 'wildcard': {
129
+ 'queueId.keyword': {
130
+ 'value': `*${inputData.searchValue}*`,
131
+ },
132
+ },
133
+ },
134
+ {
135
+ 'wildcard': {
136
+ 'optumId.keyword': {
137
+ 'value': `*${inputData.searchValue}*`,
138
+ },
139
+ },
140
+ },
141
+ {
142
+ 'wildcard': {
143
+ 'visitorsType.keyword': {
144
+ 'value': `*${inputData.searchValue}*`,
145
+ },
146
+ },
147
+ },
148
+
149
+ {
150
+ 'wildcard': {
151
+ 'auditStatus.keyword': {
152
+ 'value': `*${inputData.searchValue}*`,
153
+ },
154
+ },
155
+ },
156
+ ],
157
+ 'minimum_should_match': 1,
158
+ };
159
+ }
121
160
  }
122
161
  let searchQuery={
123
162
  'from': offset,