tango-app-api-client 3.0.21-dev → 3.0.23-dev
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.0.
|
|
3
|
+
"version": "3.0.23-dev",
|
|
4
4
|
"description": "client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"mongodb": "^6.3.0",
|
|
26
26
|
"nodemon": "^3.0.3",
|
|
27
27
|
"swagger-ui-express": "^5.0.0",
|
|
28
|
-
"tango-api-schema": "^2.0.
|
|
29
|
-
"tango-app-api-middleware": "^1.0.
|
|
28
|
+
"tango-api-schema": "^2.0.66",
|
|
29
|
+
"tango-app-api-middleware": "^1.0.53-dev",
|
|
30
30
|
"winston": "^3.11.0",
|
|
31
31
|
"winston-daily-rotate-file": "^5.0.0"
|
|
32
32
|
},
|
|
@@ -7,7 +7,6 @@ import _ from 'lodash';
|
|
|
7
7
|
import { findOneStandaredRole } from '../service/standaredRole.service.js';
|
|
8
8
|
import { aggregateUserAssignedStore } from '../service/userAssignedStore.service.js';
|
|
9
9
|
import { aggregateTickets } from '../service/tangoticket.service.js';
|
|
10
|
-
import { deleteOneAuthentication } from '../service/authentication.service.js';
|
|
11
10
|
import { join } from 'path';
|
|
12
11
|
import { readFileSync } from 'fs';
|
|
13
12
|
import handlebars from 'handlebars';
|
|
@@ -60,7 +59,6 @@ export async function create( req, res ) {
|
|
|
60
59
|
permission: getPermission?.permission,
|
|
61
60
|
clientId: String( tangoId ),
|
|
62
61
|
};
|
|
63
|
-
await deleteOneAuthentication( { user: user?._id, type: 'retail' } );
|
|
64
62
|
await findOneAndUpdateUser( userQuery, userRecord );
|
|
65
63
|
await createAuditQueue( generatedName );
|
|
66
64
|
return res.sendSuccess( { result: { clientId: String( tangoId ) } } );
|
|
@@ -77,7 +75,7 @@ export const sendEmail = ( data ) => {
|
|
|
77
75
|
const subject = data.subject;
|
|
78
76
|
const fileContent = readFileSync( join() + data.path, 'utf8' );
|
|
79
77
|
const htmlContent = handlebars.compile( fileContent );
|
|
80
|
-
const html = htmlContent( { url: appConfig.url.domain } );
|
|
78
|
+
const html = htmlContent( { url: appConfig.url.store, logo: `${appConfig.url.domain}/logo.png` } );
|
|
81
79
|
return sendEmailWithSES( data.email, subject, html, attachments, appConfig.cloud.aws.ses.adminEmail );
|
|
82
80
|
} catch ( error ) {
|
|
83
81
|
return error;
|
package/src/docs/client.docs.js
CHANGED
|
@@ -474,17 +474,17 @@ export const clientDocs = {
|
|
|
474
474
|
},
|
|
475
475
|
},
|
|
476
476
|
'/v3/client/client-list': {
|
|
477
|
-
|
|
477
|
+
post: {
|
|
478
478
|
tags: [ 'Client' ],
|
|
479
479
|
description: `Get list of client Info`,
|
|
480
480
|
operationId: 'client-list',
|
|
481
|
-
|
|
482
|
-
{
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
481
|
+
requestBody: {
|
|
482
|
+
content: {
|
|
483
|
+
'application/json': {
|
|
484
|
+
schema: j2s( clientListSchema ).swagger,
|
|
485
|
+
},
|
|
486
486
|
},
|
|
487
|
-
|
|
487
|
+
},
|
|
488
488
|
responses: {
|
|
489
489
|
200: { description: `Success` },
|
|
490
490
|
401: { description: 'Unauthorized User' },
|
package/src/dtos/client.dtos.js
CHANGED
|
@@ -33,7 +33,7 @@ export const billingDetailsSchemaBody = joi.object( {
|
|
|
33
33
|
tradeName: joi.string().optional(),
|
|
34
34
|
gstNumber: joi.string().optional(),
|
|
35
35
|
authorityName: joi.string().optional(),
|
|
36
|
-
authorityEmail: joi.string().optional(),
|
|
36
|
+
authorityEmail: joi.string().email().optional(),
|
|
37
37
|
billingAddress: joi.string().optional(),
|
|
38
38
|
gstCertificate: joi.string().optional().allow( '' ),
|
|
39
39
|
} );
|
|
@@ -50,7 +50,10 @@ export const billingDetailsValid = {
|
|
|
50
50
|
export const signatoryDetailsSchemaBody = joi.object( {
|
|
51
51
|
name: joi.string().optional(),
|
|
52
52
|
email: joi.string().email().optional(),
|
|
53
|
-
number: joi.string()
|
|
53
|
+
number: joi.string()
|
|
54
|
+
.pattern( /^\d{4,12}$/ )
|
|
55
|
+
.message( 'Enter a valid mobile number' )
|
|
56
|
+
.optional(),
|
|
54
57
|
designation: joi.string().optional(),
|
|
55
58
|
} );
|
|
56
59
|
|
|
@@ -119,7 +122,9 @@ export const featureConfigurationValid = {
|
|
|
119
122
|
|
|
120
123
|
export const domainDetailsSchemaBody = joi.object(
|
|
121
124
|
{
|
|
122
|
-
domainName: joi.array().items( joi.string()
|
|
125
|
+
domainName: joi.array().items( joi.string()
|
|
126
|
+
.pattern( /\..*/ )
|
|
127
|
+
.message( 'Enter a valid domain' ) ).optional(),
|
|
123
128
|
isEnable: joi.boolean().optional(),
|
|
124
129
|
},
|
|
125
130
|
);
|
|
@@ -86,7 +86,7 @@
|
|
|
86
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
87
|
<p style="margin-top: 0px;margin-bottom: 0px;">
|
|
88
88
|
<a class="o_text-white" href="https://tangoeye.ai/" style="text-decoration: none;outline: none;color: #ffffff;">
|
|
89
|
-
<img src=
|
|
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
90
|
</a>
|
|
91
91
|
</p>
|
|
92
92
|
</td>
|
|
@@ -37,7 +37,7 @@ clientRouter.put( '/ticket-configuration/:id', isAllowedSessionHandler, authoriz
|
|
|
37
37
|
validate( ticketConfigurationValid ), updateTicketConfiguration );
|
|
38
38
|
|
|
39
39
|
clientRouter.put( '/feature-configuration/:id', isAllowedSessionHandler, authorize(
|
|
40
|
-
{ userType: [ 'tango' ], access: [
|
|
40
|
+
{ userType: [ 'tango', 'client' ], access: [
|
|
41
41
|
{ featureName: 'settings', name: 'configuration', permissions: [ 'isEdit' ] } ] } ),
|
|
42
42
|
validate( featureConfigurationValid ), updateFeatureConfiguration );
|
|
43
43
|
|