@takentrade/takentrade-libs 1.2.62 → 1.2.64
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/dist/common/index.d.ts +0 -1
- package/dist/common/index.js +0 -1
- package/dist/nats/constants/nats.constants.d.ts +15 -0
- package/dist/nats/constants/nats.constants.js +16 -0
- package/dist/notification/notification.client.d.ts +2 -1
- package/dist/notification/notification.client.js +7 -0
- package/dist/notification/notification.enum.d.ts +2 -0
- package/dist/notification/notification.enum.js +2 -0
- package/dist/notification/notification.interface.d.ts +10 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/enums/otp.enum.d.ts +2 -1
- package/dist/utils/enums/otp.enum.js +1 -0
- package/package.json +1 -1
- package/dist/common/dto/index.d.ts +0 -3
- package/dist/common/dto/index.js +0 -19
- package/dist/common/dto/payment/index.d.ts +0 -1
- package/dist/common/dto/payment/index.js +0 -17
- package/dist/common/dto/payment/withdrawal.dto.d.ts +0 -19
- package/dist/common/dto/payment/withdrawal.dto.js +0 -97
- package/dist/common/dto/support/create-message.dto.d.ts +0 -4
- package/dist/common/dto/support/create-message.dto.js +0 -25
- package/dist/common/dto/support/create-ticket.dto.d.ts +0 -7
- package/dist/common/dto/support/create-ticket.dto.js +0 -43
- package/dist/common/dto/support/index.d.ts +0 -3
- package/dist/common/dto/support/index.js +0 -19
- package/dist/common/dto/support/update-ticket.dto.d.ts +0 -6
- package/dist/common/dto/support/update-ticket.dto.js +0 -41
- package/dist/common/dto/users/index.d.ts +0 -6
- package/dist/common/dto/users/index.js +0 -22
- package/dist/common/dto/users/login.dto.d.ts +0 -9
- package/dist/common/dto/users/login.dto.js +0 -40
- package/dist/common/dto/users/passcode.dto.d.ts +0 -12
- package/dist/common/dto/users/passcode.dto.js +0 -51
- package/dist/common/dto/users/phone.dto.d.ts +0 -4
- package/dist/common/dto/users/phone.dto.js +0 -26
- package/dist/common/dto/users/register.dto.d.ts +0 -8
- package/dist/common/dto/users/register.dto.js +0 -46
- package/dist/common/dto/users/request-phone-verification.dto.d.ts +0 -3
- package/dist/common/dto/users/request-phone-verification.dto.js +0 -20
- package/dist/common/dto/users/verify-phone.dto.d.ts +0 -3
- package/dist/common/dto/users/verify-phone.dto.js +0 -20
package/dist/common/index.d.ts
CHANGED
package/dist/common/index.js
CHANGED
|
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./enums"), exports);
|
|
19
|
-
__exportStar(require("./dto"), exports);
|
|
20
19
|
__exportStar(require("./utils"), exports);
|
|
21
20
|
__exportStar(require("./circuit-breaker/circuit-breaker.module"), exports);
|
|
22
21
|
__exportStar(require("./circuit-breaker/circuit-breaker.service"), exports);
|
|
@@ -112,6 +112,21 @@ export declare enum NatsSubjects {
|
|
|
112
112
|
ACCOUNT_GET_HOLDS = "account.holds.get",
|
|
113
113
|
ACCOUNT_RELEASE_HOLD = "account.hold.release",
|
|
114
114
|
ADMIN_GET_ALL_HOLDS = "admin.holds.get.all",
|
|
115
|
+
ADMIN_CREATE = "admin.create",
|
|
116
|
+
ADMIN_DEBIT_CUSTOMER = "admin.customer.debit",
|
|
117
|
+
ADMIN_CREDIT_CUSTOMER = "admin.customer.credit",
|
|
118
|
+
ADMIN_FREEZE_CUSTOMER = "admin.customer.freeze",
|
|
119
|
+
ADMIN_UNFREEZE_CUSTOMER = "admin.customer.unfreeze",
|
|
120
|
+
ADMIN_UPDATE_CUSTOMER = "admin.customer.update",
|
|
121
|
+
ADMIN_GET_WALLET_BALANCES = "admin.wallet.balances.get",
|
|
122
|
+
ADMIN_GET_TERMII_BALANCE = "admin.termii.balance.get",
|
|
123
|
+
ADMIN_GET_CREDITSWITCH_BALANCE = "admin.creditswitch.balance.get",
|
|
124
|
+
ADMIN_GET_RELOADLY_BALANCE = "admin.reloadly.balance.get",
|
|
125
|
+
ADMIN_SEND_BULK_EMAIL = "admin.email.bulk.send",
|
|
126
|
+
ADMIN_SEND_PUSH_NOTIFICATION = "admin.notification.push.send",
|
|
127
|
+
ADMIN_GET_FINANCIAL_SUMMARY = "admin.financial.summary.get",
|
|
128
|
+
ADMIN_GET_PROVIDUS_CUSTOMERS = "admin.providus.customers.get",
|
|
129
|
+
ADMIN_GET_PROVIDUS_CUSTOMER = "admin.providus.customer.get",
|
|
115
130
|
GUARANTOR_CREATE = "guarantor.create",
|
|
116
131
|
GUARANTOR_GET_ALL = "guarantor.get.all",
|
|
117
132
|
GUARANTOR_UPDATE = "guarantor.update",
|
|
@@ -141,6 +141,22 @@ var NatsSubjects;
|
|
|
141
141
|
NatsSubjects["ACCOUNT_GET_HOLDS"] = "account.holds.get";
|
|
142
142
|
NatsSubjects["ACCOUNT_RELEASE_HOLD"] = "account.hold.release";
|
|
143
143
|
NatsSubjects["ADMIN_GET_ALL_HOLDS"] = "admin.holds.get.all";
|
|
144
|
+
// Admin operations
|
|
145
|
+
NatsSubjects["ADMIN_CREATE"] = "admin.create";
|
|
146
|
+
NatsSubjects["ADMIN_DEBIT_CUSTOMER"] = "admin.customer.debit";
|
|
147
|
+
NatsSubjects["ADMIN_CREDIT_CUSTOMER"] = "admin.customer.credit";
|
|
148
|
+
NatsSubjects["ADMIN_FREEZE_CUSTOMER"] = "admin.customer.freeze";
|
|
149
|
+
NatsSubjects["ADMIN_UNFREEZE_CUSTOMER"] = "admin.customer.unfreeze";
|
|
150
|
+
NatsSubjects["ADMIN_UPDATE_CUSTOMER"] = "admin.customer.update";
|
|
151
|
+
NatsSubjects["ADMIN_GET_WALLET_BALANCES"] = "admin.wallet.balances.get";
|
|
152
|
+
NatsSubjects["ADMIN_GET_TERMII_BALANCE"] = "admin.termii.balance.get";
|
|
153
|
+
NatsSubjects["ADMIN_GET_CREDITSWITCH_BALANCE"] = "admin.creditswitch.balance.get";
|
|
154
|
+
NatsSubjects["ADMIN_GET_RELOADLY_BALANCE"] = "admin.reloadly.balance.get";
|
|
155
|
+
NatsSubjects["ADMIN_SEND_BULK_EMAIL"] = "admin.email.bulk.send";
|
|
156
|
+
NatsSubjects["ADMIN_SEND_PUSH_NOTIFICATION"] = "admin.notification.push.send";
|
|
157
|
+
NatsSubjects["ADMIN_GET_FINANCIAL_SUMMARY"] = "admin.financial.summary.get";
|
|
158
|
+
NatsSubjects["ADMIN_GET_PROVIDUS_CUSTOMERS"] = "admin.providus.customers.get";
|
|
159
|
+
NatsSubjects["ADMIN_GET_PROVIDUS_CUSTOMER"] = "admin.providus.customer.get";
|
|
144
160
|
// Guarantor operations
|
|
145
161
|
NatsSubjects["GUARANTOR_CREATE"] = "guarantor.create";
|
|
146
162
|
NatsSubjects["GUARANTOR_GET_ALL"] = "guarantor.get.all";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClientProxy } from '@nestjs/microservices';
|
|
2
2
|
import { OTPNotificationChannel } from './notification.enum';
|
|
3
|
-
import { AccountFreezeEmailData, AccountStatementEmailData, AccountUnfreezeEmailData, AjoCancellationEmailData, AjoContributionEmailData, AjoInviteEmailData, AjoMembershipUpdateEmailData, ContactMessageEmailData, CreditTransactionMailData, CustomMailSendOptions, DebitTransactionMailData, ElectricityEmailData, InvestmentCancellationEmailData, LoanApprovedEmailData, LoanRepaymentConfirmationEmailData, LoanRepaymentFailedEmailData, NewLoanApplicationEmailData, OTPMailData, PasswordResetMailData, ResetTransactionPinEmailData, AjoContributionConfirmationEmailData, InvestmentConfirmationEmailData, SendPushNotificationInput, BaseEmailData, EducationEmailData, EmailVerificationMailData } from './notification.interface';
|
|
3
|
+
import { AccountFreezeEmailData, AccountStatementEmailData, AccountUnfreezeEmailData, AjoCancellationEmailData, AjoContributionEmailData, AjoInviteEmailData, AjoMembershipUpdateEmailData, ContactMessageEmailData, CreditTransactionMailData, CustomMailSendOptions, DebitTransactionMailData, ElectricityEmailData, InvestmentCancellationEmailData, LoanApprovedEmailData, LoanRepaymentConfirmationEmailData, LoanRepaymentFailedEmailData, NewLoanApplicationEmailData, OTPMailData, PasswordResetMailData, ResetTransactionPinEmailData, AjoContributionConfirmationEmailData, InvestmentConfirmationEmailData, SendPushNotificationInput, BaseEmailData, EducationEmailData, EmailVerificationMailData, DeviceVerificationMailData } from './notification.interface';
|
|
4
4
|
export declare class NotificationClient {
|
|
5
5
|
private readonly natsClient;
|
|
6
6
|
constructor(natsClient: ClientProxy);
|
|
@@ -48,6 +48,7 @@ export declare class NotificationClient {
|
|
|
48
48
|
* @param data - Education service purchase details
|
|
49
49
|
*/
|
|
50
50
|
sendEducationPurchaseEmail(to: string, data: Omit<EducationEmailData, keyof BaseEmailData>): Promise<void>;
|
|
51
|
+
sendDeviceVerificationEmail(to: string, data: Omit<DeviceVerificationMailData, keyof BaseEmailData>): Promise<void>;
|
|
51
52
|
sendWelcomeMail(to: string, data: BaseEmailData): Promise<void>;
|
|
52
53
|
/**
|
|
53
54
|
* Sends generated OTP to a recipient
|
|
@@ -192,6 +192,13 @@ let NotificationClient = class NotificationClient {
|
|
|
192
192
|
data,
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
+
async sendDeviceVerificationEmail(to, data) {
|
|
196
|
+
this.validateEmailAddress(to);
|
|
197
|
+
this.natsClient.emit(notification_enum_1.NotificationSubcribedNATSSubject.DEVICE_VERIFICATION_MAIL, {
|
|
198
|
+
to,
|
|
199
|
+
data,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
195
202
|
async sendWelcomeMail(to, data) {
|
|
196
203
|
this.validateEmailAddress(to);
|
|
197
204
|
this.natsClient.emit(notification_enum_1.NotificationSubcribedNATSSubject.WELCOME_MAIL, {
|
|
@@ -32,6 +32,8 @@ export declare enum NotificationSubcribedNATSSubject {
|
|
|
32
32
|
NEW_INVESTMENT_MAIL = "notification.mail.investment.new",
|
|
33
33
|
ELECTRICITY_PURCHASE_MAIL = "notification.mail.electricity.purchase",
|
|
34
34
|
EDUCATION_PURCHASE_MAIL = "notification.mail.education.purchase",
|
|
35
|
+
DEVICE_VERIFICATION_MAIL = "notification.mail.device.verification",
|
|
36
|
+
DEVICE_VERIFICATION_SMS = "notification.mail.device.verification.sms",
|
|
35
37
|
NOTIFICATION_TEXT = "notification.text",
|
|
36
38
|
NOTIFICATION_OTP_TEXT = "notification.text.otp",
|
|
37
39
|
NOTIFICATION_OTP_VOICE = "notification.voice.otp",
|
|
@@ -39,6 +39,8 @@ var NotificationSubcribedNATSSubject;
|
|
|
39
39
|
NotificationSubcribedNATSSubject["NEW_INVESTMENT_MAIL"] = "notification.mail.investment.new";
|
|
40
40
|
NotificationSubcribedNATSSubject["ELECTRICITY_PURCHASE_MAIL"] = "notification.mail.electricity.purchase";
|
|
41
41
|
NotificationSubcribedNATSSubject["EDUCATION_PURCHASE_MAIL"] = "notification.mail.education.purchase";
|
|
42
|
+
NotificationSubcribedNATSSubject["DEVICE_VERIFICATION_MAIL"] = "notification.mail.device.verification";
|
|
43
|
+
NotificationSubcribedNATSSubject["DEVICE_VERIFICATION_SMS"] = "notification.mail.device.verification.sms";
|
|
42
44
|
// TEXT
|
|
43
45
|
NotificationSubcribedNATSSubject["NOTIFICATION_TEXT"] = "notification.text";
|
|
44
46
|
NotificationSubcribedNATSSubject["NOTIFICATION_OTP_TEXT"] = "notification.text.otp";
|
|
@@ -141,3 +141,13 @@ export interface EducationEmailData extends BaseEmailData {
|
|
|
141
141
|
amount: number;
|
|
142
142
|
purchase_code: string;
|
|
143
143
|
}
|
|
144
|
+
export interface DeviceVerificationMailData extends BaseEmailData {
|
|
145
|
+
to: string;
|
|
146
|
+
subject: string;
|
|
147
|
+
otp: string;
|
|
148
|
+
deviceId: string;
|
|
149
|
+
deviceName?: string;
|
|
150
|
+
ipAddress?: string;
|
|
151
|
+
time?: string;
|
|
152
|
+
expiration?: string;
|
|
153
|
+
}
|