tango-app-api-client 3.4.0-beta.8 → 3.4.0-beta.9
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 +2 -2
- package/src/controllers/client.controllers.js +205 -85
- package/src/dtos/client.dtos.js +40 -0
- package/src/hbs/approved-client.hbs +170 -170
- package/src/routes/client.routes.js +16 -2
- package/src/service/auditConfig.service.js +13 -0
- package/src/service/revopConfig.service.js +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-client",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.9",
|
|
4
4
|
"description": "client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"nodemon": "^3.0.3",
|
|
27
27
|
"npm": "^10.9.1",
|
|
28
28
|
"swagger-ui-express": "^5.0.0",
|
|
29
|
-
"tango-api-schema": "^2.2.
|
|
29
|
+
"tango-api-schema": "^2.2.109",
|
|
30
30
|
"tango-app-api-middleware": "^3.1.67",
|
|
31
31
|
"winston": "^3.11.0",
|
|
32
32
|
"winston-daily-rotate-file": "^5.0.0"
|
|
@@ -16,6 +16,8 @@ import { createBilling } from '../service/billing.service.js';
|
|
|
16
16
|
import { createPaymentAccount } from '../service/paymentAccount.service.js';
|
|
17
17
|
import { countDocumentsClusters, createclusterModel } from '../service/cluster.service.js';
|
|
18
18
|
import { countDocumentsTeams } from '../service/teams.service.js';
|
|
19
|
+
import { createauditConfig, updateauditConfig, aggregateAuditconfig } from '../service/auditConfig.service.js';
|
|
20
|
+
import { findOnerevopConfig, createrevopConfig, updaterevopConfig } from '../service/revopConfig.service.js';
|
|
19
21
|
|
|
20
22
|
export async function create( req, res ) {
|
|
21
23
|
try {
|
|
@@ -96,7 +98,7 @@ export async function create( req, res ) {
|
|
|
96
98
|
record.featureConfigs.isNewZone = true;
|
|
97
99
|
}
|
|
98
100
|
if ( data.productName === 'tangoTrax' ) {
|
|
99
|
-
record.featureConfigs.
|
|
101
|
+
record.featureConfigs.isTrax = true;
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
}
|
|
@@ -678,7 +680,7 @@ export async function detailedAllClientCount( req, res ) {
|
|
|
678
680
|
if ( result.length == 0 ) {
|
|
679
681
|
return res.sendError( 'No Data Found', 204 );
|
|
680
682
|
}
|
|
681
|
-
result[0].activeStoresCount = activeStores.length>0?Math.abs( activeStores.length - yettoInstallCount.length ):0;
|
|
683
|
+
result[0].activeStoresCount = activeStores.length > 0 ? Math.abs( activeStores.length - yettoInstallCount.length ) : 0;
|
|
682
684
|
result[0].activeCameraCount = activeCameras;
|
|
683
685
|
return res.sendSuccess( { result: result } );
|
|
684
686
|
} catch ( error ) {
|
|
@@ -769,7 +771,7 @@ export async function updateBrandInfo( req, res ) {
|
|
|
769
771
|
};
|
|
770
772
|
|
|
771
773
|
// Map and rename keys from current client info for UI display and logging
|
|
772
|
-
const newData ={
|
|
774
|
+
const newData = {
|
|
773
775
|
RegisteredCompanyName: getPosCientInfo?.profileDetails?.registeredCompanyName,
|
|
774
776
|
IndustryType: getPosCientInfo?.profileDetails?.industry,
|
|
775
777
|
FirmType: getPosCientInfo?.profileDetails?.clientType,
|
|
@@ -955,7 +957,7 @@ export async function updateSignatoryDetails( req, res ) {
|
|
|
955
957
|
export async function updateTicketConfiguration( req, res ) {
|
|
956
958
|
try {
|
|
957
959
|
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
958
|
-
const fields ={
|
|
960
|
+
const fields = {
|
|
959
961
|
'ticketConfigs.downTimeType': 1,
|
|
960
962
|
'ticketConfigs.installationReAssign': 1,
|
|
961
963
|
'ticketConfigs.infraDownTime': 1,
|
|
@@ -996,7 +998,7 @@ export async function updateTicketConfiguration( req, res ) {
|
|
|
996
998
|
|
|
997
999
|
// Map and rename keys from previous client info for UI display and logging
|
|
998
1000
|
const oldData = {
|
|
999
|
-
InfraDowntimeType: findClient?.ticketConfigs?.downTimeType==0? 'Single Camera': 'All Cameras',
|
|
1001
|
+
InfraDowntimeType: findClient?.ticketConfigs?.downTimeType == 0 ? 'Single Camera' : 'All Cameras',
|
|
1000
1002
|
AutoReAssignInstallation: findClient?.ticketConfigs?.installationReAssign,
|
|
1001
1003
|
InfraDowntime: findClient?.ticketConfigs?.infraDownTime,
|
|
1002
1004
|
InfraFiles: findClient?.ticketConfigs?.MinFilesCount,
|
|
@@ -1008,8 +1010,8 @@ export async function updateTicketConfiguration( req, res ) {
|
|
|
1008
1010
|
};
|
|
1009
1011
|
|
|
1010
1012
|
// Map and rename keys from current client info for UI display and logging
|
|
1011
|
-
const newData ={
|
|
1012
|
-
InfraDowntimeType: updatedClient?.ticketConfigs?.downTimeType==0? 'Single Camera': 'All Cameras',
|
|
1013
|
+
const newData = {
|
|
1014
|
+
InfraDowntimeType: updatedClient?.ticketConfigs?.downTimeType == 0 ? 'Single Camera' : 'All Cameras',
|
|
1013
1015
|
AutoReAssignInstallation: updatedClient?.ticketConfigs?.installationReAssign,
|
|
1014
1016
|
InfraDowntime: updatedClient?.ticketConfigs?.infraDownTime,
|
|
1015
1017
|
InfraFiles: updatedClient?.ticketConfigs?.MinFilesCount,
|
|
@@ -1077,7 +1079,7 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1077
1079
|
// Check if request body has any fields to update
|
|
1078
1080
|
if ( Object.keys( inputData ).length > 0 ) {
|
|
1079
1081
|
Object.keys( inputData ).forEach( ( element ) => {
|
|
1080
|
-
element === 'billableCalculation'? 'potentialCalculation': element; // Replace 'billableCalculation' with 'potentialCalculation' if present
|
|
1082
|
+
element === 'billableCalculation' ? 'potentialCalculation' : element; // Replace 'billableCalculation' with 'potentialCalculation' if present
|
|
1081
1083
|
updateKeys.push( camelCaseToWords( element ) ); // Convert camelCase field name to readable format and add to updateKeys
|
|
1082
1084
|
} );
|
|
1083
1085
|
}
|
|
@@ -1136,9 +1138,9 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1136
1138
|
const oldData = {
|
|
1137
1139
|
StoreOpenTime: previousData?.featureConfigs?.open,
|
|
1138
1140
|
StoreCloseTime: previousData?.featureConfigs?.close,
|
|
1139
|
-
ConversionCalculations: previousData?.featureConfigs?.conversionCalculation=='footfall-count'? 'Footfall Count': postData?.featureConfigs?.conversionCalculation=='engagers-count'?'Engagers Count':'Potential Entities',
|
|
1140
|
-
MissedOpportunityCalculation: previousData?.featureConfigs?.missedOpportunityCalculation=='engagers-conversion'? 'Engagers - Conversion': 'Potential Entities - Conversion',
|
|
1141
|
-
PotentialCalculations: previousData?.featureConfigs?.billableCalculation=='footfall-count'? 'Footfall Count': 'Engagers Count',
|
|
1141
|
+
ConversionCalculations: previousData?.featureConfigs?.conversionCalculation == 'footfall-count' ? 'Footfall Count' : postData?.featureConfigs?.conversionCalculation == 'engagers-count' ? 'Engagers Count' : 'Potential Entities',
|
|
1142
|
+
MissedOpportunityCalculation: previousData?.featureConfigs?.missedOpportunityCalculation == 'engagers-conversion' ? 'Engagers - Conversion' : 'Potential Entities - Conversion',
|
|
1143
|
+
PotentialCalculations: previousData?.featureConfigs?.billableCalculation == 'footfall-count' ? 'Footfall Count' : 'Engagers Count',
|
|
1142
1144
|
ConversionCondition: previousData?.featureConfigs?.conversion.condition,
|
|
1143
1145
|
ConversionValue: previousData?.featureConfigs?.conversion.value,
|
|
1144
1146
|
MissedOpportunityFromCondition: previousData?.featureConfigs?.missedOpportunityFrom?.condition,
|
|
@@ -1149,32 +1151,32 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1149
1151
|
BouncedLimitValue: previousData?.featureConfigs?.bouncedLimit?.value,
|
|
1150
1152
|
InfraAlertValue: previousData?.featureConfigs?.infraAlert?.value,
|
|
1151
1153
|
InfraAlertCondition: previousData?.featureConfigs?.infraAlert?.condition,
|
|
1152
|
-
ExcludedArea: previousData?.featureConfigs?.isExcludedArea ==true ? 'Enabled': 'Disabled',
|
|
1153
|
-
PasserBydata: previousData?.featureConfigs?.isPasserByData ==true ? 'Enabled': 'Disabled',
|
|
1154
|
-
NormalizedDataDuringDowntime: previousData?.featureConfigs?.isNormalized ==true ? 'Enabled': 'Disabled',
|
|
1155
|
-
Billing: previousData?.featureConfigs?.isbillingDisabled ==true ? 'Enabled': 'Disabled',
|
|
1156
|
-
CameraBlurring: previousData?.featureConfigs?.isCameraDisabled ==true ? 'Enabled': 'Disabled',
|
|
1157
|
-
FootfallDirectory: previousData?.featureConfigs?.isFootfallDirectory ==true ? 'Enabled': 'Disabled',
|
|
1158
|
-
NOBStatus: previousData?.featureConfigs?.isNOB ==true ? 'Enabled': 'Disabled',
|
|
1159
|
-
EnableAnalyze: previousData?.featureConfigs?.isNewDashboard ==true ? 'Enabled': 'Disabled',
|
|
1160
|
-
Traffic: previousData?.featureConfigs?.isNewTraffic==true ? 'Enabled': 'Disabled',
|
|
1161
|
-
Zone: previousData?.featureConfigs?.isNewZone ==true ? 'Enabled': 'Disabled',
|
|
1162
|
-
Zonev2: previousData?.featureConfigs?.isNewZoneV2 ==true ? 'Enabled': 'Disabled',
|
|
1163
|
-
Reports: previousData?.featureConfigs?.isNewReports ==true ? 'Enabled': 'Disabled',
|
|
1164
|
-
Trax: previousData?.featureConfigs?.isTrax ==true ? 'Enabled': 'Disabled',
|
|
1165
|
-
StreamType: previousData?.featureConfigs?.streamBy =='Edge' ? 'Edge App': 'RTSP',
|
|
1166
|
-
FootfallDirectoryOnlyAudit: previousData?.featureConfigs?.isFootfallDirectoryAudit ==true ? 'Enabled': 'Disabled',
|
|
1167
|
-
FootfallDirectoryOnlyFew: previousData?.featureConfigs?.isFootfallDirectoryLimit ==true ? 'Enabled': 'Disabled',
|
|
1154
|
+
ExcludedArea: previousData?.featureConfigs?.isExcludedArea == true ? 'Enabled' : 'Disabled',
|
|
1155
|
+
PasserBydata: previousData?.featureConfigs?.isPasserByData == true ? 'Enabled' : 'Disabled',
|
|
1156
|
+
NormalizedDataDuringDowntime: previousData?.featureConfigs?.isNormalized == true ? 'Enabled' : 'Disabled',
|
|
1157
|
+
Billing: previousData?.featureConfigs?.isbillingDisabled == true ? 'Enabled' : 'Disabled',
|
|
1158
|
+
CameraBlurring: previousData?.featureConfigs?.isCameraDisabled == true ? 'Enabled' : 'Disabled',
|
|
1159
|
+
FootfallDirectory: previousData?.featureConfigs?.isFootfallDirectory == true ? 'Enabled' : 'Disabled',
|
|
1160
|
+
NOBStatus: previousData?.featureConfigs?.isNOB == true ? 'Enabled' : 'Disabled',
|
|
1161
|
+
EnableAnalyze: previousData?.featureConfigs?.isNewDashboard == true ? 'Enabled' : 'Disabled',
|
|
1162
|
+
Traffic: previousData?.featureConfigs?.isNewTraffic == true ? 'Enabled' : 'Disabled',
|
|
1163
|
+
Zone: previousData?.featureConfigs?.isNewZone == true ? 'Enabled' : 'Disabled',
|
|
1164
|
+
Zonev2: previousData?.featureConfigs?.isNewZoneV2 == true ? 'Enabled' : 'Disabled',
|
|
1165
|
+
Reports: previousData?.featureConfigs?.isNewReports == true ? 'Enabled' : 'Disabled',
|
|
1166
|
+
Trax: previousData?.featureConfigs?.isTrax == true ? 'Enabled' : 'Disabled',
|
|
1167
|
+
StreamType: previousData?.featureConfigs?.streamBy == 'Edge' ? 'Edge App' : 'RTSP',
|
|
1168
|
+
FootfallDirectoryOnlyAudit: previousData?.featureConfigs?.isFootfallDirectoryAudit == true ? 'Enabled' : 'Disabled',
|
|
1169
|
+
FootfallDirectoryOnlyFew: previousData?.featureConfigs?.isFootfallDirectoryLimit == true ? 'Enabled' : 'Disabled',
|
|
1168
1170
|
|
|
1169
1171
|
};
|
|
1170
1172
|
|
|
1171
1173
|
// Map and rename keys from current client info for UI display and logging
|
|
1172
|
-
const newData ={
|
|
1174
|
+
const newData = {
|
|
1173
1175
|
StoreOpenTime: postData?.featureConfigs?.open,
|
|
1174
1176
|
StoreCloseTime: postData?.featureConfigs?.close,
|
|
1175
|
-
ConversionCalculations: postData?.featureConfigs?.conversionCalculation=='footfall-count'? 'Footfall Count': postData?.featureConfigs?.conversionCalculation=='engagers-count'?'Engagers Count':'Potential Entities',
|
|
1176
|
-
MissedOpportunityCalculation: postData?.featureConfigs?.missedOpportunityCalculation=='engagers-conversion'? 'Engagers - Conversion': 'Potential Entities - Conversion',
|
|
1177
|
-
PotentialCalculations: postData?.featureConfigs?.billableCalculation=='footfall-count'? 'Footfall Count':'Engagers Count',
|
|
1177
|
+
ConversionCalculations: postData?.featureConfigs?.conversionCalculation == 'footfall-count' ? 'Footfall Count' : postData?.featureConfigs?.conversionCalculation == 'engagers-count' ? 'Engagers Count' : 'Potential Entities',
|
|
1178
|
+
MissedOpportunityCalculation: postData?.featureConfigs?.missedOpportunityCalculation == 'engagers-conversion' ? 'Engagers - Conversion' : 'Potential Entities - Conversion',
|
|
1179
|
+
PotentialCalculations: postData?.featureConfigs?.billableCalculation == 'footfall-count' ? 'Footfall Count' : 'Engagers Count',
|
|
1178
1180
|
ConversionCondition: postData?.featureConfigs?.conversion.condition,
|
|
1179
1181
|
ConversionValue: postData?.featureConfigs?.conversion.value,
|
|
1180
1182
|
MissedOpportunityFromCondition: postData?.featureConfigs?.missedOpportunityFrom?.condition,
|
|
@@ -1185,22 +1187,22 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1185
1187
|
BouncedLimitValue: postData?.featureConfigs?.bouncedLimit?.value,
|
|
1186
1188
|
InfraAlertValue: postData?.featureConfigs?.infraAlert?.value,
|
|
1187
1189
|
InfraAlertCondition: postData?.featureConfigs?.infraAlert?.condition,
|
|
1188
|
-
ExcludedArea: postData?.featureConfigs?.isExcludedArea ==true ? 'Enabled': 'Disabled',
|
|
1189
|
-
PasserBydata: postData?.featureConfigs?.isPasserByData ==true ? 'Enabled': 'Disabled',
|
|
1190
|
-
NormalizedDataDuringDowntime: postData?.featureConfigs?.isNormalized ==true ? 'Enabled': 'Disabled',
|
|
1191
|
-
Billing: postData?.featureConfigs?.isbillingDisabled ==true ? 'Enabled': 'Disabled',
|
|
1192
|
-
CameraBlurring: postData?.featureConfigs?.isCameraDisabled ==true ? 'Enabled': 'Disabled',
|
|
1193
|
-
FootfallDirectory: postData?.featureConfigs?.isFootfallDirectory ==true ? 'Enabled': 'Disabled',
|
|
1194
|
-
NOBStatus: postData?.featureConfigs?.isNOB ==true ? 'Enabled': 'Disabled',
|
|
1195
|
-
EnableAnalyze: postData?.featureConfigs?.isNewDashboard ==true ? 'Enabled': 'Disabled',
|
|
1196
|
-
Traffic: postData?.featureConfigs?.isNewTraffic==true ? 'Enabled': 'Disabled',
|
|
1197
|
-
Zone: postData?.featureConfigs?.isNewZone ==true ? 'Enabled': 'Disabled',
|
|
1198
|
-
Zonev2: postData?.featureConfigs?.isNewZoneV2 ==true ? 'Enabled': 'Disabled',
|
|
1199
|
-
Reports: postData?.featureConfigs?.isNewReports ==true ? 'Enabled': 'Disabled',
|
|
1200
|
-
Trax: postData?.featureConfigs?.isTrax ==true ? 'Enabled': 'Disabled',
|
|
1201
|
-
StreamType: postData?.featureConfigs?.streamBy =='Edge' ? 'Edge App': 'RTSP',
|
|
1202
|
-
FootfallDirectoryOnlyAudit: postData?.featureConfigs?.isFootfallDirectoryAudit ==true ? 'Enabled': 'Disabled',
|
|
1203
|
-
FootfallDirectoryOnlyFew: postData?.featureConfigs?.isFootfallDirectoryLimit ==true ? 'Enabled': 'Disabled',
|
|
1190
|
+
ExcludedArea: postData?.featureConfigs?.isExcludedArea == true ? 'Enabled' : 'Disabled',
|
|
1191
|
+
PasserBydata: postData?.featureConfigs?.isPasserByData == true ? 'Enabled' : 'Disabled',
|
|
1192
|
+
NormalizedDataDuringDowntime: postData?.featureConfigs?.isNormalized == true ? 'Enabled' : 'Disabled',
|
|
1193
|
+
Billing: postData?.featureConfigs?.isbillingDisabled == true ? 'Enabled' : 'Disabled',
|
|
1194
|
+
CameraBlurring: postData?.featureConfigs?.isCameraDisabled == true ? 'Enabled' : 'Disabled',
|
|
1195
|
+
FootfallDirectory: postData?.featureConfigs?.isFootfallDirectory == true ? 'Enabled' : 'Disabled',
|
|
1196
|
+
NOBStatus: postData?.featureConfigs?.isNOB == true ? 'Enabled' : 'Disabled',
|
|
1197
|
+
EnableAnalyze: postData?.featureConfigs?.isNewDashboard == true ? 'Enabled' : 'Disabled',
|
|
1198
|
+
Traffic: postData?.featureConfigs?.isNewTraffic == true ? 'Enabled' : 'Disabled',
|
|
1199
|
+
Zone: postData?.featureConfigs?.isNewZone == true ? 'Enabled' : 'Disabled',
|
|
1200
|
+
Zonev2: postData?.featureConfigs?.isNewZoneV2 == true ? 'Enabled' : 'Disabled',
|
|
1201
|
+
Reports: postData?.featureConfigs?.isNewReports == true ? 'Enabled' : 'Disabled',
|
|
1202
|
+
Trax: postData?.featureConfigs?.isTrax == true ? 'Enabled' : 'Disabled',
|
|
1203
|
+
StreamType: postData?.featureConfigs?.streamBy == 'Edge' ? 'Edge App' : 'RTSP',
|
|
1204
|
+
FootfallDirectoryOnlyAudit: postData?.featureConfigs?.isFootfallDirectoryAudit == true ? 'Enabled' : 'Disabled',
|
|
1205
|
+
FootfallDirectoryOnlyFew: postData?.featureConfigs?.isFootfallDirectoryLimit == true ? 'Enabled' : 'Disabled',
|
|
1204
1206
|
|
|
1205
1207
|
};
|
|
1206
1208
|
|
|
@@ -1281,20 +1283,20 @@ export async function domainDetailsConfiguration( req, res ) {
|
|
|
1281
1283
|
// Map and rename keys from previous client info for UI display and logging
|
|
1282
1284
|
const oldData = {
|
|
1283
1285
|
DomainName: getPreData?.domainConfig?.ssoLogin?.domainName?.join( ', ' ),
|
|
1284
|
-
IsEnable: getPreData?.domainConfig?.ssoLogin?.isEnable ==true ? 'Enable': 'Disable',
|
|
1285
|
-
IPWhitelist: getPreData?.domainConfig?.ipWhitelisting?.enableWhitelisting ==true ? 'Enable': 'Disable',
|
|
1286
|
+
IsEnable: getPreData?.domainConfig?.ssoLogin?.isEnable == true ? 'Enable' : 'Disable',
|
|
1287
|
+
IPWhitelist: getPreData?.domainConfig?.ipWhitelisting?.enableWhitelisting == true ? 'Enable' : 'Disable',
|
|
1286
1288
|
WhitelistedIps: getPreData?.domainConfig?.ipWhitelisting?.allowedIps?.join( ', ' ),
|
|
1287
|
-
TwoFactorAuthentication: getPreData?.domainConfig?.enableOtp ==true ? 'Enable': 'Disable',
|
|
1289
|
+
TwoFactorAuthentication: getPreData?.domainConfig?.enableOtp == true ? 'Enable' : 'Disable',
|
|
1288
1290
|
|
|
1289
1291
|
};
|
|
1290
1292
|
|
|
1291
1293
|
// Map and rename keys from current client info for UI display and logging
|
|
1292
|
-
const newData ={
|
|
1294
|
+
const newData = {
|
|
1293
1295
|
DomainName: getPostData?.domainConfig?.ssoLogin?.domainName?.join( ', ' ),
|
|
1294
|
-
IsEnable: getPostData?.domainConfig?.ssoLogin?.isEnable ==true ? 'Enable': 'Disable',
|
|
1295
|
-
IPWhitelist: getPostData?.domainConfig?.ipWhitelisting?.enableWhitelisting ==true ? 'Enable': 'Disable',
|
|
1296
|
+
IsEnable: getPostData?.domainConfig?.ssoLogin?.isEnable == true ? 'Enable' : 'Disable',
|
|
1297
|
+
IPWhitelist: getPostData?.domainConfig?.ipWhitelisting?.enableWhitelisting == true ? 'Enable' : 'Disable',
|
|
1296
1298
|
WhitelistedIps: getPostData?.domainConfig?.ipWhitelisting?.allowedIps?.join( ', ' ),
|
|
1297
|
-
TwoFactorAuthentication: getPostData?.domainConfig?.enableOtp ==true ? 'Enable': 'Disable',
|
|
1299
|
+
TwoFactorAuthentication: getPostData?.domainConfig?.enableOtp == true ? 'Enable' : 'Disable',
|
|
1298
1300
|
};
|
|
1299
1301
|
|
|
1300
1302
|
logger.info( { getPreData: getPreData, getPostData: getPostData, newData: newData, oldData: oldData } );
|
|
@@ -1480,7 +1482,7 @@ export async function auditConfiguration( req, res ) {
|
|
|
1480
1482
|
auditConfigs: 1, _id: 0,
|
|
1481
1483
|
};
|
|
1482
1484
|
const previousClient = await findOneClient( query, fields );
|
|
1483
|
-
previousClient.auditConfigs.ratio = previousClient?.auditConfigs?.ratio? ( previousClient.auditConfigs.ratio )*100 : null;
|
|
1485
|
+
previousClient.auditConfigs.ratio = previousClient?.auditConfigs?.ratio ? ( previousClient.auditConfigs.ratio ) * 100 : null;
|
|
1484
1486
|
const record = {
|
|
1485
1487
|
'auditConfigs.count': inputData.count,
|
|
1486
1488
|
'auditConfigs.audit': inputData.audit,
|
|
@@ -1489,18 +1491,18 @@ export async function auditConfiguration( req, res ) {
|
|
|
1489
1491
|
await updateOneClient( query, record );
|
|
1490
1492
|
|
|
1491
1493
|
// Map and rename keys from previous client info for UI display and logging
|
|
1492
|
-
const oldData ={
|
|
1493
|
-
AuditStatus: previousClient?.auditConfigs?.audit ==true ? 'Enable': 'Disable',
|
|
1494
|
+
const oldData = {
|
|
1495
|
+
AuditStatus: previousClient?.auditConfigs?.audit == true ? 'Enable' : 'Disable',
|
|
1494
1496
|
MappingPercentage: previousClient?.auditConfigs?.ratio,
|
|
1495
1497
|
AuditCount: previousClient?.auditConfigs?.count,
|
|
1496
1498
|
};
|
|
1497
1499
|
|
|
1498
1500
|
const currentClient = await findOneClient( query, fields );
|
|
1499
|
-
currentClient.auditConfigs.ratio = currentClient?.auditConfigs?.ratio? ( currentClient.auditConfigs.ratio )*100 : null;
|
|
1501
|
+
currentClient.auditConfigs.ratio = currentClient?.auditConfigs?.ratio ? ( currentClient.auditConfigs.ratio ) * 100 : null;
|
|
1500
1502
|
|
|
1501
1503
|
// Map and rename keys from current client info for UI display and logging
|
|
1502
1504
|
const newData = {
|
|
1503
|
-
AuditStatus: currentClient?.auditConfigs?.audit ==true ? 'Enable': 'Disable',
|
|
1505
|
+
AuditStatus: currentClient?.auditConfigs?.audit == true ? 'Enable' : 'Disable',
|
|
1504
1506
|
MappingPercentage: currentClient?.auditConfigs?.ratio,
|
|
1505
1507
|
AuditCount: currentClient?.auditConfigs?.count,
|
|
1506
1508
|
|
|
@@ -2275,12 +2277,13 @@ export async function getActivityLogs1( req, res ) {
|
|
|
2275
2277
|
try {
|
|
2276
2278
|
const inputData = req.body;
|
|
2277
2279
|
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
2278
|
-
const clientQuery =[
|
|
2280
|
+
const clientQuery = [
|
|
2279
2281
|
{
|
|
2280
2282
|
$match: {
|
|
2281
2283
|
$and: [
|
|
2282
2284
|
{
|
|
2283
|
-
clientId: { $in: [ inputData?.clientId ] }
|
|
2285
|
+
clientId: { $in: [ inputData?.clientId ] },
|
|
2286
|
+
},
|
|
2284
2287
|
],
|
|
2285
2288
|
},
|
|
2286
2289
|
},
|
|
@@ -2298,7 +2301,7 @@ export async function getActivityLogs1( req, res ) {
|
|
|
2298
2301
|
},
|
|
2299
2302
|
];
|
|
2300
2303
|
const getClientName = await aggregateClient( clientQuery );
|
|
2301
|
-
if ( getClientName?.length == 0 || getClientName[0]?.clientName?.length ===0 ) {
|
|
2304
|
+
if ( getClientName?.length == 0 || getClientName[0]?.clientName?.length === 0 ) {
|
|
2302
2305
|
return res.sendError( 'No Data Found', 204 );
|
|
2303
2306
|
}
|
|
2304
2307
|
const query = {
|
|
@@ -2365,13 +2368,13 @@ export async function getActivityLogs1( req, res ) {
|
|
|
2365
2368
|
let temp = [];
|
|
2366
2369
|
if ( totalDocuments ) {
|
|
2367
2370
|
hits.map( ( hit, i ) => {
|
|
2368
|
-
let respo ={};
|
|
2369
|
-
hit._source.logSubType = hit._source.logSubType === 'documentUpload'? 'documentsUpload': hit._source.logSubType === 'domainDetails'? 'securityFeatures': hit?._source?.logSubType;
|
|
2370
|
-
if ( ( ( hit?._source?.eventType ).match( /update/ ) || ( hit?._source?.eventType ).match( /edit/ ) )&& hit?._source?.previous ) {
|
|
2371
|
-
const previous = hit?._source?.logType == 'cameras'?hit?._source?.oldData: hit?._source?.previous;
|
|
2372
|
-
const current=hit?._source?.logType == 'cameras'? hit?._source?.newData:hit?._source?.current;
|
|
2373
|
-
const logType =hit?._source?.logType;
|
|
2374
|
-
const logSubType =hit?._source?.logSubType;
|
|
2371
|
+
let respo = {};
|
|
2372
|
+
hit._source.logSubType = hit._source.logSubType === 'documentUpload' ? 'documentsUpload' : hit._source.logSubType === 'domainDetails' ? 'securityFeatures' : hit?._source?.logSubType;
|
|
2373
|
+
if ( ( ( hit?._source?.eventType ).match( /update/ ) || ( hit?._source?.eventType ).match( /edit/ ) ) && hit?._source?.previous ) {
|
|
2374
|
+
const previous = hit?._source?.logType == 'cameras' ? hit?._source?.oldData : hit?._source?.previous;
|
|
2375
|
+
const current = hit?._source?.logType == 'cameras' ? hit?._source?.newData : hit?._source?.current;
|
|
2376
|
+
const logType = hit?._source?.logType;
|
|
2377
|
+
const logSubType = hit?._source?.logSubType;
|
|
2375
2378
|
if ( previous && current && hit?._source?.logType == 'cameras' ) {
|
|
2376
2379
|
respo = findDifferences( previous, current );
|
|
2377
2380
|
} else {
|
|
@@ -2380,7 +2383,7 @@ export async function getActivityLogs1( req, res ) {
|
|
|
2380
2383
|
|
|
2381
2384
|
hit._source.updatedValue = respo;
|
|
2382
2385
|
temp.push( hit?._source );
|
|
2383
|
-
hit._source.changes =logSubType === 'ticketConfig'? Object.keys( respo ).map( ( item ) => item ) : hit._source.changes;
|
|
2386
|
+
hit._source.changes = logSubType === 'ticketConfig' ? Object.keys( respo ).map( ( item ) => item ) : hit._source.changes;
|
|
2384
2387
|
} else {
|
|
2385
2388
|
temp.push( hit?._source );
|
|
2386
2389
|
}
|
|
@@ -2405,7 +2408,7 @@ function findDifferences1( previous, current, logType, logSubType, path = '' ) {
|
|
|
2405
2408
|
] );
|
|
2406
2409
|
const documents = dbKeys.DOCUMENTS;
|
|
2407
2410
|
// Get correct key mapping based on logType
|
|
2408
|
-
const keyMapping = logType == 'stores' ?documents.stores: logType == 'users' ?documents.users :logSubType=='reportConfig'?documents.reports: logType=='brandInfo'?documents.client:documents.client;
|
|
2411
|
+
const keyMapping = logType == 'stores' ? documents.stores : logType == 'users' ? documents.users : logSubType == 'reportConfig' ? documents.reports : logType == 'brandInfo' ? documents.client : documents.client;
|
|
2409
2412
|
|
|
2410
2413
|
|
|
2411
2414
|
let differences = {};
|
|
@@ -2417,7 +2420,7 @@ function findDifferences1( previous, current, logType, logSubType, path = '' ) {
|
|
|
2417
2420
|
const currValue = current[key];
|
|
2418
2421
|
|
|
2419
2422
|
if ( typeof prevValue === 'object' && typeof currValue === 'object' && prevValue !== null && currValue !== null ) {
|
|
2420
|
-
if ( logSubType!== 'userUpdated' ) {
|
|
2423
|
+
if ( logSubType !== 'userUpdated' ) {
|
|
2421
2424
|
if ( key == 'spocDetails' ) {
|
|
2422
2425
|
if ( _.isEqual( prevValue, currValue ) ) {
|
|
2423
2426
|
continue;
|
|
@@ -2425,9 +2428,9 @@ function findDifferences1( previous, current, logType, logSubType, path = '' ) {
|
|
|
2425
2428
|
let result = compareArrayObjects( prevValue, currValue );
|
|
2426
2429
|
differences = { ...differences, ...result };
|
|
2427
2430
|
}
|
|
2428
|
-
} else if ( Array.isArray( prevValue ) && prevValue.every( ( item ) => typeof item === 'string' ) ||Array.isArray( currValue ) && currValue.every( ( item ) => typeof item === 'string' ) ) {
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
+
} else if ( Array.isArray( prevValue ) && prevValue.every( ( item ) => typeof item === 'string' ) || Array.isArray( currValue ) && currValue.every( ( item ) => typeof item === 'string' ) ) {
|
|
2432
|
+
JSON.stringify( prevValue ) !== JSON.stringify( currValue ) ?
|
|
2433
|
+
differences[`${path}${key}`] = { previous: prevValue.length > 0 ? prevValue.join( ',' ) : null, current: currValue.length > 0 ? currValue.join( ',' ) : null } : null;
|
|
2431
2434
|
|
|
2432
2435
|
// differences[`${path}${key}`] = { previous: removed.length> 0 ? prevValue.join( ',' ): prevValue.join( ', ' ) :, current: added.length > 0? addedUsers.join( ', ' ) : currValue.join( ',' ) } : null;
|
|
2433
2436
|
} else {
|
|
@@ -2498,13 +2501,13 @@ function findDifferences1( previous, current, logType, logSubType, path = '' ) {
|
|
|
2498
2501
|
|
|
2499
2502
|
if (
|
|
2500
2503
|
( diff.previous === '' || diff.previous === null || ( Array.isArray( diff.previous ) && diff.previous.length === 0 ) ) &&
|
|
2501
|
-
|
|
2504
|
+
diff.current === undefined
|
|
2502
2505
|
) {
|
|
2503
2506
|
return;
|
|
2504
2507
|
}
|
|
2505
2508
|
if (
|
|
2506
2509
|
( diff.current === '' || diff.current === null || ( Array.isArray( diff.current ) && diff.current.length === 0 ) ) &&
|
|
2507
|
-
|
|
2510
|
+
diff.previous === undefined
|
|
2508
2511
|
) {
|
|
2509
2512
|
return;
|
|
2510
2513
|
}
|
|
@@ -2535,7 +2538,7 @@ export async function getActivityLogs( req, res ) {
|
|
|
2535
2538
|
try {
|
|
2536
2539
|
const inputData = req.body;
|
|
2537
2540
|
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
2538
|
-
const clientQuery =[
|
|
2541
|
+
const clientQuery = [
|
|
2539
2542
|
{
|
|
2540
2543
|
$match: {
|
|
2541
2544
|
$and: [
|
|
@@ -2559,7 +2562,7 @@ export async function getActivityLogs( req, res ) {
|
|
|
2559
2562
|
},
|
|
2560
2563
|
];
|
|
2561
2564
|
const getClientName = await aggregateClient( clientQuery );
|
|
2562
|
-
if ( getClientName?.length == 0 || getClientName[0]?.clientName?.length ===0 ) {
|
|
2565
|
+
if ( getClientName?.length == 0 || getClientName[0]?.clientName?.length === 0 ) {
|
|
2563
2566
|
return res.sendError( 'No Data Found', 204 );
|
|
2564
2567
|
}
|
|
2565
2568
|
const query = {
|
|
@@ -2634,11 +2637,11 @@ export async function getActivityLogs( req, res ) {
|
|
|
2634
2637
|
let temp = [];
|
|
2635
2638
|
if ( totalDocuments ) {
|
|
2636
2639
|
hits.map( ( hit, i ) => {
|
|
2637
|
-
let respo ={};
|
|
2638
|
-
hit._source.logSubType = hit._source.logSubType === 'documentUpload'? 'documentsUpload': hit._source.logSubType === 'domainDetails'? 'securityFeatures': hit?._source?.logSubType;
|
|
2639
|
-
if ( ( ( hit?._source?.eventType ).match( /update/ ) || ( hit?._source?.eventType ).match( /edit/ ) )&& hit?._source?.previous ) {
|
|
2640
|
+
let respo = {};
|
|
2641
|
+
hit._source.logSubType = hit._source.logSubType === 'documentUpload' ? 'documentsUpload' : hit._source.logSubType === 'domainDetails' ? 'securityFeatures' : hit?._source?.logSubType;
|
|
2642
|
+
if ( ( ( hit?._source?.eventType ).match( /update/ ) || ( hit?._source?.eventType ).match( /edit/ ) ) && hit?._source?.previous ) {
|
|
2640
2643
|
const previous = hit?._source?.oldData;
|
|
2641
|
-
const current=hit?._source?.newData;
|
|
2644
|
+
const current = hit?._source?.newData;
|
|
2642
2645
|
if ( previous && current ) {
|
|
2643
2646
|
respo = findDifferences( previous, current );
|
|
2644
2647
|
}
|
|
@@ -2770,8 +2773,8 @@ function compareArrayObjects( prevArray, currArray ) {
|
|
|
2770
2773
|
|
|
2771
2774
|
Object.keys( { ...prevObj, ...currObj } ).forEach( ( key ) => {
|
|
2772
2775
|
if ( prevObj[key] !== currObj[key] && key !== '_id' ) {
|
|
2773
|
-
const key1 = key == 'contact'? 'Contact Number': key == 'email'? 'Email ID':key == 'name'?'Name': key == 'designation'?'Designation':key;
|
|
2774
|
-
const name = i ==0? 'Primary Spoc': `Alternate Spoc ${i+1}`;
|
|
2776
|
+
const key1 = key == 'contact' ? 'Contact Number' : key == 'email' ? 'Email ID' : key == 'name' ? 'Name' : key == 'designation' ? 'Designation' : key;
|
|
2777
|
+
const name = i == 0 ? 'Primary Spoc' : `Alternate Spoc ${i + 1}`;
|
|
2775
2778
|
diff[`${name} ${key1}`] = {
|
|
2776
2779
|
previous: prevObj[key] || 'null',
|
|
2777
2780
|
current: currObj[key] || 'null',
|
|
@@ -2787,3 +2790,120 @@ function compareArrayObjects( prevArray, currArray ) {
|
|
|
2787
2790
|
|
|
2788
2791
|
return changes;
|
|
2789
2792
|
}
|
|
2793
|
+
|
|
2794
|
+
|
|
2795
|
+
export async function createAuditConfig( req, res ) {
|
|
2796
|
+
try {
|
|
2797
|
+
await createauditConfig( req.body );
|
|
2798
|
+
return res.sendSuccess( 'created Sucessfully' );
|
|
2799
|
+
} catch ( error ) {
|
|
2800
|
+
logger.error( { error: error, message: req.body, function: 'createAuditConfig' } );
|
|
2801
|
+
return res.sendError( 'Internal Server Error', 500 );
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
export async function updateAuditConfig( req, res ) {
|
|
2805
|
+
try {
|
|
2806
|
+
await updateauditConfig( { _id: req.params.id }, req.body );
|
|
2807
|
+
return res.sendSuccess( 'updated Sucessfully' );
|
|
2808
|
+
} catch ( error ) {
|
|
2809
|
+
logger.error( { error: error, message: req.body, function: 'createAuditConfig' } );
|
|
2810
|
+
return res.sendError( 'Internal Server Error', 500 );
|
|
2811
|
+
}
|
|
2812
|
+
}
|
|
2813
|
+
export async function AuditConfiglist( req, res ) {
|
|
2814
|
+
try {
|
|
2815
|
+
let Query = [ {
|
|
2816
|
+
$match: {
|
|
2817
|
+
'$and': [
|
|
2818
|
+
{ 'clientId': { $in: req.body.clientId } },
|
|
2819
|
+
],
|
|
2820
|
+
},
|
|
2821
|
+
} ];
|
|
2822
|
+
if ( req.body.searchValue && req.body.searchValue !== '' ) {
|
|
2823
|
+
const searchCondition = {
|
|
2824
|
+
$match: {
|
|
2825
|
+
$or: [
|
|
2826
|
+
{ AuditName: { $regex: req.body.searchValue, $options: 'i' } },
|
|
2827
|
+
{ keyWord: { $regex: req.body.searchValue, $options: 'i' } },
|
|
2828
|
+
],
|
|
2829
|
+
},
|
|
2830
|
+
};
|
|
2831
|
+
|
|
2832
|
+
Query.push( searchCondition );
|
|
2833
|
+
}
|
|
2834
|
+
if ( req.body.sortColumName && req.body.sortColumName !== '' && req.body.sortBy ) {
|
|
2835
|
+
const sortOption = { $sort: { [req.body.sortColumName]: req.body.sortBy } };
|
|
2836
|
+
Query.push( sortOption );
|
|
2837
|
+
} else {
|
|
2838
|
+
const sortOption = { $sort: { 'AuditName': -1 } };
|
|
2839
|
+
Query.push( sortOption );
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
let count = await aggregateAuditconfig( Query );
|
|
2843
|
+
|
|
2844
|
+
if ( req.body.limit && req.body.offset && !req.body.export ) {
|
|
2845
|
+
const skipValue = ( req.body.offset - 1 ) * req.body.limit;
|
|
2846
|
+
const limitValue = Number( req.body.limit );
|
|
2847
|
+
|
|
2848
|
+
const pagination = [
|
|
2849
|
+
{ $skip: skipValue },
|
|
2850
|
+
{ $limit: limitValue },
|
|
2851
|
+
];
|
|
2852
|
+
|
|
2853
|
+
Query.push( ...pagination );
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
let result = await aggregateAuditconfig( Query );
|
|
2857
|
+
|
|
2858
|
+
if ( req.body.export && result.length > 0 ) {
|
|
2859
|
+
const exportdata = result.map( ( element ) => {
|
|
2860
|
+
return {
|
|
2861
|
+
'Audit Name': element.AuditName,
|
|
2862
|
+
'Keyword': element.keyWord,
|
|
2863
|
+
'File Type': element.fileType,
|
|
2864
|
+
'Response Type': element.responseType,
|
|
2865
|
+
'Status': element.status,
|
|
2866
|
+
};
|
|
2867
|
+
} );
|
|
2868
|
+
await download( exportdata, res );
|
|
2869
|
+
return;
|
|
2870
|
+
}
|
|
2871
|
+
return res.sendSuccess( { result: result, totalCount: count.length } );
|
|
2872
|
+
} catch ( error ) {
|
|
2873
|
+
logger.error( { error: error, message: req.body, function: 'createAuditConfig' } );
|
|
2874
|
+
return res.sendError( 'Internal Server Error', 500 );
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
|
|
2879
|
+
export async function revopconfig( req, res ) {
|
|
2880
|
+
try {
|
|
2881
|
+
let result = await findOnerevopConfig( { clientId: req.body.clientId } );
|
|
2882
|
+
|
|
2883
|
+
if ( result===null ) {
|
|
2884
|
+
await createrevopConfig( req.body );
|
|
2885
|
+
return res.sendSuccess( 'revopconfig created Sucessfully' );
|
|
2886
|
+
} else {
|
|
2887
|
+
await updaterevopConfig( { clientId: req.body.clientId }, req.body );
|
|
2888
|
+
return res.sendSuccess( 'revopconfig updated Sucessfully' );
|
|
2889
|
+
}
|
|
2890
|
+
} catch ( error ) {
|
|
2891
|
+
logger.error( { error: error, message: req.body, function: 'revopconfig' } );
|
|
2892
|
+
return res.sendError( 'Internal Server Error', 500 );
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
export async function getrevopconfig( req, res ) {
|
|
2897
|
+
try {
|
|
2898
|
+
let result = await findOnerevopConfig( { clientId: req.query.clientId } );
|
|
2899
|
+
if ( result===null ) {
|
|
2900
|
+
return res.sendError( 'no data found', 204 );
|
|
2901
|
+
}
|
|
2902
|
+
return res.sendSuccess( result );
|
|
2903
|
+
} catch ( error ) {
|
|
2904
|
+
logger.error( { error: error, message: req.query, function: 'revopconfig' } );
|
|
2905
|
+
return res.sendError( 'Internal Server Error', 500 );
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
|
package/src/dtos/client.dtos.js
CHANGED
|
@@ -298,3 +298,43 @@ export const postClientCamApprovalValid = {
|
|
|
298
298
|
query: postClientCamApprovalSchamaQuery,
|
|
299
299
|
body: postClientCamApprovalSchamaBody,
|
|
300
300
|
};
|
|
301
|
+
export const createAuditConfigBody = joi.object( {
|
|
302
|
+
AuditName: joi.string().required(),
|
|
303
|
+
keyWord: joi.string().required(),
|
|
304
|
+
fileType: joi.string().required(),
|
|
305
|
+
status: joi.string().required(),
|
|
306
|
+
responseType: joi.string().required(),
|
|
307
|
+
clientId: joi.string().required(),
|
|
308
|
+
} );
|
|
309
|
+
export const AuditConfiglistValid = joi.object( {
|
|
310
|
+
isExport: joi.boolean().optional(),
|
|
311
|
+
searchValue: joi.string().optional(),
|
|
312
|
+
sortColumName: joi.string().optional(),
|
|
313
|
+
sortBy: joi.number().optional(),
|
|
314
|
+
clientId: joi.array().required(),
|
|
315
|
+
limit: joi.number().optional(),
|
|
316
|
+
offset: joi.number().optional(),
|
|
317
|
+
} );
|
|
318
|
+
export const createAuditConfigValid = {
|
|
319
|
+
body: createAuditConfigBody,
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
export const revopconfigBody = joi.object( {
|
|
323
|
+
clientId: joi.string().required(),
|
|
324
|
+
issueList: joi.array().items(
|
|
325
|
+
joi.object( {
|
|
326
|
+
name: joi.string().required(),
|
|
327
|
+
issues: joi.array().required(),
|
|
328
|
+
} ),
|
|
329
|
+
).required(),
|
|
330
|
+
} );
|
|
331
|
+
export const revopconfiggetBody = joi.object( {
|
|
332
|
+
clientId: joi.string().required(),
|
|
333
|
+
} );
|
|
334
|
+
|
|
335
|
+
export const revopconfigValid = {
|
|
336
|
+
body: revopconfigBody,
|
|
337
|
+
};
|
|
338
|
+
export const revopconfiggetValid = {
|
|
339
|
+
query: revopconfiggetBody,
|
|
340
|
+
};
|
|
@@ -1,171 +1,171 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
6
|
-
<title>Your account was approved!</title>
|
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
-
<style type="text/css">
|
|
9
|
-
@media screen {
|
|
10
|
-
@font-face {
|
|
11
|
-
font-family: 'Inter';
|
|
12
|
-
font-style: normal;
|
|
13
|
-
font-weight: 400;
|
|
14
|
-
font-display: swap;
|
|
15
|
-
src: local("Inter"), local("Inter-Regular"), url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiI2B.woff2) format('woff2');
|
|
16
|
-
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
body {
|
|
21
|
-
font-family: "Inter", sans-serif !important;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
body,
|
|
25
|
-
table,
|
|
26
|
-
td,
|
|
27
|
-
a {
|
|
28
|
-
-ms-text-size-adjust: 100%;
|
|
29
|
-
-webkit-text-size-adjust: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
table,
|
|
33
|
-
td {
|
|
34
|
-
mso-table-rspace: 0pt;
|
|
35
|
-
mso-table-lspace: 0pt;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
img {
|
|
39
|
-
-ms-interpolation-mode: bicubic;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
a[x-apple-data-detectors] {
|
|
43
|
-
font-family: "inherit" !important;
|
|
44
|
-
font-size: inherit !important;
|
|
45
|
-
font-weight: inherit !important;
|
|
46
|
-
line-height: inherit !important;
|
|
47
|
-
color: inherit !important;
|
|
48
|
-
text-decoration: none !important;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
div[style*="margin: 16px 0;"] {
|
|
52
|
-
margin: 0 !important;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
body {
|
|
56
|
-
width: 100% !important;
|
|
57
|
-
height: 100% !important;
|
|
58
|
-
padding: 0 !important;
|
|
59
|
-
margin: 0 !important;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
table {
|
|
63
|
-
border-collapse: collapse !important;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
a {
|
|
67
|
-
color: #1a82e2;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
img {
|
|
71
|
-
height: auto;
|
|
72
|
-
line-height: 100%;
|
|
73
|
-
text-decoration: none;
|
|
74
|
-
border: 0;
|
|
75
|
-
outline: none;
|
|
76
|
-
}
|
|
77
|
-
</style>
|
|
78
|
-
</head>
|
|
79
|
-
<body style="background-color: #dbe5ea;">
|
|
80
|
-
<div class="preheader" style="display: none; max-width: 0; max-height: 0; overflow: hidden; font-size: 1px; line-height: 1px; color: #fff; opacity: 0;"> Email Summary (Hidden) </div>
|
|
81
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-left:10px;padding-right:10px">
|
|
82
|
-
<tr>
|
|
83
|
-
<td bgcolor="#dbe5ea" style="padding:32px 10px 0 10px">
|
|
84
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;" align="center">
|
|
85
|
-
<tr>
|
|
86
|
-
<td class="o_bg-white o_px-md o_py-md o_sans o_text" style="margin-top: 0px;margin-bottom: 0px;font-size: 16px;line-height: 24px;background-color: #ffffff;padding-left: 18px;padding-right: 24px;padding-top: 24px;padding-bottom: 24px;">
|
|
87
|
-
<p style="margin-top: 0px;margin-bottom: 0px;">
|
|
88
|
-
<a class="o_text-white" href="https://tangoeye.ai/" style="text-decoration: none;outline: none;color: #ffffff;">
|
|
89
|
-
<img src={{logo}} width="200" height="100" alt="SimpleApp" style="-ms-interpolation-mode: bicubic;vertical-align: middle;border: 0;line-height: 100%;height: auto;outline: none;text-decoration: none;">
|
|
90
|
-
</a>
|
|
91
|
-
</p>
|
|
92
|
-
</td>
|
|
93
|
-
</tr>
|
|
94
|
-
<tr>
|
|
95
|
-
<td align="left" bgcolor="#ffffff" style="padding-left: 30px;padding-right: 24px; font-size: 14px; line-height: 24px;">
|
|
96
|
-
<p class="o_heading o_mb-xxs" style="width: 544px;height: 0px;border: 1px solid #CBD5E1;flex: none;order: 1;flex-grow: 0;"></p>
|
|
97
|
-
</td>
|
|
98
|
-
</tr>
|
|
99
|
-
</table>
|
|
100
|
-
</td>
|
|
101
|
-
</tr>
|
|
102
|
-
<tr>
|
|
103
|
-
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
104
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
105
|
-
<tr>
|
|
106
|
-
<td class="o_bg-white o_px-md o_py-xl o_xs-py-md" style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-top: 10px;padding-bottom: 10px;">
|
|
107
|
-
<div class="o_col-6s o_sans o_text-md o_text-light o_center" style="margin-top: 0px;margin-bottom: 0px;font-size: 20px;line-height: 28px;color: #82899a;">
|
|
108
|
-
<span class="o_heading o_text-dark o_mb-xxs" style="font-weight: 700;margin-top: 0px;margin-bottom: 4px;color: #242b3d;line-height: 39px;"> Your account was approved!</span>
|
|
109
|
-
</div>
|
|
110
|
-
</td>
|
|
111
|
-
</tr>
|
|
112
|
-
</table>
|
|
113
|
-
</td>
|
|
114
|
-
</tr>
|
|
115
|
-
<tr>
|
|
116
|
-
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
117
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
118
|
-
<tr>
|
|
119
|
-
<td align="left" bgcolor="#ffffff" style="padding-left: 30px;padding-right: 24px; font-size: 16px;padding-top:10px; line-height: 24px;font-weight:400;color:#384860">
|
|
120
|
-
<p style="margin: 0;">As a verified user, you will be among the first to receive product updates, new feature announcements, enhanced security and personalised support.
|
|
121
|
-
<br><br>
|
|
122
|
-
Head over to the dashboard to finish your setup. </p>
|
|
123
|
-
</td>
|
|
124
|
-
</tr>
|
|
125
|
-
</table>
|
|
126
|
-
</td>
|
|
127
|
-
</tr>
|
|
128
|
-
<tr>
|
|
129
|
-
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
130
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
131
|
-
<tr>
|
|
132
|
-
<td align="left" bgcolor="#fff" style="border-radius: 6px;padding:14px 30px">
|
|
133
|
-
<a href={{url}} style="display: inline-block;padding: 10px 36px;font-size: 20px;color: #fff;text-decoration: none;border-radius: 6px;background-color: #00a3ff;"> Add Stores</a>
|
|
134
|
-
</td>
|
|
135
|
-
</tr>
|
|
136
|
-
</table>
|
|
137
|
-
</td>
|
|
138
|
-
</tr>
|
|
139
|
-
<tr>
|
|
140
|
-
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
141
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
142
|
-
<tr>
|
|
143
|
-
<td align="left" bgcolor="#ffffff" style="padding-left: 30px;padding-right: 24px; font-size: 16px;padding-top:10px; line-height: 24px;font-weight:400;color:#384860">
|
|
144
|
-
<p style="margin: 0;">Enjoy the full potential of Tango Traffic Module. If you have any questions or need assistance, our support team is here to help.
|
|
145
|
-
|
|
146
|
-
<br><br>
|
|
147
|
-
|
|
148
|
-
Happy exploring! </p>
|
|
149
|
-
</td>
|
|
150
|
-
</tr>
|
|
151
|
-
</table>
|
|
152
|
-
</td>
|
|
153
|
-
</tr>
|
|
154
|
-
<tr>
|
|
155
|
-
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 32px 10px">
|
|
156
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
157
|
-
<tr>
|
|
158
|
-
<td class="o_bg-white o_px-md o_py-xl o_xs-py-md" style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-bottom:15px">
|
|
159
|
-
<div class="o_col-6s o_sans o_text-md o_text-light o_center" style="margin-top: 0px;margin-bottom: 0px;font-size: 12px;color: #202B3C;font-style: normal;font-weight: 400;font-size: 12px;line-height: 150%;">
|
|
160
|
-
<br>
|
|
161
|
-
<p>If you'd rather not receive this kind of email, Don’t want any more emails from TangoEye?<u style="color:#00A3FF">Unsubscribe</u>.</p>
|
|
162
|
-
<p> © Tango Eye. All rights reserved.</p>
|
|
163
|
-
</div>
|
|
164
|
-
</td>
|
|
165
|
-
</tr>
|
|
166
|
-
</table>
|
|
167
|
-
</td>
|
|
168
|
-
</tr>
|
|
169
|
-
</table>
|
|
170
|
-
</body>
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
6
|
+
<title>Your account was approved!</title>
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
<style type="text/css">
|
|
9
|
+
@media screen {
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: 'Inter';
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 400;
|
|
14
|
+
font-display: swap;
|
|
15
|
+
src: local("Inter"), local("Inter-Regular"), url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiI2B.woff2) format('woff2');
|
|
16
|
+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
body {
|
|
21
|
+
font-family: "Inter", sans-serif !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
body,
|
|
25
|
+
table,
|
|
26
|
+
td,
|
|
27
|
+
a {
|
|
28
|
+
-ms-text-size-adjust: 100%;
|
|
29
|
+
-webkit-text-size-adjust: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
table,
|
|
33
|
+
td {
|
|
34
|
+
mso-table-rspace: 0pt;
|
|
35
|
+
mso-table-lspace: 0pt;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
img {
|
|
39
|
+
-ms-interpolation-mode: bicubic;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
a[x-apple-data-detectors] {
|
|
43
|
+
font-family: "inherit" !important;
|
|
44
|
+
font-size: inherit !important;
|
|
45
|
+
font-weight: inherit !important;
|
|
46
|
+
line-height: inherit !important;
|
|
47
|
+
color: inherit !important;
|
|
48
|
+
text-decoration: none !important;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
div[style*="margin: 16px 0;"] {
|
|
52
|
+
margin: 0 !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
body {
|
|
56
|
+
width: 100% !important;
|
|
57
|
+
height: 100% !important;
|
|
58
|
+
padding: 0 !important;
|
|
59
|
+
margin: 0 !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
table {
|
|
63
|
+
border-collapse: collapse !important;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
a {
|
|
67
|
+
color: #1a82e2;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
img {
|
|
71
|
+
height: auto;
|
|
72
|
+
line-height: 100%;
|
|
73
|
+
text-decoration: none;
|
|
74
|
+
border: 0;
|
|
75
|
+
outline: none;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
78
|
+
</head>
|
|
79
|
+
<body style="background-color: #dbe5ea;">
|
|
80
|
+
<div class="preheader" style="display: none; max-width: 0; max-height: 0; overflow: hidden; font-size: 1px; line-height: 1px; color: #fff; opacity: 0;"> Email Summary (Hidden) </div>
|
|
81
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-left:10px;padding-right:10px">
|
|
82
|
+
<tr>
|
|
83
|
+
<td bgcolor="#dbe5ea" style="padding:32px 10px 0 10px">
|
|
84
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;" align="center">
|
|
85
|
+
<tr>
|
|
86
|
+
<td class="o_bg-white o_px-md o_py-md o_sans o_text" style="margin-top: 0px;margin-bottom: 0px;font-size: 16px;line-height: 24px;background-color: #ffffff;padding-left: 18px;padding-right: 24px;padding-top: 24px;padding-bottom: 24px;">
|
|
87
|
+
<p style="margin-top: 0px;margin-bottom: 0px;">
|
|
88
|
+
<a class="o_text-white" href="https://tangoeye.ai/" style="text-decoration: none;outline: none;color: #ffffff;">
|
|
89
|
+
<img src={{logo}} width="200" height="100" alt="SimpleApp" style="-ms-interpolation-mode: bicubic;vertical-align: middle;border: 0;line-height: 100%;height: auto;outline: none;text-decoration: none;">
|
|
90
|
+
</a>
|
|
91
|
+
</p>
|
|
92
|
+
</td>
|
|
93
|
+
</tr>
|
|
94
|
+
<tr>
|
|
95
|
+
<td align="left" bgcolor="#ffffff" style="padding-left: 30px;padding-right: 24px; font-size: 14px; line-height: 24px;">
|
|
96
|
+
<p class="o_heading o_mb-xxs" style="width: 544px;height: 0px;border: 1px solid #CBD5E1;flex: none;order: 1;flex-grow: 0;"></p>
|
|
97
|
+
</td>
|
|
98
|
+
</tr>
|
|
99
|
+
</table>
|
|
100
|
+
</td>
|
|
101
|
+
</tr>
|
|
102
|
+
<tr>
|
|
103
|
+
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
104
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
105
|
+
<tr>
|
|
106
|
+
<td class="o_bg-white o_px-md o_py-xl o_xs-py-md" style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-top: 10px;padding-bottom: 10px;">
|
|
107
|
+
<div class="o_col-6s o_sans o_text-md o_text-light o_center" style="margin-top: 0px;margin-bottom: 0px;font-size: 20px;line-height: 28px;color: #82899a;">
|
|
108
|
+
<span class="o_heading o_text-dark o_mb-xxs" style="font-weight: 700;margin-top: 0px;margin-bottom: 4px;color: #242b3d;line-height: 39px;"> Your account was approved!</span>
|
|
109
|
+
</div>
|
|
110
|
+
</td>
|
|
111
|
+
</tr>
|
|
112
|
+
</table>
|
|
113
|
+
</td>
|
|
114
|
+
</tr>
|
|
115
|
+
<tr>
|
|
116
|
+
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
117
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
118
|
+
<tr>
|
|
119
|
+
<td align="left" bgcolor="#ffffff" style="padding-left: 30px;padding-right: 24px; font-size: 16px;padding-top:10px; line-height: 24px;font-weight:400;color:#384860">
|
|
120
|
+
<p style="margin: 0;">As a verified user, you will be among the first to receive product updates, new feature announcements, enhanced security and personalised support.
|
|
121
|
+
<br><br>
|
|
122
|
+
Head over to the dashboard to finish your setup. </p>
|
|
123
|
+
</td>
|
|
124
|
+
</tr>
|
|
125
|
+
</table>
|
|
126
|
+
</td>
|
|
127
|
+
</tr>
|
|
128
|
+
<tr>
|
|
129
|
+
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
130
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
131
|
+
<tr>
|
|
132
|
+
<td align="left" bgcolor="#fff" style="border-radius: 6px;padding:14px 30px">
|
|
133
|
+
<a href={{url}} style="display: inline-block;padding: 10px 36px;font-size: 20px;color: #fff;text-decoration: none;border-radius: 6px;background-color: #00a3ff;"> Add Stores</a>
|
|
134
|
+
</td>
|
|
135
|
+
</tr>
|
|
136
|
+
</table>
|
|
137
|
+
</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
141
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
142
|
+
<tr>
|
|
143
|
+
<td align="left" bgcolor="#ffffff" style="padding-left: 30px;padding-right: 24px; font-size: 16px;padding-top:10px; line-height: 24px;font-weight:400;color:#384860">
|
|
144
|
+
<p style="margin: 0;">Enjoy the full potential of Tango Traffic Module. If you have any questions or need assistance, our support team is here to help.
|
|
145
|
+
|
|
146
|
+
<br><br>
|
|
147
|
+
|
|
148
|
+
Happy exploring! </p>
|
|
149
|
+
</td>
|
|
150
|
+
</tr>
|
|
151
|
+
</table>
|
|
152
|
+
</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 32px 10px">
|
|
156
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
157
|
+
<tr>
|
|
158
|
+
<td class="o_bg-white o_px-md o_py-xl o_xs-py-md" style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-bottom:15px">
|
|
159
|
+
<div class="o_col-6s o_sans o_text-md o_text-light o_center" style="margin-top: 0px;margin-bottom: 0px;font-size: 12px;color: #202B3C;font-style: normal;font-weight: 400;font-size: 12px;line-height: 150%;">
|
|
160
|
+
<br>
|
|
161
|
+
<p>If you'd rather not receive this kind of email, Don’t want any more emails from TangoEye?<u style="color:#00A3FF">Unsubscribe</u>.</p>
|
|
162
|
+
<p> © Tango Eye. All rights reserved.</p>
|
|
163
|
+
</div>
|
|
164
|
+
</td>
|
|
165
|
+
</tr>
|
|
166
|
+
</table>
|
|
167
|
+
</td>
|
|
168
|
+
</tr>
|
|
169
|
+
</table>
|
|
170
|
+
</body>
|
|
171
171
|
</html> `
|
|
@@ -3,9 +3,9 @@ import express from 'express';
|
|
|
3
3
|
import { activityLogValid, auditConfigValid, billingDetailsValid, brandInfoValid, clientCreationValid, clientDetailsValid, documentsValid, domainDetailsValid, featureConfigurationValid, getAssignedClientValid, getAuditConfigValid, postClientCamApprovalValid, signatoryDetailsValid, ticketConfigurationValid, userConfigurationValid } from '../dtos/client.dtos.js';
|
|
4
4
|
import { auditConfiguration, changeStatus, clientCsmAssignAction, clientDetails, create, csmAssignConfirmation, domainDetailsConfiguration, getActivityLogs, getAuditConfiguration, getClients, getCsmUsers, getOpsUsers, updateBillingDetails, updateBrandInfo, updateDocuments, updateFeatureConfiguration, updateSignatoryDetails, updateTicketConfiguration, userConfiguration } from '../controllers/client.controllers.js';
|
|
5
5
|
import { accessVerification, isAllowedSessionHandler, validate } from 'tango-app-api-middleware';
|
|
6
|
-
import { clientListValid, detailedClientCountValid } from '../dtos/client.dtos.js';
|
|
6
|
+
import { clientListValid, detailedClientCountValid, createAuditConfigValid, AuditConfiglistValid, revopconfigValid, revopconfiggetValid } from '../dtos/client.dtos.js';
|
|
7
7
|
import { isclientIdExists, isclientNameExists, roleVerification } from '../validations/client.validations.js';
|
|
8
|
-
import { detailedAllClientCount, detailedClientCount, clientList, clientListV1 } from '../controllers/client.controllers.js';
|
|
8
|
+
import { detailedAllClientCount, detailedClientCount, clientList, clientListV1, createAuditConfig, updateAuditConfig, AuditConfiglist, revopconfig, getrevopconfig } from '../controllers/client.controllers.js';
|
|
9
9
|
|
|
10
10
|
export const clientRouter = express.Router();
|
|
11
11
|
|
|
@@ -98,4 +98,18 @@ clientRouter.get( '/show-csm-assign-confirmation', isAllowedSessionHandler,
|
|
|
98
98
|
clientRouter.post( '/client-csm-assign-action', isAllowedSessionHandler,
|
|
99
99
|
validate( postClientCamApprovalValid ), clientCsmAssignAction );
|
|
100
100
|
|
|
101
|
+
clientRouter.post( '/createAuditConfig', isAllowedSessionHandler,
|
|
102
|
+
validate( createAuditConfigValid ), createAuditConfig );
|
|
103
|
+
|
|
104
|
+
clientRouter.put( '/updateAuditConfig/:id', isAllowedSessionHandler,
|
|
105
|
+
validate( createAuditConfigValid ), updateAuditConfig );
|
|
106
|
+
|
|
107
|
+
clientRouter.post( '/AuditConfiglist', isAllowedSessionHandler,
|
|
108
|
+
validate( AuditConfiglistValid ), AuditConfiglist );
|
|
109
|
+
|
|
110
|
+
clientRouter.post( '/revopconfig', isAllowedSessionHandler,
|
|
111
|
+
validate( revopconfigValid ), revopconfig );
|
|
112
|
+
clientRouter.get( '/revopconfig', isAllowedSessionHandler,
|
|
113
|
+
validate( revopconfiggetValid ), getrevopconfig );
|
|
114
|
+
|
|
101
115
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import auditConfigModel from 'tango-api-schema/schema/auditConfig.model.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export async function createauditConfig( field = {} ) {
|
|
5
|
+
return await auditConfigModel.create( field );
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export async function updateauditConfig( data={}, field = {} ) {
|
|
9
|
+
return await auditConfigModel.updateOne( data, { $set: field } );
|
|
10
|
+
};
|
|
11
|
+
export async function aggregateAuditconfig( data ) {
|
|
12
|
+
return await auditConfigModel.aggregate( data );
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import revopConfigModel from 'tango-api-schema/schema/revopConfig.model.js';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export async function createrevopConfig( field = {} ) {
|
|
5
|
+
return await revopConfigModel.create( field );
|
|
6
|
+
};
|
|
7
|
+
export async function findOnerevopConfig( query = {} ) {
|
|
8
|
+
return await revopConfigModel.findOne( query );
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export async function updaterevopConfig( data={}, field = {} ) {
|
|
12
|
+
return await revopConfigModel.updateOne( data, { $set: field } );
|
|
13
|
+
};
|
|
14
|
+
export async function aggregaterevopconfig( data ) {
|
|
15
|
+
return await revopConfigModel.aggregate( data );
|
|
16
|
+
};
|