@takentrade/takentrade-libs 1.2.63 → 1.2.65
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/notification/notification.client.d.ts +3 -1
- package/dist/notification/notification.client.js +14 -0
- package/dist/notification/notification.enum.d.ts +3 -0
- package/dist/notification/notification.enum.js +3 -0
- package/dist/notification/notification.interface.d.ts +17 -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 +2 -2
- 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);
|
|
@@ -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, NewDeviceNotificationData } from './notification.interface';
|
|
4
4
|
export declare class NotificationClient {
|
|
5
5
|
private readonly natsClient;
|
|
6
6
|
constructor(natsClient: ClientProxy);
|
|
@@ -48,6 +48,8 @@ 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>;
|
|
52
|
+
sendNewDeviceNotificationEmail(to: string, data: Omit<NewDeviceNotificationData, keyof BaseEmailData>): Promise<void>;
|
|
51
53
|
sendWelcomeMail(to: string, data: BaseEmailData): Promise<void>;
|
|
52
54
|
/**
|
|
53
55
|
* Sends generated OTP to a recipient
|
|
@@ -192,6 +192,20 @@ 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
|
+
}
|
|
202
|
+
async sendNewDeviceNotificationEmail(to, data) {
|
|
203
|
+
this.validateEmailAddress(to);
|
|
204
|
+
this.natsClient.emit(notification_enum_1.NotificationSubcribedNATSSubject.NEW_DEVICE_NOTIFICATION_MAIL, {
|
|
205
|
+
to,
|
|
206
|
+
data,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
195
209
|
async sendWelcomeMail(to, data) {
|
|
196
210
|
this.validateEmailAddress(to);
|
|
197
211
|
this.natsClient.emit(notification_enum_1.NotificationSubcribedNATSSubject.WELCOME_MAIL, {
|
|
@@ -32,6 +32,9 @@ 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",
|
|
37
|
+
NEW_DEVICE_NOTIFICATION_MAIL = "notification.mail.new.device",
|
|
35
38
|
NOTIFICATION_TEXT = "notification.text",
|
|
36
39
|
NOTIFICATION_OTP_TEXT = "notification.text.otp",
|
|
37
40
|
NOTIFICATION_OTP_VOICE = "notification.voice.otp",
|
|
@@ -39,6 +39,9 @@ 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";
|
|
44
|
+
NotificationSubcribedNATSSubject["NEW_DEVICE_NOTIFICATION_MAIL"] = "notification.mail.new.device";
|
|
42
45
|
// TEXT
|
|
43
46
|
NotificationSubcribedNATSSubject["NOTIFICATION_TEXT"] = "notification.text";
|
|
44
47
|
NotificationSubcribedNATSSubject["NOTIFICATION_OTP_TEXT"] = "notification.text.otp";
|
|
@@ -141,3 +141,20 @@ 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
|
+
}
|
|
154
|
+
export interface NewDeviceNotificationData extends BaseEmailData {
|
|
155
|
+
deviceId: string;
|
|
156
|
+
ipAddress: string;
|
|
157
|
+
loginTime: string;
|
|
158
|
+
deviceInfo?: string;
|
|
159
|
+
location?: string;
|
|
160
|
+
}
|