tango-app-api-client 3.6.3 → 3.6.5-vms.0
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,46 +1,46 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "tango-app-api-client",
|
|
3
|
-
"version": "3.6.
|
|
4
|
-
"description": "client",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"start": "nodemon --exec \"eslint --fix . && node app.js\"",
|
|
9
|
-
"build:patch": "node build.js patch && npm publish",
|
|
10
|
-
"build:minor": "node build.js minor && npm publish",
|
|
11
|
-
"build:major": "node build.js major && npm publish"
|
|
12
|
-
},
|
|
13
|
-
"engines": {
|
|
14
|
-
"node": ">=18.10.0"
|
|
15
|
-
},
|
|
16
|
-
"author": "praveenraj",
|
|
17
|
-
"license": "ISC",
|
|
18
|
-
"dependencies": {
|
|
19
|
-
"aws-sdk": "^2.1560.0",
|
|
20
|
-
"cors": "^2.8.5",
|
|
21
|
-
"dotenv": "^16.4.4",
|
|
22
|
-
"express": "^4.18.2",
|
|
23
|
-
"express-fileupload": "^1.4.3",
|
|
24
|
-
"handlebars": "^4.7.8",
|
|
25
|
-
"joi": "^17.12.1",
|
|
26
|
-
"joi-to-swagger": "^6.2.0",
|
|
27
|
-
"lodash": "^4.17.21",
|
|
28
|
-
"mongodb": "^6.7.0",
|
|
29
|
-
"nodemon": "^3.0.3",
|
|
30
|
-
"npm": "^10.9.1",
|
|
31
|
-
"sharp": "^0.34.3",
|
|
32
|
-
"swagger-ui-express": "^5.0.0",
|
|
33
|
-
"tango-api-schema": "^2.4.
|
|
34
|
-
"tango-app-api-middleware": "^3.6.0",
|
|
35
|
-
"winston": "^3.11.0",
|
|
36
|
-
"winston-daily-rotate-file": "^5.0.0"
|
|
37
|
-
},
|
|
38
|
-
"devDependencies": {
|
|
39
|
-
"eslint": "^8.56.0",
|
|
40
|
-
"eslint-config-google": "^0.14.0",
|
|
41
|
-
"eslint-config-semistandard": "^17.0.0",
|
|
42
|
-
"eslint-config-standard": "^17.1.0",
|
|
43
|
-
"eslint-plugin-import": "^2.29.1",
|
|
44
|
-
"eslint-plugin-promise": "^6.1.1"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tango-app-api-client",
|
|
3
|
+
"version": "3.6.5-vms.0",
|
|
4
|
+
"description": "client",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node app.js\"",
|
|
9
|
+
"build:patch": "node build.js patch && npm publish",
|
|
10
|
+
"build:minor": "node build.js minor && npm publish",
|
|
11
|
+
"build:major": "node build.js major && npm publish"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18.10.0"
|
|
15
|
+
},
|
|
16
|
+
"author": "praveenraj",
|
|
17
|
+
"license": "ISC",
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"aws-sdk": "^2.1560.0",
|
|
20
|
+
"cors": "^2.8.5",
|
|
21
|
+
"dotenv": "^16.4.4",
|
|
22
|
+
"express": "^4.18.2",
|
|
23
|
+
"express-fileupload": "^1.4.3",
|
|
24
|
+
"handlebars": "^4.7.8",
|
|
25
|
+
"joi": "^17.12.1",
|
|
26
|
+
"joi-to-swagger": "^6.2.0",
|
|
27
|
+
"lodash": "^4.17.21",
|
|
28
|
+
"mongodb": "^6.7.0",
|
|
29
|
+
"nodemon": "^3.0.3",
|
|
30
|
+
"npm": "^10.9.1",
|
|
31
|
+
"sharp": "^0.34.3",
|
|
32
|
+
"swagger-ui-express": "^5.0.0",
|
|
33
|
+
"tango-api-schema": "^2.4.19",
|
|
34
|
+
"tango-app-api-middleware": "^3.6.0",
|
|
35
|
+
"winston": "^3.11.0",
|
|
36
|
+
"winston-daily-rotate-file": "^5.0.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"eslint": "^8.56.0",
|
|
40
|
+
"eslint-config-google": "^0.14.0",
|
|
41
|
+
"eslint-config-semistandard": "^17.0.0",
|
|
42
|
+
"eslint-config-standard": "^17.1.0",
|
|
43
|
+
"eslint-plugin-import": "^2.29.1",
|
|
44
|
+
"eslint-plugin-promise": "^6.1.1"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -1162,6 +1162,7 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1162
1162
|
AIManager: previousData?.featureConfigs?.isAIManager == true ? 'Enabled' : 'Disabled',
|
|
1163
1163
|
AIManagerAccessControl: previousData?.featureConfigs?.isAIManagerAccessControl == true ? 'Enabled' : 'Disabled',
|
|
1164
1164
|
CameraEdit: previousData?.featureConfigs?.isCameraEdit == true ? 'Enabled' : 'Disabled',
|
|
1165
|
+
SSOlogin: previousData?.featureConfigs?.loginSSO == true ? 'Enabled' : 'Disabled',
|
|
1165
1166
|
};
|
|
1166
1167
|
|
|
1167
1168
|
// Map and rename keys from current client info for UI display and logging
|
|
@@ -1203,6 +1204,7 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
1203
1204
|
AIManager: previousData?.featureConfigs?.isAIManager == true ? 'Enabled' : 'Disabled',
|
|
1204
1205
|
AIManagerAccessControl: previousData?.featureConfigs?.isAIManagerAccessControl == true ? 'Enabled' : 'Disabled',
|
|
1205
1206
|
CameraEdit: previousData?.featureConfigs?.isCameraEdit == true ? 'Enabled' : 'Disabled',
|
|
1207
|
+
SSOlogin: previousData?.featureConfigs?.loginSSO == true ? 'Enabled' : 'Disabled',
|
|
1206
1208
|
};
|
|
1207
1209
|
|
|
1208
1210
|
// Prepare activity log object with all relevant details for OpenSearch logging
|
|
@@ -2939,3 +2941,39 @@ export async function getrevopconfig( req, res ) {
|
|
|
2939
2941
|
}
|
|
2940
2942
|
|
|
2941
2943
|
|
|
2944
|
+
export async function updateFDConfig( req, res ) {
|
|
2945
|
+
try {
|
|
2946
|
+
const inputData = req.body;
|
|
2947
|
+
const inputQuery = req.query;
|
|
2948
|
+
const query ={
|
|
2949
|
+
clientId: inputQuery.clientId,
|
|
2950
|
+
};
|
|
2951
|
+
// update the footfall directory configuration data
|
|
2952
|
+
let result = await updateOneClient( query, { footfallDirectoryConfigs: inputData } );
|
|
2953
|
+
if ( result?.acknowledged === true ) {
|
|
2954
|
+
return res.sendSuccess( result );
|
|
2955
|
+
} else {
|
|
2956
|
+
return res.sendError( 'no data', 204 );
|
|
2957
|
+
}
|
|
2958
|
+
} catch ( error ) {
|
|
2959
|
+
const err = error?.message || 'Internal Server Error';
|
|
2960
|
+
logger.error( { error: error, message: req.body, function: 'updateFDConfig' } );
|
|
2961
|
+
return res.sendError( err, 500 );
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
export async function getFDConfig( req, res ) {
|
|
2966
|
+
try {
|
|
2967
|
+
const inputData = req.query;
|
|
2968
|
+
let result = await findOneClient( { clientId: inputData.clientId }, { footfallDirectoryConfigs: 1 } );
|
|
2969
|
+
if ( result===null ) {
|
|
2970
|
+
return res.sendError( 'no data found', 204 );
|
|
2971
|
+
}
|
|
2972
|
+
return res.sendSuccess( result );
|
|
2973
|
+
} catch ( error ) {
|
|
2974
|
+
const err = error.message || 'Internal Server Error';
|
|
2975
|
+
logger.error( { error: error, message: req.query, function: 'getFDConfig' } );
|
|
2976
|
+
return res.sendError( err, 500 );
|
|
2977
|
+
}
|
|
2978
|
+
}
|
|
2979
|
+
|
package/src/dtos/client.dtos.js
CHANGED
|
@@ -130,6 +130,7 @@ export const featureConfigurationSchemaBody = joi.object(
|
|
|
130
130
|
isAIManagerAccessControl: joi.boolean().optional(),
|
|
131
131
|
isCameraEdit: joi.boolean().optional(),
|
|
132
132
|
isVMS: joi.boolean().optional(),
|
|
133
|
+
loginSSO: joi.boolean().optional(),
|
|
133
134
|
},
|
|
134
135
|
);
|
|
135
136
|
|
|
@@ -344,3 +345,42 @@ export const revopconfigValid = {
|
|
|
344
345
|
export const revopconfiggetValid = {
|
|
345
346
|
query: revopconfiggetBody,
|
|
346
347
|
};
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
export const updateFDConfigBodySchema = joi.object( {
|
|
351
|
+
accuracyBreach: joi.object( {
|
|
352
|
+
ticketCount: joi.number().optional(),
|
|
353
|
+
days: joi.string().optional(),
|
|
354
|
+
accuracy: joi.string().optional(),
|
|
355
|
+
} ).optional(),
|
|
356
|
+
allowTicketCreation: joi.number().optional(),
|
|
357
|
+
isAutoCloseEnable: joi.boolean().optional(),
|
|
358
|
+
autoCloseAccuracy: joi.string().optional(),
|
|
359
|
+
tangoReview: joi.string().optional(),
|
|
360
|
+
revision: joi.array().items( joi.object( {
|
|
361
|
+
actionType: joi.string().required(),
|
|
362
|
+
isChecked: joi.boolean().required(),
|
|
363
|
+
} ) ).optional(),
|
|
364
|
+
taggingLimitation: joi.array().items( joi.object( {
|
|
365
|
+
type: joi.string().required(),
|
|
366
|
+
value: joi.number().required(),
|
|
367
|
+
unit: joi.string().required(),
|
|
368
|
+
} ) ).optional(),
|
|
369
|
+
|
|
370
|
+
} );
|
|
371
|
+
|
|
372
|
+
export const updateFDConfigQuerySchema = joi.object( {
|
|
373
|
+
clientId: joi.string().required(),
|
|
374
|
+
} );
|
|
375
|
+
|
|
376
|
+
export const getFDConfigSchema = joi.object( {
|
|
377
|
+
clientId: joi.string().required(),
|
|
378
|
+
} );
|
|
379
|
+
|
|
380
|
+
export const updateFDConfigValid = {
|
|
381
|
+
body: updateFDConfigBodySchema,
|
|
382
|
+
query: updateFDConfigQuerySchema,
|
|
383
|
+
};
|
|
384
|
+
export const getFDConfigValid = {
|
|
385
|
+
query: getFDConfigSchema,
|
|
386
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import express from 'express';
|
|
3
|
-
import { activityLogValid, auditConfigValid, billingDetailsValid, brandInfoValid, clientCreationValid, clientDetailsValid, documentsValid, domainDetailsValid, featureConfigurationValid, getAssignedClientValid, getAuditConfigValid, postClientCamApprovalValid, signatoryDetailsValid, ticketConfigurationValid, userConfigurationValid } from '../dtos/client.dtos.js';
|
|
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';
|
|
3
|
+
import { activityLogValid, auditConfigValid, billingDetailsValid, brandInfoValid, clientCreationValid, clientDetailsValid, documentsValid, domainDetailsValid, featureConfigurationValid, getAssignedClientValid, getAuditConfigValid, getFDConfigValid, postClientCamApprovalValid, signatoryDetailsValid, ticketConfigurationValid, updateFDConfigValid, userConfigurationValid } from '../dtos/client.dtos.js';
|
|
4
|
+
import { auditConfiguration, changeStatus, clientCsmAssignAction, clientDetails, create, csmAssignConfirmation, domainDetailsConfiguration, getActivityLogs, getAuditConfiguration, getClients, getCsmUsers, getFDConfig, getOpsUsers, updateBillingDetails, updateBrandInfo, updateDocuments, updateFDConfig, updateFeatureConfiguration, updateSignatoryDetails, updateTicketConfiguration, userConfiguration } from '../controllers/client.controllers.js';
|
|
5
5
|
import { accessVerification, isAllowedSessionHandler, validate } from 'tango-app-api-middleware';
|
|
6
6
|
import { clientListValid, detailedClientCountValid, createAuditConfigValid, AuditConfiglistValid, revopconfigValid, revopconfiggetValid } from '../dtos/client.dtos.js';
|
|
7
7
|
import { isclientIdExists, isclientNameExists, roleVerification } from '../validations/client.validations.js';
|
|
@@ -112,4 +112,7 @@ clientRouter.post( '/revopconfig', isAllowedSessionHandler,
|
|
|
112
112
|
clientRouter.get( '/revopconfig', isAllowedSessionHandler,
|
|
113
113
|
validate( revopconfiggetValid ), getrevopconfig );
|
|
114
114
|
|
|
115
|
+
// footfall directory configurations
|
|
116
|
+
clientRouter.put( '/update-footfall-directory-config', isAllowedSessionHandler, validate( updateFDConfigValid ), updateFDConfig );
|
|
117
|
+
clientRouter.get( '/get-footfall-directory-config', isAllowedSessionHandler, validate( getFDConfigValid ), getFDConfig );
|
|
115
118
|
|
|
@@ -170,6 +170,7 @@ export function featureConfigurationUpdate( query, inputData ) {
|
|
|
170
170
|
'featureConfigs.isAIManager': inputData?.isAIManager,
|
|
171
171
|
'featureConfigs.isAIManagerAccessControl': inputData?.isAIManagerAccessControl,
|
|
172
172
|
'featureConfigs.isCameraEdit': inputData?.isCameraEdit,
|
|
173
|
+
'featureConfigs.loginSSO': inputData?.loginSSO,
|
|
173
174
|
},
|
|
174
175
|
} );
|
|
175
176
|
}
|