tango-app-api-client 3.5.0 → 3.6.1
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-client",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"sharp": "^0.34.3",
|
|
32
32
|
"swagger-ui-express": "^5.0.0",
|
|
33
33
|
"tango-api-schema": "^2.3.6",
|
|
34
|
-
"tango-app-api-middleware": "^3.
|
|
34
|
+
"tango-app-api-middleware": "^3.6.0",
|
|
35
35
|
"winston": "^3.11.0",
|
|
36
36
|
"winston-daily-rotate-file": "^5.0.0"
|
|
37
37
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { billingDetailsUpdate, brandInfoUpdate, domainDetailsConfigurationUpdate, featureConfigurationUpdate, getClientData, signatoryDetailsUpdate, ticketConfigurationUpdate, documentsUpdate, getUserData, CsmUsersGet, OpsUsersGet, userConfigurationUpdate, findClient, aggregateClient, createAuditQueue, findOne, insert, update, findOneClient, updateOneClient } from '../service/client.service.js';
|
|
2
|
-
import { checkFileExist, signedUrl, chunkArray, download, logger, getOpenSearchData, insertOpenSearchData, sendEmailWithSES, createCustomer, createVirtualAccount, getUuid, fileRestrictedUpload, getXsscheck } from 'tango-app-api-middleware';
|
|
2
|
+
import { checkFileExist, signedUrl, chunkArray, download, logger, getOpenSearchData, insertOpenSearchData, sendEmailWithSES, createCustomer, createVirtualAccount, getUuid, fileRestrictedUpload, getXsscheck, customSignedUrl } from 'tango-app-api-middleware';
|
|
3
3
|
import { countDocumentsUser, findOneAndUpdateUser, findOneUser, getUserNameEmailById, updateManyUser } from '../service/user.service.js';
|
|
4
4
|
import { aggregateStore, countDocumentsStore, findStore, updateManyStore } from '../service/store.service.js';
|
|
5
5
|
import { aggregateCamera, countDocumentsCamera } from '../service/camera.service.js';
|
|
@@ -475,6 +475,7 @@ export async function getClients( req, res ) {
|
|
|
475
475
|
export async function clientDetails( req, res ) {
|
|
476
476
|
try {
|
|
477
477
|
const bucket = JSON.parse( process.env.BUCKET );
|
|
478
|
+
// const url=JSON.parse( process.env.URL );
|
|
478
479
|
const client = await getClientData( { id: req.params.id } );
|
|
479
480
|
if ( client ) {
|
|
480
481
|
const isLogoExist = await checkFileExist( { Bucket: bucket.assets, Key: `${client.clientId}/logo/${client.profileDetails?.logo}` } );
|
|
@@ -487,49 +488,48 @@ export async function clientDetails( req, res ) {
|
|
|
487
488
|
|
|
488
489
|
|
|
489
490
|
if ( isLogoExist ) {
|
|
490
|
-
const signedFilUrl = await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/logo/${client.profileDetails?.logo}` } );
|
|
491
|
+
const signedFilUrl =await customSignedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/logo/${client.profileDetails?.logo}` }, 8 ); // `${url.assests}/${client.clientId}/logo/${client.profileDetails?.logo}`; // await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/logo/${client.profileDetails?.logo}` } );
|
|
491
492
|
client.profileDetails.logo = signedFilUrl;
|
|
492
493
|
} else {
|
|
493
494
|
client.profileDetails.logo = '';
|
|
494
495
|
}
|
|
495
496
|
|
|
496
497
|
if ( isGstCertificateExist ) {
|
|
497
|
-
const signedFilUrl = await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.gst?.path}` } );
|
|
498
|
+
const signedFilUrl = await customSignedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.gst?.path}` }, 8 );// `${url.assests}/${client.clientId}/documents/${client.document?.gst?.path}`;// await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.gst?.path}` } );
|
|
498
499
|
client.document.gst.path = signedFilUrl;
|
|
499
500
|
} else {
|
|
500
501
|
client.document.gst.path = '';
|
|
501
502
|
}
|
|
502
503
|
|
|
503
504
|
if ( isAddressCertificateExist ) {
|
|
504
|
-
const signedFilUrl = await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.addressProof?.path}` } );
|
|
505
|
+
const signedFilUrl =await customSignedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.addressProof?.path}` }, 8 ); // `${url.assests}/${client.clientId}/documents/${client.document?.addressProof?.path}`;// await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.addressProof?.path}` } );
|
|
505
506
|
client.document.addressProof.path = signedFilUrl;
|
|
506
507
|
} else {
|
|
507
508
|
client.document.addressProof.path = '';
|
|
508
509
|
}
|
|
509
|
-
|
|
510
510
|
if ( isPanCertificateExist ) {
|
|
511
|
-
const signedFilUrl = await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.pan?.path}` } );
|
|
511
|
+
const signedFilUrl = await customSignedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.pan?.path}` }, 8 );// `${url.assests}/${client.clientId}/documents/${client.document?.pan?.path}`;// await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.pan?.path}` } );
|
|
512
512
|
client.document.pan.path = signedFilUrl;
|
|
513
513
|
} else {
|
|
514
514
|
client.document.pan.path = '';
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
if ( isCinCertificateExist ) {
|
|
518
|
-
const signedFilUrl = await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.cin?.path}` } );
|
|
518
|
+
const signedFilUrl =await customSignedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.cin?.path}` }, 8 ); // `${url.assests}/${client.clientId}/documents/${client.document?.cin?.path}`;// await signedUrl( { Bucket: bucket.assets, file_path: `${client.clientId}/documents/${client.document?.cin?.path}` } );
|
|
519
519
|
client.document.cin.path = signedFilUrl;
|
|
520
520
|
} else {
|
|
521
521
|
client.document.cin.path = '';
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
if ( isContractCertificateExist ) {
|
|
525
|
-
const signedFilUrl = await signedUrl( { Bucket: bucket.assets, file_path: `documents/contract.pdf` } );
|
|
525
|
+
const signedFilUrl = await customSignedUrl( { Bucket: bucket.assets, file_path: `documents/contract.pdf` }, 8 ); // `${url.assests}/documents/contract.pdf`;// await signedUrl( { Bucket: bucket.assets, file_path: `documents/contract.pdf` } );
|
|
526
526
|
client._doc.document.contract = signedFilUrl;
|
|
527
527
|
} else {
|
|
528
528
|
client._doc.document.contract = '';
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
if ( isTermsAndConditionsExist ) {
|
|
532
|
-
const signedFilUrl = await signedUrl( { Bucket: bucket.assets, file_path: `documents/terms&conditions.pdf` } );
|
|
532
|
+
const signedFilUrl =await customSignedUrl( { Bucket: bucket.assets, file_path: `documents/terms&conditions.pdf` }, 8 ); // `${url.assests}/documents/terms&conditions.pdf`;// await signedUrl( { Bucket: bucket.assets, file_path: `documents/terms&conditions.pdf` } );
|
|
533
533
|
client._doc.document.termsAndconditions = signedFilUrl;
|
|
534
534
|
} else {
|
|
535
535
|
client._doc.document.termsAndconditions = '';
|