@hedhog/admin 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/admin.module.d.ts +3 -0
- package/dist/admin.module.d.ts.map +1 -0
- package/dist/admin.module.js +33 -0
- package/dist/admin.module.js.map +1 -0
- package/dist/auth/src/auth.controller.d.ts +21 -0
- package/dist/auth/src/auth.controller.d.ts.map +1 -0
- package/dist/auth/src/auth.controller.js +77 -0
- package/dist/auth/src/auth.controller.js.map +1 -0
- package/dist/auth/src/auth.module.d.ts +3 -0
- package/dist/auth/src/auth.module.d.ts.map +1 -0
- package/dist/auth/src/auth.module.js +50 -0
- package/dist/auth/src/auth.module.js.map +1 -0
- package/dist/auth/src/auth.service.d.ts +36 -0
- package/dist/auth/src/auth.service.d.ts.map +1 -0
- package/dist/auth/src/auth.service.js +162 -0
- package/dist/auth/src/auth.service.js.map +1 -0
- package/dist/auth/src/auth.service.spec.d.ts +2 -0
- package/dist/auth/src/auth.service.spec.d.ts.map +1 -0
- package/dist/auth/src/auth.service.spec.js +17 -0
- package/dist/auth/src/auth.service.spec.js.map +1 -0
- package/dist/auth/src/decorators/public.decorator.d.ts +3 -0
- package/dist/auth/src/decorators/public.decorator.d.ts.map +1 -0
- package/dist/auth/src/decorators/public.decorator.js +8 -0
- package/dist/auth/src/decorators/public.decorator.js.map +1 -0
- package/dist/auth/src/decorators/user.decorator.d.ts +2 -0
- package/dist/auth/src/decorators/user.decorator.d.ts.map +1 -0
- package/dist/auth/src/decorators/user.decorator.js +12 -0
- package/dist/auth/src/decorators/user.decorator.js.map +1 -0
- package/dist/auth/src/dto/forget.dto.d.ts +4 -0
- package/dist/auth/src/dto/forget.dto.d.ts.map +1 -0
- package/dist/auth/src/dto/forget.dto.js +21 -0
- package/dist/auth/src/dto/forget.dto.js.map +1 -0
- package/dist/auth/src/dto/login.dto.d.ts +5 -0
- package/dist/auth/src/dto/login.dto.d.ts.map +1 -0
- package/dist/auth/src/dto/login.dto.js +31 -0
- package/dist/auth/src/dto/login.dto.js.map +1 -0
- package/dist/auth/src/dto/otp.dto.d.ts +5 -0
- package/dist/auth/src/dto/otp.dto.d.ts.map +1 -0
- package/dist/auth/src/dto/otp.dto.js +27 -0
- package/dist/auth/src/dto/otp.dto.js.map +1 -0
- package/dist/auth/src/enums/multifactor-type.enum.d.ts +5 -0
- package/dist/auth/src/enums/multifactor-type.enum.d.ts.map +1 -0
- package/dist/auth/src/enums/multifactor-type.enum.js +9 -0
- package/dist/auth/src/enums/multifactor-type.enum.js.map +1 -0
- package/dist/auth/src/guards/auth.guard.d.ts +11 -0
- package/dist/auth/src/guards/auth.guard.d.ts.map +1 -0
- package/dist/auth/src/guards/auth.guard.js +56 -0
- package/dist/auth/src/guards/auth.guard.js.map +1 -0
- package/dist/auth/src/migrations/index.d.ts +6 -0
- package/dist/auth/src/migrations/index.d.ts.map +1 -0
- package/dist/auth/src/migrations/index.js +121 -0
- package/dist/auth/src/migrations/index.js.map +1 -0
- package/dist/auth/src/types/user.type.d.ts +9 -0
- package/dist/auth/src/types/user.type.d.ts.map +1 -0
- package/dist/auth/src/types/user.type.js +3 -0
- package/dist/auth/src/types/user.type.js.map +1 -0
- package/dist/file/src/dto/delete.dto.d.ts +4 -0
- package/dist/file/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/file/src/dto/delete.dto.js +23 -0
- package/dist/file/src/dto/delete.dto.js.map +1 -0
- package/dist/file/src/file.module.d.ts +3 -0
- package/dist/file/src/file.module.d.ts.map +1 -0
- package/dist/file/src/file.module.js +29 -0
- package/dist/file/src/file.module.js.map +1 -0
- package/dist/file/src/file.service.d.ts +12 -0
- package/dist/file/src/file.service.d.ts.map +1 -0
- package/dist/file/src/file.service.js +59 -0
- package/dist/file/src/file.service.js.map +1 -0
- package/dist/file/src/migrations/index.d.ts +6 -0
- package/dist/file/src/migrations/index.d.ts.map +1 -0
- package/dist/file/src/migrations/index.js +137 -0
- package/dist/file/src/migrations/index.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts +6 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.d.ts.map +1 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.js +10 -0
- package/dist/mail/src/enums/mail-configuration-type.enum.js.map +1 -0
- package/dist/mail/src/interfaces/index.d.ts +3 -0
- package/dist/mail/src/interfaces/index.d.ts.map +1 -0
- package/dist/mail/src/interfaces/index.js +19 -0
- package/dist/mail/src/interfaces/index.js.map +1 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts +32 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.d.ts.map +1 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.js +3 -0
- package/dist/mail/src/interfaces/mail-module-options.interface.js.map +1 -0
- package/dist/mail/src/interfaces/mail-type.d.ts +13 -0
- package/dist/mail/src/interfaces/mail-type.d.ts.map +1 -0
- package/dist/mail/src/interfaces/mail-type.js +3 -0
- package/dist/mail/src/interfaces/mail-type.js.map +1 -0
- package/dist/mail/src/mail.consts.d.ts +17 -0
- package/dist/mail/src/mail.consts.d.ts.map +1 -0
- package/dist/mail/src/mail.consts.js +5 -0
- package/dist/mail/src/mail.consts.js.map +1 -0
- package/dist/mail/src/mail.module.d.ts +8 -0
- package/dist/mail/src/mail.module.d.ts.map +1 -0
- package/dist/mail/src/mail.module.js +51 -0
- package/dist/mail/src/mail.module.js.map +1 -0
- package/dist/mail/src/mail.service.d.ts +14 -0
- package/dist/mail/src/mail.service.d.ts.map +1 -0
- package/dist/mail/src/mail.service.js +281 -0
- package/dist/mail/src/mail.service.js.map +1 -0
- package/dist/mail/src/mail.service.spec.d.ts +2 -0
- package/dist/mail/src/mail.service.spec.d.ts.map +1 -0
- package/dist/mail/src/mail.service.spec.js +17 -0
- package/dist/mail/src/mail.service.spec.js.map +1 -0
- package/dist/menu/src/dto/create.dto.d.ts +8 -0
- package/dist/menu/src/dto/create.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/create.dto.js +44 -0
- package/dist/menu/src/dto/create.dto.js.map +1 -0
- package/dist/menu/src/dto/delete.dto.d.ts +4 -0
- package/dist/menu/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/delete.dto.js +24 -0
- package/dist/menu/src/dto/delete.dto.js.map +1 -0
- package/dist/menu/src/dto/order.dto.d.ts +4 -0
- package/dist/menu/src/dto/order.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/order.dto.js +23 -0
- package/dist/menu/src/dto/order.dto.js.map +1 -0
- package/dist/menu/src/dto/update.dto.d.ts +7 -0
- package/dist/menu/src/dto/update.dto.d.ts.map +1 -0
- package/dist/menu/src/dto/update.dto.js +37 -0
- package/dist/menu/src/dto/update.dto.js.map +1 -0
- package/dist/menu/src/menu.controller.d.ts +19 -0
- package/dist/menu/src/menu.controller.d.ts.map +1 -0
- package/dist/menu/src/menu.controller.js +117 -0
- package/dist/menu/src/menu.controller.js.map +1 -0
- package/dist/menu/src/menu.module.d.ts +3 -0
- package/dist/menu/src/menu.module.d.ts.map +1 -0
- package/dist/menu/src/menu.module.js +31 -0
- package/dist/menu/src/menu.module.js.map +1 -0
- package/dist/menu/src/menu.service.d.ts +23 -0
- package/dist/menu/src/menu.service.d.ts.map +1 -0
- package/dist/menu/src/menu.service.js +117 -0
- package/dist/menu/src/menu.service.js.map +1 -0
- package/dist/menu/src/migrations/index.d.ts +7 -0
- package/dist/menu/src/migrations/index.d.ts.map +1 -0
- package/dist/menu/src/migrations/index.js +101 -0
- package/dist/menu/src/migrations/index.js.map +1 -0
- package/dist/migrations/1726795702341-migrate.d.ts +6 -0
- package/dist/migrations/1726795702341-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795702341-migrate.js +121 -0
- package/dist/migrations/1726795702341-migrate.js.map +1 -0
- package/dist/migrations/1726795734665-migrate.d.ts +6 -0
- package/dist/migrations/1726795734665-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795734665-migrate.js +40 -0
- package/dist/migrations/1726795734665-migrate.js.map +1 -0
- package/dist/migrations/1726795818403-migrate.d.ts +7 -0
- package/dist/migrations/1726795818403-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795818403-migrate.js +101 -0
- package/dist/migrations/1726795818403-migrate.js.map +1 -0
- package/dist/migrations/1726795828359-migrate.d.ts +6 -0
- package/dist/migrations/1726795828359-migrate.d.ts.map +1 -0
- package/dist/migrations/1726795828359-migrate.js +525 -0
- package/dist/migrations/1726795828359-migrate.js.map +1 -0
- package/dist/permission/src/decorators/permission.decorator.d.ts +3 -0
- package/dist/permission/src/decorators/permission.decorator.d.ts.map +1 -0
- package/dist/permission/src/decorators/permission.decorator.js +8 -0
- package/dist/permission/src/decorators/permission.decorator.js.map +1 -0
- package/dist/permission/src/dto/create.dto.d.ts +5 -0
- package/dist/permission/src/dto/create.dto.d.ts.map +1 -0
- package/dist/permission/src/dto/create.dto.js +27 -0
- package/dist/permission/src/dto/create.dto.js.map +1 -0
- package/dist/permission/src/dto/delete.dto.d.ts +4 -0
- package/dist/permission/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/permission/src/dto/delete.dto.js +23 -0
- package/dist/permission/src/dto/delete.dto.js.map +1 -0
- package/dist/permission/src/dto/update.dto.d.ts +5 -0
- package/dist/permission/src/dto/update.dto.d.ts.map +1 -0
- package/dist/permission/src/dto/update.dto.js +27 -0
- package/dist/permission/src/dto/update.dto.js.map +1 -0
- package/dist/permission/src/guards/permission.guard.d.ts +11 -0
- package/dist/permission/src/guards/permission.guard.d.ts.map +1 -0
- package/dist/permission/src/guards/permission.guard.js +99 -0
- package/dist/permission/src/guards/permission.guard.js.map +1 -0
- package/dist/permission/src/migrations/index.d.ts +6 -0
- package/dist/permission/src/migrations/index.d.ts.map +1 -0
- package/dist/permission/src/migrations/index.js +520 -0
- package/dist/permission/src/migrations/index.js.map +1 -0
- package/dist/permission/src/permission.controller.d.ts +14 -0
- package/dist/permission/src/permission.controller.d.ts.map +1 -0
- package/dist/permission/src/permission.controller.js +95 -0
- package/dist/permission/src/permission.controller.js.map +1 -0
- package/dist/permission/src/permission.module.d.ts +3 -0
- package/dist/permission/src/permission.module.d.ts.map +1 -0
- package/dist/permission/src/permission.module.js +39 -0
- package/dist/permission/src/permission.module.js.map +1 -0
- package/dist/permission/src/permission.service.d.ts +19 -0
- package/dist/permission/src/permission.service.d.ts.map +1 -0
- package/dist/permission/src/permission.service.js +73 -0
- package/dist/permission/src/permission.service.js.map +1 -0
- package/dist/permission/src/types/permission.types.d.ts +33 -0
- package/dist/permission/src/types/permission.types.d.ts.map +1 -0
- package/dist/permission/src/types/permission.types.js +3 -0
- package/dist/permission/src/types/permission.types.js.map +1 -0
- package/dist/screen/src/dto/create.dto.d.ts +7 -0
- package/dist/screen/src/dto/create.dto.d.ts.map +1 -0
- package/dist/screen/src/dto/create.dto.js +37 -0
- package/dist/screen/src/dto/create.dto.js.map +1 -0
- package/dist/screen/src/dto/delete.dto.d.ts +4 -0
- package/dist/screen/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/screen/src/dto/delete.dto.js +23 -0
- package/dist/screen/src/dto/delete.dto.js.map +1 -0
- package/dist/screen/src/dto/update.dto.d.ts +7 -0
- package/dist/screen/src/dto/update.dto.d.ts.map +1 -0
- package/dist/screen/src/dto/update.dto.js +37 -0
- package/dist/screen/src/dto/update.dto.js.map +1 -0
- package/dist/screen/src/migrations/index.d.ts +6 -0
- package/dist/screen/src/migrations/index.d.ts.map +1 -0
- package/dist/screen/src/migrations/index.js +40 -0
- package/dist/screen/src/migrations/index.js.map +1 -0
- package/dist/screen/src/screen.controller.d.ts +14 -0
- package/dist/screen/src/screen.controller.d.ts.map +1 -0
- package/dist/screen/src/screen.controller.js +94 -0
- package/dist/screen/src/screen.controller.js.map +1 -0
- package/dist/screen/src/screen.module.d.ts +3 -0
- package/dist/screen/src/screen.module.d.ts.map +1 -0
- package/dist/screen/src/screen.module.js +31 -0
- package/dist/screen/src/screen.module.js.map +1 -0
- package/dist/screen/src/screen.service.d.ts +19 -0
- package/dist/screen/src/screen.service.d.ts.map +1 -0
- package/dist/screen/src/screen.service.js +73 -0
- package/dist/screen/src/screen.service.js.map +1 -0
- package/dist/setting/src/dto/create.dto.d.ts +4 -0
- package/dist/setting/src/dto/create.dto.d.ts.map +1 -0
- package/dist/setting/src/dto/create.dto.js +22 -0
- package/dist/setting/src/dto/create.dto.js.map +1 -0
- package/dist/setting/src/dto/delete.dto.d.ts +4 -0
- package/dist/setting/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/setting/src/dto/delete.dto.js +23 -0
- package/dist/setting/src/dto/delete.dto.js.map +1 -0
- package/dist/setting/src/dto/update.dto.d.ts +4 -0
- package/dist/setting/src/dto/update.dto.d.ts.map +1 -0
- package/dist/setting/src/dto/update.dto.js +8 -0
- package/dist/setting/src/dto/update.dto.js.map +1 -0
- package/dist/setting/src/migrations/index.d.ts +6 -0
- package/dist/setting/src/migrations/index.d.ts.map +1 -0
- package/dist/setting/src/migrations/index.js +67 -0
- package/dist/setting/src/migrations/index.js.map +1 -0
- package/dist/setting/src/settings.controller.d.ts +14 -0
- package/dist/setting/src/settings.controller.d.ts.map +1 -0
- package/dist/setting/src/settings.controller.js +94 -0
- package/dist/setting/src/settings.controller.js.map +1 -0
- package/dist/setting/src/settings.module.d.ts +3 -0
- package/dist/setting/src/settings.module.d.ts.map +1 -0
- package/dist/setting/src/settings.module.js +31 -0
- package/dist/setting/src/settings.module.js.map +1 -0
- package/dist/setting/src/settings.service.d.ts +19 -0
- package/dist/setting/src/settings.service.d.ts.map +1 -0
- package/dist/setting/src/settings.service.js +70 -0
- package/dist/setting/src/settings.service.js.map +1 -0
- package/dist/user/src/constants/user.constants.d.ts +2 -0
- package/dist/user/src/constants/user.constants.d.ts.map +1 -0
- package/dist/user/src/constants/user.constants.js +5 -0
- package/dist/user/src/constants/user.constants.js.map +1 -0
- package/dist/user/src/dto/create.dto.d.ts +6 -0
- package/dist/user/src/dto/create.dto.d.ts.map +1 -0
- package/dist/user/src/dto/create.dto.js +37 -0
- package/dist/user/src/dto/create.dto.js.map +1 -0
- package/dist/user/src/dto/delete.dto.d.ts +4 -0
- package/dist/user/src/dto/delete.dto.d.ts.map +1 -0
- package/dist/user/src/dto/delete.dto.js +23 -0
- package/dist/user/src/dto/delete.dto.js.map +1 -0
- package/dist/user/src/dto/update.dto.d.ts +8 -0
- package/dist/user/src/dto/update.dto.d.ts.map +1 -0
- package/dist/user/src/dto/update.dto.js +50 -0
- package/dist/user/src/dto/update.dto.js.map +1 -0
- package/dist/user/src/user.controller.d.ts +14 -0
- package/dist/user/src/user.controller.d.ts.map +1 -0
- package/dist/user/src/user.controller.js +94 -0
- package/dist/user/src/user.controller.js.map +1 -0
- package/dist/user/src/user.module.d.ts +3 -0
- package/dist/user/src/user.module.d.ts.map +1 -0
- package/dist/user/src/user.module.js +31 -0
- package/dist/user/src/user.module.js.map +1 -0
- package/dist/user/src/user.service.d.ts +20 -0
- package/dist/user/src/user.service.d.ts.map +1 -0
- package/dist/user/src/user.service.js +84 -0
- package/dist/user/src/user.service.js.map +1 -0
- package/dist/user/src/user.service.spec.d.ts +2 -0
- package/dist/user/src/user.service.spec.d.ts.map +1 -0
- package/dist/user/src/user.service.spec.js +17 -0
- package/dist/user/src/user.service.spec.js.map +1 -0
- package/package.json +29 -0
- package/src/mail/src/mail.template.ejs +1 -0
- package/src/migrations/1726795702341-migrate.ts +107 -0
- package/src/migrations/1726795734665-migrate.ts +40 -0
- package/src/migrations/1726795818403-migrate.ts +161 -0
- package/src/migrations/1726795828359-migrate.ts +573 -0
package/dist/index.js
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
// Admin Module
|
18
|
+
__exportStar(require("./admin.module"), exports);
|
19
|
+
// Auth Module
|
20
|
+
__exportStar(require("./auth/src/auth.module"), exports);
|
21
|
+
__exportStar(require("./auth/src/auth.service"), exports);
|
22
|
+
__exportStar(require("./auth/src/decorators/public.decorator"), exports);
|
23
|
+
__exportStar(require("./auth/src/decorators/user.decorator"), exports);
|
24
|
+
__exportStar(require("./auth/src/guards/auth.guard"), exports);
|
25
|
+
// File Module
|
26
|
+
__exportStar(require("./file/src/file.module"), exports);
|
27
|
+
__exportStar(require("./file/src/file.service"), exports);
|
28
|
+
// Mail Module
|
29
|
+
__exportStar(require("./mail/src/enums/mail-configuration-type.enum"), exports);
|
30
|
+
__exportStar(require("./mail/src/interfaces"), exports);
|
31
|
+
__exportStar(require("./mail/src/mail.module"), exports);
|
32
|
+
__exportStar(require("./mail/src/mail.service"), exports);
|
33
|
+
// Menu Module
|
34
|
+
__exportStar(require("./menu/src/menu.module"), exports);
|
35
|
+
__exportStar(require("./menu/src/menu.service"), exports);
|
36
|
+
// Permission Module
|
37
|
+
__exportStar(require("./permission/src/permission.module"), exports);
|
38
|
+
__exportStar(require("./permission/src/permission.service"), exports);
|
39
|
+
__exportStar(require("./permission/src/types/permission.types"), exports);
|
40
|
+
__exportStar(require("./permission/src/decorators/permission.decorator"), exports);
|
41
|
+
// Screen Module
|
42
|
+
__exportStar(require("./screen/src/screen.module"), exports);
|
43
|
+
__exportStar(require("./screen/src/screen.service"), exports);
|
44
|
+
// Setting Module
|
45
|
+
__exportStar(require("./setting/src/settings.module"), exports);
|
46
|
+
__exportStar(require("./setting/src/settings.service"), exports);
|
47
|
+
// User Module
|
48
|
+
__exportStar(require("./user/src/constants/user.constants"), exports);
|
49
|
+
__exportStar(require("./user/src/user.module"), exports);
|
50
|
+
__exportStar(require("./user/src/user.service"), exports);
|
51
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,eAAe;AACf,iDAA+B;AAE/B,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AACxC,yEAAuD;AACvD,uEAAqD;AACrD,+DAA6C;AAE7C,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AAExC,cAAc;AACd,gFAA8D;AAC9D,wDAAsC;AACtC,yDAAuC;AACvC,0DAAwC;AAExC,cAAc;AACd,yDAAuC;AACvC,0DAAwC;AAExC,oBAAoB;AACpB,qEAAmD;AACnD,sEAAoD;AACpD,0EAAwD;AACxD,mFAAiE;AAEjE,gBAAgB;AAChB,6DAA2C;AAC3C,8DAA4C;AAE5C,iBAAiB;AACjB,gEAA8C;AAC9C,iEAA+C;AAE/C,cAAc;AACd,sEAAoD;AACpD,yDAAuC;AACvC,0DAAwC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail-configuration-type.enum.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/enums/mail-configuration-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,yBAAyB;IACnC,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.MailConfigurationTypeEnum = void 0;
|
4
|
+
var MailConfigurationTypeEnum;
|
5
|
+
(function (MailConfigurationTypeEnum) {
|
6
|
+
MailConfigurationTypeEnum["AWS"] = "AWS";
|
7
|
+
MailConfigurationTypeEnum["SMTP"] = "SMTP";
|
8
|
+
MailConfigurationTypeEnum["GMAIL"] = "GMAIL";
|
9
|
+
})(MailConfigurationTypeEnum || (exports.MailConfigurationTypeEnum = MailConfigurationTypeEnum = {}));
|
10
|
+
//# sourceMappingURL=mail-configuration-type.enum.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail-configuration-type.enum.js","sourceRoot":"","sources":["../../../../src/mail/src/enums/mail-configuration-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACnC,wCAAW,CAAA;IACX,0CAAa,CAAA;IACb,4CAAe,CAAA;AACjB,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,aAAa,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./mail-module-options.interface"), exports);
|
18
|
+
__exportStar(require("./mail-type"), exports);
|
19
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,8CAA4B"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { ModuleMetadata } from '@nestjs/common';
|
2
|
+
export type MailModuleOptions = {
|
3
|
+
global?: boolean;
|
4
|
+
type: 'AWS';
|
5
|
+
region: string;
|
6
|
+
accessKeyId: string;
|
7
|
+
secretAccessKey: string;
|
8
|
+
from: string;
|
9
|
+
} | {
|
10
|
+
global?: boolean;
|
11
|
+
type: 'SMTP';
|
12
|
+
host: string;
|
13
|
+
port: number;
|
14
|
+
secure?: boolean;
|
15
|
+
username: string;
|
16
|
+
password: string;
|
17
|
+
} | {
|
18
|
+
global?: boolean;
|
19
|
+
type: 'GMAIL';
|
20
|
+
clientId: string;
|
21
|
+
clientSecret: string;
|
22
|
+
refreshToken: string;
|
23
|
+
from: string;
|
24
|
+
};
|
25
|
+
export interface MailOptionsFactory {
|
26
|
+
createMailOptions(): Promise<MailModuleOptions> | MailModuleOptions;
|
27
|
+
}
|
28
|
+
export interface MailModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {
|
29
|
+
useFactory: (...args: any[]) => Promise<MailModuleOptions> | MailModuleOptions;
|
30
|
+
inject?: any[];
|
31
|
+
}
|
32
|
+
//# sourceMappingURL=mail-module-options.interface.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail-module-options.interface.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-module-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GACzB;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,GACD;IACE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEN,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,IAAI,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;CACrE;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC;IACvC,UAAU,EAAE,CACV,GAAG,IAAI,EAAE,GAAG,EAAE,KACX,OAAO,CAAC,iBAAiB,CAAC,GAAG,iBAAiB,CAAC;IACpD,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;CAChB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail-module-options.interface.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-module-options.interface.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export interface MailType {
|
2
|
+
from?: string;
|
3
|
+
to: string | string[];
|
4
|
+
cc?: string | string[];
|
5
|
+
bcc?: string | string[];
|
6
|
+
subject?: string;
|
7
|
+
body?: string;
|
8
|
+
replyTo?: string | string[];
|
9
|
+
priority?: string;
|
10
|
+
createdAt?: string;
|
11
|
+
updatedAt?: string;
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=mail-type.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail-type.d.ts","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail-type.js","sourceRoot":"","sources":["../../../../src/mail/src/interfaces/mail-type.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { MailType } from './interfaces/mail-type';
|
2
|
+
export type MailAttachment = {
|
3
|
+
filename?: string;
|
4
|
+
content?: Buffer;
|
5
|
+
contentType?: string;
|
6
|
+
};
|
7
|
+
export type Mail = {
|
8
|
+
attachments?: MailAttachment[];
|
9
|
+
} & MailType;
|
10
|
+
export type MailConfig = {
|
11
|
+
host?: string;
|
12
|
+
from?: string;
|
13
|
+
accessKeyId?: string;
|
14
|
+
secretAccessKey?: string;
|
15
|
+
};
|
16
|
+
export declare const MAIL_MODULE_OPTIONS = "MAIL_MODULE_OPTIONS";
|
17
|
+
//# sourceMappingURL=mail.consts.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.consts.d.ts","sourceRoot":"","sources":["../../../src/mail/src/mail.consts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC,GAAG,QAAQ,CAAC;AAEb,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,mBAAmB,wBAAwB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.consts.js","sourceRoot":"","sources":["../../../src/mail/src/mail.consts.ts"],"names":[],"mappings":";;;AAmBa,QAAA,mBAAmB,GAAG,qBAAqB,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
2
|
+
import { MailModuleAsyncOptions, MailModuleOptions } from './interfaces/mail-module-options.interface';
|
3
|
+
export declare class MailModule {
|
4
|
+
static forRoot(options: MailModuleOptions): DynamicModule;
|
5
|
+
static forRootAsync(options: MailModuleAsyncOptions): DynamicModule;
|
6
|
+
private static createAsyncOptionsProvider;
|
7
|
+
}
|
8
|
+
//# sourceMappingURL=mail.module.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.module.d.ts","sourceRoot":"","sources":["../../../src/mail/src/mail.module.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAA4B,MAAM,gBAAgB,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,iBAAiB,EAClB,MAAM,4CAA4C,CAAC;AAIpD,qBAEa,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,aAAa;IAezD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,sBAAsB,GAAG,aAAa;IASnE,OAAO,CAAC,MAAM,CAAC,0BAA0B;CAS1C"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
+
};
|
8
|
+
var MailModule_1;
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
+
exports.MailModule = void 0;
|
11
|
+
const axios_1 = require("@nestjs/axios");
|
12
|
+
const common_1 = require("@nestjs/common");
|
13
|
+
const mail_consts_1 = require("./mail.consts");
|
14
|
+
const mail_service_1 = require("./mail.service");
|
15
|
+
let MailModule = MailModule_1 = class MailModule {
|
16
|
+
static forRoot(options) {
|
17
|
+
return {
|
18
|
+
module: MailModule_1,
|
19
|
+
imports: [axios_1.HttpModule],
|
20
|
+
providers: [
|
21
|
+
mail_service_1.MailService,
|
22
|
+
{
|
23
|
+
provide: mail_consts_1.MAIL_MODULE_OPTIONS,
|
24
|
+
useValue: options,
|
25
|
+
},
|
26
|
+
],
|
27
|
+
exports: [mail_service_1.MailService],
|
28
|
+
};
|
29
|
+
}
|
30
|
+
static forRootAsync(options) {
|
31
|
+
return {
|
32
|
+
module: MailModule_1,
|
33
|
+
imports: [...(options.imports || []), axios_1.HttpModule],
|
34
|
+
providers: [mail_service_1.MailService, this.createAsyncOptionsProvider(options)],
|
35
|
+
exports: [mail_service_1.MailService],
|
36
|
+
};
|
37
|
+
}
|
38
|
+
static createAsyncOptionsProvider(options) {
|
39
|
+
return {
|
40
|
+
provide: mail_consts_1.MAIL_MODULE_OPTIONS,
|
41
|
+
useFactory: options.useFactory,
|
42
|
+
inject: options.inject || [],
|
43
|
+
};
|
44
|
+
}
|
45
|
+
};
|
46
|
+
exports.MailModule = MailModule;
|
47
|
+
exports.MailModule = MailModule = MailModule_1 = __decorate([
|
48
|
+
(0, common_1.Global)(),
|
49
|
+
(0, common_1.Module)({})
|
50
|
+
], MailModule);
|
51
|
+
//# sourceMappingURL=mail.module.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.module.js","sourceRoot":"","sources":["../../../src/mail/src/mail.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,yCAA2C;AAC3C,2CAAyE;AAKzE,+CAAoD;AACpD,iDAA6C;AAItC,IAAM,UAAU,kBAAhB,MAAM,UAAU;IACrB,MAAM,CAAC,OAAO,CAAC,OAA0B;QACvC,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE,CAAC,kBAAU,CAAC;YACrB,SAAS,EAAE;gBACT,0BAAW;gBACX;oBACE,OAAO,EAAE,iCAAmB;oBAC5B,QAAQ,EAAE,OAAO;iBAClB;aACF;YACD,OAAO,EAAE,CAAC,0BAAW,CAAC;SACvB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,OAA+B;QACjD,OAAO;YACL,MAAM,EAAE,YAAU;YAClB,OAAO,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,kBAAU,CAAC;YACjD,SAAS,EAAE,CAAC,0BAAW,EAAE,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;YAClE,OAAO,EAAE,CAAC,0BAAW,CAAC;SACvB,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,0BAA0B,CACvC,OAA+B;QAE/B,OAAO;YACL,OAAO,EAAE,iCAAmB;YAC5B,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;SAC7B,CAAC;IACJ,CAAC;CACF,CAAA;AAlCY,gCAAU;qBAAV,UAAU;IAFtB,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,UAAU,CAkCtB"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { HttpService } from '@nestjs/axios';
|
2
|
+
import { MailModuleOptions } from './interfaces/mail-module-options.interface';
|
3
|
+
import { Mail } from './mail.consts';
|
4
|
+
export declare class MailService {
|
5
|
+
private readonly mailConfig;
|
6
|
+
private readonly httpService;
|
7
|
+
constructor(mailConfig: MailModuleOptions, httpService: HttpService);
|
8
|
+
send(mail: Mail): Promise<any>;
|
9
|
+
createRawEmail(mail: Mail): Promise<string>;
|
10
|
+
sendWithSMTP(mail: Mail): Promise<any>;
|
11
|
+
sendWithGmail(mail: Mail): Promise<import("axios").AxiosResponse<any, any>>;
|
12
|
+
sendWithSES(mail: Mail): Promise<import("aws-sdk/lib/request").PromiseResult<import("aws-sdk/clients/ses").SendRawEmailResponse, import("aws-sdk").AWSError>>;
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=mail.service.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.service.d.ts","sourceRoot":"","sources":["../../../src/mail/src/mail.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAK5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAuB,MAAM,eAAe,CAAC;AAE1D,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAE3B,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAFX,UAAU,EAAE,iBAAiB,EAE7B,WAAW,EAAE,WAAW;IAGrC,IAAI,CAAC,IAAI,EAAE,IAAI;IAaf,cAAc,CAAC,IAAI,EAAE,IAAI;IAyEzB,YAAY,CAAC,IAAI,EAAE,IAAI;IAqCvB,aAAa,CAAC,IAAI,EAAE,IAAI;IA0CxB,WAAW,CAAC,IAAI,EAAE,IAAI;CAyH7B"}
|
@@ -0,0 +1,281 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
23
|
+
};
|
24
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
25
|
+
if (mod && mod.__esModule) return mod;
|
26
|
+
var result = {};
|
27
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
28
|
+
__setModuleDefault(result, mod);
|
29
|
+
return result;
|
30
|
+
};
|
31
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
32
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
33
|
+
};
|
34
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
35
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
36
|
+
};
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
38
|
+
exports.MailService = void 0;
|
39
|
+
const axios_1 = require("@nestjs/axios");
|
40
|
+
const common_1 = require("@nestjs/common");
|
41
|
+
const mimemessage = __importStar(require("mimemessage"));
|
42
|
+
const rxjs_1 = require("rxjs");
|
43
|
+
const mail_configuration_type_enum_1 = require("./enums/mail-configuration-type.enum");
|
44
|
+
const mail_consts_1 = require("./mail.consts");
|
45
|
+
let MailService = class MailService {
|
46
|
+
constructor(mailConfig, httpService) {
|
47
|
+
this.mailConfig = mailConfig;
|
48
|
+
this.httpService = httpService;
|
49
|
+
}
|
50
|
+
async send(mail) {
|
51
|
+
switch (this.mailConfig.type) {
|
52
|
+
case mail_configuration_type_enum_1.MailConfigurationTypeEnum.AWS:
|
53
|
+
return this.sendWithSES(mail);
|
54
|
+
case mail_configuration_type_enum_1.MailConfigurationTypeEnum.GMAIL:
|
55
|
+
return this.sendWithGmail(mail);
|
56
|
+
case mail_configuration_type_enum_1.MailConfigurationTypeEnum.SMTP:
|
57
|
+
return this.sendWithSMTP(mail);
|
58
|
+
}
|
59
|
+
}
|
60
|
+
async createRawEmail(mail) {
|
61
|
+
var _a, _b;
|
62
|
+
if (mail.attachments instanceof Array && ((_a = mail.attachments) === null || _a === void 0 ? void 0 : _a.length)) {
|
63
|
+
const mailContent = mimemessage.factory({
|
64
|
+
contentType: 'multipart/mixed',
|
65
|
+
body: [],
|
66
|
+
});
|
67
|
+
mailContent.header('From', mail.from);
|
68
|
+
mailContent.header('To', mail.to);
|
69
|
+
mailContent.header('Subject', mail.subject);
|
70
|
+
const alternateEntity = mimemessage.factory({
|
71
|
+
contentType: 'multipart/alternate',
|
72
|
+
body: [],
|
73
|
+
});
|
74
|
+
const htmlEntity = mimemessage.factory({
|
75
|
+
contentType: 'text/html;charset=utf-8',
|
76
|
+
body: mail.body,
|
77
|
+
});
|
78
|
+
alternateEntity.body.push(htmlEntity);
|
79
|
+
mailContent.body.push(alternateEntity);
|
80
|
+
await Promise.all(((_b = mail.attachments) !== null && _b !== void 0 ? _b : []).map(async (attachment) => {
|
81
|
+
const attachmentEntity = mimemessage.factory({
|
82
|
+
contentType: attachment.contentType,
|
83
|
+
contentTransferEncoding: 'base64',
|
84
|
+
body: attachment.content
|
85
|
+
.toString('base64')
|
86
|
+
.replace(/([^\0]{76})/g, '$1\n'),
|
87
|
+
});
|
88
|
+
attachmentEntity.header('Content-Disposition', `attachment; filename="${attachment.filename}"`);
|
89
|
+
mailContent.body.push(attachmentEntity);
|
90
|
+
}));
|
91
|
+
const messageString = mailContent.toString();
|
92
|
+
const encodedMessage = Buffer.from(messageString)
|
93
|
+
.toString('base64')
|
94
|
+
.replace(/\+/g, '-')
|
95
|
+
.replace(/\//g, '_')
|
96
|
+
.replace(/=+$/, '');
|
97
|
+
return encodedMessage;
|
98
|
+
}
|
99
|
+
else {
|
100
|
+
const messageParts = [
|
101
|
+
`From: ${mail.from}`,
|
102
|
+
`To: ${mail.to instanceof Array ? mail.to.join(',') : mail.to}`,
|
103
|
+
`Subject: ${mail.subject}`,
|
104
|
+
'Content-Type: text/plain; charset="UTF-8"',
|
105
|
+
'',
|
106
|
+
mail.body,
|
107
|
+
];
|
108
|
+
const message = messageParts.join('\n');
|
109
|
+
const encodedMessage = Buffer.from(message)
|
110
|
+
.toString('base64')
|
111
|
+
.replace(/\+/g, '-')
|
112
|
+
.replace(/\//g, '_')
|
113
|
+
.replace(/=+$/, '');
|
114
|
+
return encodedMessage;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
async sendWithSMTP(mail) {
|
118
|
+
if (this.mailConfig.type !== 'SMTP') {
|
119
|
+
throw new Error('Invalid mail configuration type');
|
120
|
+
}
|
121
|
+
const { password: pass, username: user, host, port, secure = false, } = this.mailConfig;
|
122
|
+
const nodemailer = await Promise.resolve().then(() => __importStar(require('nodemailer')));
|
123
|
+
const transporter = nodemailer.createTransport({
|
124
|
+
host,
|
125
|
+
port,
|
126
|
+
secure,
|
127
|
+
auth: {
|
128
|
+
user,
|
129
|
+
pass,
|
130
|
+
},
|
131
|
+
});
|
132
|
+
return transporter.sendMail({
|
133
|
+
from: mail.from || process.env.SMTP_FROM || process.env.SMTP_USER,
|
134
|
+
to: mail.to,
|
135
|
+
subject: mail.subject,
|
136
|
+
html: mail.body,
|
137
|
+
cc: mail.cc,
|
138
|
+
bcc: mail.bcc,
|
139
|
+
replyTo: mail.replyTo,
|
140
|
+
priority: mail.priority,
|
141
|
+
});
|
142
|
+
}
|
143
|
+
async sendWithGmail(mail) {
|
144
|
+
if (this.mailConfig.type !== 'GMAIL') {
|
145
|
+
throw new Error('Invalid mail configuration type');
|
146
|
+
}
|
147
|
+
const { clientId, clientSecret, from, refreshToken } = this.mailConfig;
|
148
|
+
const redirectURI = 'https://developers.google.com/oauthplayground';
|
149
|
+
const { google } = await Promise.resolve().then(() => __importStar(require('googleapis')));
|
150
|
+
const oauth2Client = new google.auth.OAuth2(clientId, clientSecret, redirectURI);
|
151
|
+
oauth2Client.setCredentials({
|
152
|
+
refresh_token: refreshToken,
|
153
|
+
});
|
154
|
+
const { token } = await oauth2Client.getAccessToken();
|
155
|
+
const raw = await this.createRawEmail(Object.assign(Object.assign({}, mail), { from }));
|
156
|
+
const url = 'https://www.googleapis.com/gmail/v1/users/me/messages/send';
|
157
|
+
const requestBody = {
|
158
|
+
raw,
|
159
|
+
};
|
160
|
+
const headers = {
|
161
|
+
Authorization: `Bearer ${token}`,
|
162
|
+
'Content-Type': 'application/json',
|
163
|
+
};
|
164
|
+
const response = this.httpService.post(url, requestBody, { headers });
|
165
|
+
return (0, rxjs_1.firstValueFrom)(response);
|
166
|
+
}
|
167
|
+
async sendWithSES(mail) {
|
168
|
+
var _a;
|
169
|
+
if (this.mailConfig.type !== 'AWS') {
|
170
|
+
throw new Error('Invalid mail configuration type');
|
171
|
+
}
|
172
|
+
const { region, from, accessKeyId, secretAccessKey } = this.mailConfig;
|
173
|
+
const { SES } = await Promise.resolve().then(() => __importStar(require('aws-sdk')));
|
174
|
+
const ses = new SES({
|
175
|
+
apiVersion: '2010-12-01',
|
176
|
+
region,
|
177
|
+
credentials: {
|
178
|
+
accessKeyId,
|
179
|
+
secretAccessKey,
|
180
|
+
},
|
181
|
+
});
|
182
|
+
ses.config.update({
|
183
|
+
credentials: {
|
184
|
+
accessKeyId,
|
185
|
+
secretAccessKey,
|
186
|
+
},
|
187
|
+
});
|
188
|
+
if (typeof mail.to === 'string') {
|
189
|
+
mail.to = mail.to.split(';');
|
190
|
+
}
|
191
|
+
if (typeof mail.bcc === 'string') {
|
192
|
+
mail.bcc = mail.bcc.split(';');
|
193
|
+
}
|
194
|
+
else if (!mail.bcc) {
|
195
|
+
mail.bcc = [];
|
196
|
+
}
|
197
|
+
if (typeof mail.cc === 'string') {
|
198
|
+
mail.cc = mail.cc.split(';');
|
199
|
+
}
|
200
|
+
else if (!mail.cc) {
|
201
|
+
mail.cc = [];
|
202
|
+
}
|
203
|
+
if (typeof mail.replyTo === 'string') {
|
204
|
+
mail.replyTo = mail.replyTo.split(';');
|
205
|
+
}
|
206
|
+
else if (!mail.replyTo) {
|
207
|
+
mail.replyTo = [];
|
208
|
+
}
|
209
|
+
if (mail.attachments instanceof Array && mail.attachments.length > 0) {
|
210
|
+
const mailContent = mimemessage.factory({
|
211
|
+
contentType: 'multipart/mixed',
|
212
|
+
body: [],
|
213
|
+
});
|
214
|
+
mailContent.header('From', from);
|
215
|
+
mailContent.header('To', mail.to);
|
216
|
+
mailContent.header('Subject', mail.subject);
|
217
|
+
const alternateEntity = mimemessage.factory({
|
218
|
+
contentType: 'multipart/alternate',
|
219
|
+
body: [],
|
220
|
+
});
|
221
|
+
const htmlEntity = mimemessage.factory({
|
222
|
+
contentType: 'text/html;charset=utf-8',
|
223
|
+
body: mail.body,
|
224
|
+
});
|
225
|
+
alternateEntity.body.push(htmlEntity);
|
226
|
+
mailContent.body.push(alternateEntity);
|
227
|
+
await Promise.all(((_a = mail.attachments) !== null && _a !== void 0 ? _a : []).map((item) => {
|
228
|
+
const attachmentEntity = mimemessage.factory({
|
229
|
+
contentType: item.contentType,
|
230
|
+
contentTransferEncoding: 'base64',
|
231
|
+
body: item.content
|
232
|
+
.toString('base64')
|
233
|
+
.replace(/([^\0]{76})/g, '$1\n'),
|
234
|
+
});
|
235
|
+
attachmentEntity.header('Content-Disposition', `attachment ;filename="${item.filename}"`);
|
236
|
+
mailContent.body.push(attachmentEntity);
|
237
|
+
}));
|
238
|
+
return ses
|
239
|
+
.sendRawEmail({
|
240
|
+
RawMessage: { Data: mailContent.toString() },
|
241
|
+
})
|
242
|
+
.promise();
|
243
|
+
}
|
244
|
+
else {
|
245
|
+
const params = {
|
246
|
+
Destination: {
|
247
|
+
ToAddresses: mail.to,
|
248
|
+
BccAddresses: mail.bcc,
|
249
|
+
CcAddresses: mail.cc,
|
250
|
+
},
|
251
|
+
Message: {
|
252
|
+
Body: {
|
253
|
+
Html: {
|
254
|
+
Data: mail.body,
|
255
|
+
Charset: 'utf-8',
|
256
|
+
},
|
257
|
+
Text: {
|
258
|
+
Data: mail.body,
|
259
|
+
Charset: 'utf-8',
|
260
|
+
},
|
261
|
+
},
|
262
|
+
Subject: {
|
263
|
+
Data: mail.subject,
|
264
|
+
Charset: 'utf-8',
|
265
|
+
},
|
266
|
+
},
|
267
|
+
ReplyToAddresses: mail.replyTo,
|
268
|
+
Source: from,
|
269
|
+
};
|
270
|
+
return ses.sendEmail(params).promise();
|
271
|
+
}
|
272
|
+
}
|
273
|
+
};
|
274
|
+
exports.MailService = MailService;
|
275
|
+
exports.MailService = MailService = __decorate([
|
276
|
+
(0, common_1.Injectable)(),
|
277
|
+
__param(0, (0, common_1.Inject)(mail_consts_1.MAIL_MODULE_OPTIONS)),
|
278
|
+
__param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => axios_1.HttpService))),
|
279
|
+
__metadata("design:paramtypes", [Object, axios_1.HttpService])
|
280
|
+
], MailService);
|
281
|
+
//# sourceMappingURL=mail.service.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.service.js","sourceRoot":"","sources":["../../../src/mail/src/mail.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA4C;AAC5C,2CAAgE;AAChE,yDAA2C;AAC3C,+BAAsC;AACtC,uFAAiF;AAEjF,+CAA0D;AAGnD,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YAEmB,UAA6B,EAE7B,WAAwB;QAFxB,eAAU,GAAV,UAAU,CAAmB;QAE7B,gBAAW,GAAX,WAAW,CAAa;IACxC,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,IAAU;QACnB,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;YAC7B,KAAK,wDAAyB,CAAC,GAAG;gBAChC,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAEhC,KAAK,wDAAyB,CAAC,KAAK;gBAClC,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;YAElC,KAAK,wDAAyB,CAAC,IAAI;gBACjC,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACnC,CA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CAAC,QAAQ,EAAE,EAAE;aAC7C,CAAC;iBACD,OAAO,EAAE,CAAC;QACf,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG;gBACb,WAAW,EAAE;oBACX,WAAW,EAAE,IAAI,CAAC,EAAE;oBACpB,YAAY,EAAE,IAAI,CAAC,GAAG;oBACtB,WAAW,EAAE,IAAI,CAAC,EAAE;iBACrB;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE;wBACJ,IAAI,EAAE;4BACJ,IAAI,EAAE,IAAI,CAAC,IAAI;4BACf,OAAO,EAAE,OAAO;yBACjB;wBACD,IAAI,EAAE;4BACJ,IAAI,EAAE,IAAI,CAAC,IAAI;4BACf,OAAO,EAAE,OAAO;yBACjB;qBACF;oBACD,OAAO,EAAE;wBACP,IAAI,EAAE,IAAI,CAAC,OAAO;wBAClB,OAAO,EAAE,OAAO;qBACjB;iBACF;gBACD,gBAAgB,EAAE,IAAI,CAAC,OAAO;gBAC9B,MAAM,EAAE,IAAI;aACb,CAAC;YAEF,OAAO,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;QACzC,CAAC;IACH,CAAC;CACF,CAAA;AAtSY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,iCAAmB,CAAC,CAAA;IAE3B,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,mBAAW,CAAC,CAAC,CAAA;6CACR,mBAAW;GALhC,WAAW,CAsSvB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.service.spec.d.ts","sourceRoot":"","sources":["../../../src/mail/src/mail.service.spec.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const testing_1 = require("@nestjs/testing");
|
4
|
+
const mail_service_1 = require("./mail.service");
|
5
|
+
describe('MailService', () => {
|
6
|
+
let service;
|
7
|
+
beforeEach(async () => {
|
8
|
+
const module = await testing_1.Test.createTestingModule({
|
9
|
+
providers: [mail_service_1.MailService],
|
10
|
+
}).compile();
|
11
|
+
service = module.get(mail_service_1.MailService);
|
12
|
+
});
|
13
|
+
it('should be defined', () => {
|
14
|
+
expect(service).toBeDefined();
|
15
|
+
});
|
16
|
+
});
|
17
|
+
//# sourceMappingURL=mail.service.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mail.service.spec.js","sourceRoot":"","sources":["../../../src/mail/src/mail.service.spec.ts"],"names":[],"mappings":";;AAAA,6CAAsD;AACtD,iDAA6C;AAE7C,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,IAAI,OAAoB,CAAC;IAEzB,UAAU,CAAC,KAAK,IAAI,EAAE;QACpB,MAAM,MAAM,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;YAC3D,SAAS,EAAE,CAAC,0BAAW,CAAC;SACzB,CAAC,CAAC,OAAO,EAAE,CAAC;QAEb,OAAO,GAAG,MAAM,CAAC,GAAG,CAAc,0BAAW,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE,GAAG,EAAE;QAC3B,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|