tango-app-api-payment-subscription 3.0.14-dev → 3.0.16-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 +3 -3
- package/src/controllers/paymentSubscription.controllers.js +383 -42
- package/src/dtos/validation.dtos.js +2 -2
- package/src/hbs/invoicePdf.hbs +1259 -0
- package/src/hbs/trailCreditNoteEmail.hbs +606 -0
- package/src/hbs/trailExpiredEmail.hbs +309 -0
- package/src/hbs/trailExtentionEmail.hbs +194 -0
- package/src/hbs/trailReminderEmail.hbs +315 -0
- package/src/hbs/trailUnsubscribeEmail.hbs +188 -0
- package/src/hbs/trialInitiateEmail.hbs +3 -3
- package/src/hbs/trialSubscriptionEmail.hbs +197 -0
- package/src/routes/paymentSubscription.routes.js +148 -46
- package/src/services/invoice.service.js +4 -0
- package/src/services/user.service.js +5 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
8
|
+
<title>Subscription Email</title>
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
+
<style type="text/css">
|
|
11
|
+
@media screen {
|
|
12
|
+
@font-face {
|
|
13
|
+
font-family: 'Inter';
|
|
14
|
+
font-style: normal;
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
font-display: swap;
|
|
17
|
+
src: local("Inter"), local("Inter-Regular"), url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZJhiI2B.woff2) format('woff2');
|
|
18
|
+
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body {
|
|
23
|
+
font-family: "Inter", sans-serif !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body,
|
|
27
|
+
table,
|
|
28
|
+
td,
|
|
29
|
+
a {
|
|
30
|
+
-ms-text-size-adjust: 100%;
|
|
31
|
+
-webkit-text-size-adjust: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
table,
|
|
35
|
+
td {
|
|
36
|
+
mso-table-rspace: 0pt;
|
|
37
|
+
mso-table-lspace: 0pt;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
img {
|
|
41
|
+
-ms-interpolation-mode: bicubic;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
a[x-apple-data-detectors] {
|
|
45
|
+
font-family: "inherit" !important;
|
|
46
|
+
font-size: inherit !important;
|
|
47
|
+
font-weight: inherit !important;
|
|
48
|
+
line-height: inherit !important;
|
|
49
|
+
color: inherit !important;
|
|
50
|
+
text-decoration: none !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
div[style*="margin: 16px 0;"
|
|
55
|
+
|
|
56
|
+
] {
|
|
57
|
+
margin: 0 !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
body {
|
|
61
|
+
width: 100% !important;
|
|
62
|
+
height: 100% !important;
|
|
63
|
+
padding: 0 !important;
|
|
64
|
+
margin: 0 !important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
table {
|
|
69
|
+
border-collapse: collapse !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
a {
|
|
73
|
+
color: #1a82e2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
img {
|
|
77
|
+
height: auto;
|
|
78
|
+
line-height: 100%;
|
|
79
|
+
text-decoration: none;
|
|
80
|
+
border: 0;
|
|
81
|
+
outline: none;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
84
|
+
|
|
85
|
+
</head>
|
|
86
|
+
|
|
87
|
+
<body style="background-color: #dbe5ea;">
|
|
88
|
+
|
|
89
|
+
<div class="preheader"
|
|
90
|
+
style="display: none; max-width: 0; max-height: 0; overflow: hidden; font-size: 1px; line-height: 1px; color: #fff; opacity: 0;">
|
|
91
|
+
Email Summary (Hidden)
|
|
92
|
+
</div>
|
|
93
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="padding-left:10px;padding-right:10px;">
|
|
94
|
+
<tr>
|
|
95
|
+
<td bgcolor="#dbe5ea" style="padding:32px 10px 0 10px">
|
|
96
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;" align="center">
|
|
97
|
+
<tr>
|
|
98
|
+
<td class="o_bg-white o_px-md o_py-md o_sans o_text"
|
|
99
|
+
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;">
|
|
100
|
+
<p style="margin-top: 0px;margin-bottom: 0px;"><a class="o_text-white"
|
|
101
|
+
href="https://tangoeye.ai/"
|
|
102
|
+
style="text-decoration: none;outline: none;color: #ffffff;"><img
|
|
103
|
+
src="https://pub-f88985f8e0964d3d8cd7fa6f2dde6962.r2.dev/TangoLogo/Tango%20Eye%20Logo%20color%20option-01.png"
|
|
104
|
+
width="200" height="100" alt="SimpleApp"
|
|
105
|
+
style="-ms-interpolation-mode: bicubic;vertical-align: middle;border: 0;line-height: 100%;height: auto;outline: none;text-decoration: none;"></a>
|
|
106
|
+
</p>
|
|
107
|
+
</td>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr>
|
|
110
|
+
<td align="left" bgcolor="#ffffff"
|
|
111
|
+
style="padding-left: 27px;padding-right: 24px; font-size: 14px; line-height: 24px;">
|
|
112
|
+
<p class="o_heading o_mb-xxs"
|
|
113
|
+
style="width: 544px;height: 0px;border: 1px solid #CBD5E1;flex: none;order: 1;flex-grow: 0;">
|
|
114
|
+
</p>
|
|
115
|
+
</td>
|
|
116
|
+
</tr>
|
|
117
|
+
<tr>
|
|
118
|
+
<td class="o_bg-white o_px-md o_py-xl o_xs-py-md"
|
|
119
|
+
style="background-color: #ffffff;padding-left: 30px;padding-right: 24px;padding-bottom: 10px;">
|
|
120
|
+
<div class="o_col-6s o_sans o_text-md o_text-light o_center"
|
|
121
|
+
style="margin-top: 0px;margin-bottom: 0px;font-size: 24px;line-height: 28px;color: #82899a;">
|
|
122
|
+
<span class="o_heading o_text-dark o_mb-xxs"
|
|
123
|
+
style="font-weight: 700;margin-top: 0px;margin-bottom: 4px;color: #121A26;line-height:140%;">
|
|
124
|
+
Successful Subscription Finalization </span>
|
|
125
|
+
</div>
|
|
126
|
+
</td>
|
|
127
|
+
</tr>
|
|
128
|
+
</table>
|
|
129
|
+
</td>
|
|
130
|
+
</tr>
|
|
131
|
+
<tr>
|
|
132
|
+
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
133
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
134
|
+
<tr>
|
|
135
|
+
<td align="left" bgcolor="#ffffff"
|
|
136
|
+
style="padding-left: 30px; padding-right: 24px;padding-bottom: 10px;padding-top: 20px;font-weight: 400;font-size: 16px;line-height: 150%;color:#384860">
|
|
137
|
+
<p style="margin: 0;">Dear {{data.userName}},</p>
|
|
138
|
+
</td>
|
|
139
|
+
</tr>
|
|
140
|
+
<tr>
|
|
141
|
+
<td align="left" bgcolor="#ffffff"
|
|
142
|
+
style="padding-left: 27px;padding-right: 24px;padding-top:10px; font-size: 16px; line-height: 24px;font-weight:400;color:#384860">
|
|
143
|
+
<p style="margin: 0;">We're delighted to confirm the successful finalization of your Tango Suite subscription. Welcome aboard! Your account is now active, granting full access to our services. If you have any queries or need assistance, feel free to contact our support team. Thank you for choosing [Tango Eye].
|
|
144
|
+
</p>
|
|
145
|
+
</td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr>
|
|
148
|
+
<td align="left" bgcolor="#ffffff"
|
|
149
|
+
style="padding-left: 26px;padding-right: 24px;padding-top:25px; font-size: 16px; line-height: 24px;font-weight:400;color:#384860">
|
|
150
|
+
<p style="margin: 0;">Best, <br>Team Tango,
|
|
151
|
+
</p>
|
|
152
|
+
</td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td align="left" bgcolor="#ffffff"
|
|
156
|
+
style="padding-left: 27px;padding-right: 24px; font-size: 14px; line-height: 24px;">
|
|
157
|
+
<p class="o_heading o_mb-xxs"
|
|
158
|
+
style="width: 544px;height: 0px;border: 1px solid #CBD5E1;flex: none;order: 1;flex-grow: 0;">
|
|
159
|
+
</p>
|
|
160
|
+
</td>
|
|
161
|
+
</tr>
|
|
162
|
+
</table>
|
|
163
|
+
</td>
|
|
164
|
+
</tr>
|
|
165
|
+
|
|
166
|
+
<tr>
|
|
167
|
+
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 32px 10px">
|
|
168
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
|
|
169
|
+
<tr>
|
|
170
|
+
<td class="o_bg-white o_px-md o_py-xl o_xs-py-md"
|
|
171
|
+
style="background-color: #ffffff;padding-left: 27px;padding-right: 24px;padding-top:0px">
|
|
172
|
+
<div class="o_col-6s o_sans o_text-md o_text-light o_center"
|
|
173
|
+
style="margin-top: 30px;margin-bottom: 0px;font-size: 12px;color: #202B3C;font-style: normal;font-weight: 400;font-size: 12px;line-height: 150%;">
|
|
174
|
+
<p>
|
|
175
|
+
If you'd rather not receive this kind of email, Don’t want any more emails from TangoEye? <a style="color: var(--Primary-Base, #00A3FF); text-decoration-line: underline; letter-spacing: 0.2px;">Unsubscribe.</a></p>
|
|
176
|
+
</div>
|
|
177
|
+
</td>
|
|
178
|
+
</tr>
|
|
179
|
+
<tr>
|
|
180
|
+
<td class="o_bg-white o_px-md o_py-xl o_xs-py-md"
|
|
181
|
+
style="background-color: #ffffff;padding:0px 24px 15px 27px">
|
|
182
|
+
<div class="o_col-6s o_sans o_text-md o_text-light o_center"
|
|
183
|
+
style="margin-top: 0px;margin-bottom: 0px;font-size: 12px;color: #202B3C;font-style: normal;font-weight: 400;font-size: 12px;line-height: 150%;">
|
|
184
|
+
<p>
|
|
185
|
+
© Tango Eye. All rights reserved.</p>
|
|
186
|
+
</div>
|
|
187
|
+
</td>
|
|
188
|
+
</tr>
|
|
189
|
+
</table>
|
|
190
|
+
</td>
|
|
191
|
+
</tr>
|
|
192
|
+
|
|
193
|
+
</table>
|
|
194
|
+
|
|
195
|
+
</body>
|
|
196
|
+
|
|
197
|
+
</html>
|
|
@@ -1,59 +1,161 @@
|
|
|
1
1
|
|
|
2
2
|
import express from 'express';
|
|
3
3
|
import * as paymentController from '../controllers/paymentSubscription.controllers.js';
|
|
4
|
-
import { validate, isAllowedSessionHandler } from 'tango-app-api-middleware';
|
|
4
|
+
import { validate, isAllowedSessionHandler, authorize } from 'tango-app-api-middleware';
|
|
5
5
|
import * as validationDtos from '../dtos/validation.dtos.js';
|
|
6
6
|
import { validateClient } from '../utils/validations/client.validation.js';
|
|
7
7
|
export const paymentSubscriptionRouter = express.Router();
|
|
8
8
|
|
|
9
|
-
paymentSubscriptionRouter.post( '/addBilling', isAllowedSessionHandler,
|
|
9
|
+
paymentSubscriptionRouter.post( '/addBilling', isAllowedSessionHandler, authorize( {
|
|
10
|
+
userType: [ 'tango', 'client' ], access: [
|
|
11
|
+
{ featureName: 'settings', name: 'tangotraffic', permissions: [ 'isEdit' ] },
|
|
12
|
+
],
|
|
13
|
+
} ), validate( validationDtos.validateBillingParams ), validateClient, paymentController.addBilling );
|
|
10
14
|
|
|
11
|
-
paymentSubscriptionRouter.get( '/clientBillingSubscriptionInfo/:clientId', isAllowedSessionHandler,
|
|
15
|
+
paymentSubscriptionRouter.get( '/clientBillingSubscriptionInfo/:clientId', isAllowedSessionHandler, authorize( {
|
|
16
|
+
userType: [ 'tango', 'client' ], access: [
|
|
17
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
18
|
+
],
|
|
19
|
+
} ), validate( validationDtos.validateBrandParams ), paymentController.clientBillingSubscriptionInfo );
|
|
12
20
|
|
|
13
21
|
paymentSubscriptionRouter.post( '/basePricing', validate( validationDtos.validateProducts ), paymentController.pricingInfo );
|
|
14
22
|
|
|
15
|
-
paymentSubscriptionRouter.put( '/update/subscription/:clientId', isAllowedSessionHandler,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
paymentSubscriptionRouter.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
paymentSubscriptionRouter.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
paymentSubscriptionRouter.post( '/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
paymentSubscriptionRouter.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
paymentSubscriptionRouter.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
paymentSubscriptionRouter.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
paymentSubscriptionRouter.
|
|
23
|
+
paymentSubscriptionRouter.put( '/update/subscription/:clientId', isAllowedSessionHandler, authorize( {
|
|
24
|
+
userType: [ 'tango', 'client' ], access: [
|
|
25
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
26
|
+
],
|
|
27
|
+
} ), validate( validationDtos.validateUpdateSubscriptionSchema ), validateClient, paymentController.updateSubscription );
|
|
28
|
+
|
|
29
|
+
paymentSubscriptionRouter.get( '/getTrialProducts', isAllowedSessionHandler, authorize( {
|
|
30
|
+
userType: [ 'tango', 'client' ], access: [
|
|
31
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
32
|
+
],
|
|
33
|
+
} ), validate( validationDtos.validateStoreParams ), paymentController.trialProductList );
|
|
34
|
+
|
|
35
|
+
paymentSubscriptionRouter.post( '/unsubscribe', isAllowedSessionHandler, authorize( {
|
|
36
|
+
userType: [ 'tango', 'client' ], access: [
|
|
37
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
38
|
+
],
|
|
39
|
+
} ), validate( validationDtos.validateunsubscribeParams ), validateClient, paymentController.unsubscribeProduct );
|
|
40
|
+
|
|
41
|
+
paymentSubscriptionRouter.post( '/trialExtendRequest', isAllowedSessionHandler, authorize( {
|
|
42
|
+
userType: [ 'tango', 'client' ], access: [
|
|
43
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
44
|
+
],
|
|
45
|
+
} ), validate( validationDtos.validateTrialExtendandSubscibeParams ), validateClient, isAllowedSessionHandler, paymentController.trialExtendRequest );
|
|
46
|
+
|
|
47
|
+
paymentSubscriptionRouter.post( '/trialRequest', isAllowedSessionHandler, authorize( {
|
|
48
|
+
userType: [ 'tango', 'client' ], access: [
|
|
49
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
50
|
+
],
|
|
51
|
+
} ), validate( validationDtos.validateTrialExtendandSubscibeParams ), validateClient, paymentController.trialRequest );
|
|
52
|
+
|
|
53
|
+
paymentSubscriptionRouter.get( '/InvoiceDetails/:clientId', isAllowedSessionHandler, authorize( {
|
|
54
|
+
userType: [ 'tango', 'client' ], access: [
|
|
55
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
56
|
+
],
|
|
57
|
+
} ), validate( validationDtos.validateBrandParams ), paymentController.invoiceDetails );
|
|
58
|
+
|
|
59
|
+
paymentSubscriptionRouter.put( '/update/InvoiceDetails/:clientId', isAllowedSessionHandler, authorize( {
|
|
60
|
+
userType: [ 'tango' ], access: [
|
|
61
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
62
|
+
],
|
|
63
|
+
} ), validate( validationDtos.validateBrandParams ), paymentController.updateInvoiceDetails );
|
|
64
|
+
|
|
65
|
+
paymentSubscriptionRouter.get( '/admin/notificationList', isAllowedSessionHandler, authorize( {
|
|
66
|
+
userType: [ 'tango' ], access: [
|
|
67
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
68
|
+
],
|
|
69
|
+
} ), paymentController.notificationList );
|
|
70
|
+
|
|
71
|
+
paymentSubscriptionRouter.post( '/admin/trialApproval', isAllowedSessionHandler, authorize( {
|
|
72
|
+
userType: [ 'tango' ], access: [
|
|
73
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
74
|
+
],
|
|
75
|
+
} ), validate( validationDtos.validateTrialandUnsubscribeParams ), paymentController.trialApproval );
|
|
76
|
+
|
|
77
|
+
paymentSubscriptionRouter.post( '/admin/trialExtendApproval', isAllowedSessionHandler, authorize( {
|
|
78
|
+
userType: [ 'tango' ], access: [
|
|
79
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
80
|
+
],
|
|
81
|
+
} ), validate( validationDtos.validateTrialExtendRequestParams ), paymentController.trialExtendRequestApproval );
|
|
82
|
+
|
|
83
|
+
paymentSubscriptionRouter.post( '/admin/subscribeproduct', isAllowedSessionHandler, authorize( {
|
|
84
|
+
userType: [ 'tango' ], access: [
|
|
85
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
86
|
+
],
|
|
87
|
+
} ), validate( validationDtos.validateSubscibeParams ), paymentController.productSubscribe );
|
|
88
|
+
|
|
89
|
+
paymentSubscriptionRouter.post( '/admin/unsubscribeApproval', isAllowedSessionHandler, authorize( {
|
|
90
|
+
userType: [ 'tango' ], access: [
|
|
91
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
92
|
+
],
|
|
93
|
+
} ), validate( validationDtos.validateTrialandUnsubscribeParams ), paymentController.unsubscribeApproval );
|
|
94
|
+
|
|
95
|
+
paymentSubscriptionRouter.get( '/admin/getProductViewList', isAllowedSessionHandler, authorize( {
|
|
96
|
+
userType: [ 'tango' ], access: [
|
|
97
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
98
|
+
],
|
|
99
|
+
} ), validate( validationDtos.validateStoreParams ), validateClient, paymentController.productViewList );
|
|
100
|
+
|
|
101
|
+
paymentSubscriptionRouter.post( '/admin/getstoreViewList', isAllowedSessionHandler, authorize( {
|
|
102
|
+
userType: [ 'tango' ], access: [
|
|
103
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
104
|
+
],
|
|
105
|
+
} ), validate( validationDtos.validateStoreViewParams ), validateClient, paymentController.storeViewList );
|
|
106
|
+
|
|
107
|
+
paymentSubscriptionRouter.get( '/admin/getStoreLocationList', isAllowedSessionHandler, authorize( {
|
|
108
|
+
userType: [ 'tango' ], access: [
|
|
109
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
110
|
+
],
|
|
111
|
+
} ), validate( validationDtos.validateStoreParams ), validateClient, paymentController.storeLocationList );
|
|
112
|
+
|
|
113
|
+
paymentSubscriptionRouter.post( '/admin/addStoreProduct', isAllowedSessionHandler, authorize( {
|
|
114
|
+
userType: [ 'tango' ], access: [
|
|
115
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
116
|
+
],
|
|
117
|
+
} ), validate( validationDtos.validateAddStoreProductParams ), validateClient, paymentController.addStoreProduct );
|
|
118
|
+
|
|
119
|
+
paymentSubscriptionRouter.post( '/invoiceList', isAllowedSessionHandler, authorize( {
|
|
120
|
+
userType: [ 'tango', 'client' ], access: [
|
|
121
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
122
|
+
],
|
|
123
|
+
} ), validate( validationDtos.validateInvoiceParams ), validateClient, paymentController.invoiceList );
|
|
124
|
+
|
|
125
|
+
paymentSubscriptionRouter.post( '/admin/priceList', isAllowedSessionHandler, authorize( {
|
|
126
|
+
userType: [ 'tango' ], access: [
|
|
127
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
128
|
+
],
|
|
129
|
+
} ), validate( validationDtos.validatePriceListParams ), validateClient, paymentController.priceList );
|
|
130
|
+
|
|
131
|
+
paymentSubscriptionRouter.post( '/admin/pricing', isAllowedSessionHandler, authorize( {
|
|
132
|
+
userType: [ 'tango' ], access: [
|
|
133
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
134
|
+
],
|
|
135
|
+
} ), validate( validationDtos.validatePriceParams ), validateClient, paymentController.pricingListUpdate );
|
|
136
|
+
|
|
137
|
+
paymentSubscriptionRouter.post( '/creditNotes', isAllowedSessionHandler, authorize( {
|
|
138
|
+
userType: [ 'tango' ], access: [
|
|
139
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
140
|
+
],
|
|
141
|
+
} ), validate( validationDtos.revisedParams ), paymentController.updatedRevisedPrice );
|
|
142
|
+
|
|
143
|
+
paymentSubscriptionRouter.get( '/creditNotes/invoiceList/:clientId', isAllowedSessionHandler, authorize( {
|
|
144
|
+
userType: [ 'tango' ], access: [
|
|
145
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isEdit' ] },
|
|
146
|
+
],
|
|
147
|
+
} ), validate( validationDtos.validateBrandParams ), paymentController.unpaidInvoiceList );
|
|
148
|
+
|
|
149
|
+
paymentSubscriptionRouter.post( '/admin/getStoreProducts', isAllowedSessionHandler, authorize( {
|
|
150
|
+
userType: [ 'tango', 'client' ], access: [
|
|
151
|
+
{ featureName: 'settings', name: 'paymentSubscriptions', permissions: [ 'isView' ] },
|
|
152
|
+
],
|
|
153
|
+
} ), validate( validationDtos.validateStoreProductsParams ), paymentController.getStoreProducts );
|
|
154
|
+
|
|
155
|
+
paymentSubscriptionRouter.get( '/trialRemaindList', paymentController.getRemindClients );
|
|
156
|
+
paymentSubscriptionRouter.get( '/trialExpiredList', paymentController.getExpiredClients );
|
|
157
|
+
paymentSubscriptionRouter.get( '/invoiceDownload', paymentController.invoiceDownload );
|
|
158
|
+
paymentSubscriptionRouter.post( '/invoiceStatusUpdate/:invoiceId', paymentController.updateInvoiceStatus );
|
|
159
|
+
paymentSubscriptionRouter.post( '/invoice/create', validateClient, paymentController.invoiceCreate );
|
|
58
160
|
|
|
59
161
|
|
|
@@ -11,3 +11,7 @@ export const findOne = async ( query ={}, record={} ) => {
|
|
|
11
11
|
export const find = async ( query ={}, record={} ) => {
|
|
12
12
|
return await model.invoiceModel.find( query, record );
|
|
13
13
|
};
|
|
14
|
+
|
|
15
|
+
export const create = async ( data ) => {
|
|
16
|
+
return await model.invoiceModel.create( data );
|
|
17
|
+
};
|