hazo_notify 1.0.2 → 1.1.0
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/README.md +1 -5
- package/data/templates/email_signature.html +11 -0
- package/data/templates/email_signature.txt +4 -0
- package/data/templates/email_verification.html +64 -0
- package/data/templates/email_verification.txt +11 -0
- package/data/templates/forgot_password.html +64 -0
- package/data/templates/forgot_password.txt +11 -0
- package/data/templates/manifest.json +86 -0
- package/data/templates/welcome_email.html +54 -0
- package/data/templates/welcome_email.txt +8 -0
- package/dist/emailer/emailer.d.ts +1 -1
- package/dist/emailer/emailer.d.ts.map +1 -1
- package/dist/emailer/emailer.js +19 -9
- package/dist/emailer/emailer.js.map +1 -1
- package/dist/emailer/index.d.ts +1 -0
- package/dist/emailer/index.d.ts.map +1 -1
- package/dist/emailer/index.js +5 -1
- package/dist/emailer/index.js.map +1 -1
- package/dist/emailer/providers/pop3_provider.d.ts +3 -2
- package/dist/emailer/providers/pop3_provider.d.ts.map +1 -1
- package/dist/emailer/providers/pop3_provider.js +2 -1
- package/dist/emailer/providers/pop3_provider.js.map +1 -1
- package/dist/emailer/providers/smtp_provider.d.ts +3 -2
- package/dist/emailer/providers/smtp_provider.d.ts.map +1 -1
- package/dist/emailer/providers/smtp_provider.js +2 -1
- package/dist/emailer/providers/smtp_provider.js.map +1 -1
- package/dist/emailer/providers/zeptomail_provider.d.ts +3 -2
- package/dist/emailer/providers/zeptomail_provider.d.ts.map +1 -1
- package/dist/emailer/providers/zeptomail_provider.js +24 -11
- package/dist/emailer/providers/zeptomail_provider.js.map +1 -1
- package/dist/emailer/types.d.ts +13 -1
- package/dist/emailer/types.d.ts.map +1 -1
- package/dist/emailer/utils/logger.d.ts +22 -14
- package/dist/emailer/utils/logger.d.ts.map +1 -1
- package/dist/emailer/utils/logger.js +51 -13
- package/dist/emailer/utils/logger.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/template_manager/config/config_loader.d.ts +48 -0
- package/dist/template_manager/config/config_loader.d.ts.map +1 -0
- package/dist/template_manager/config/config_loader.js +161 -0
- package/dist/template_manager/config/config_loader.js.map +1 -0
- package/dist/template_manager/config/constants.d.ts +101 -0
- package/dist/template_manager/config/constants.d.ts.map +1 -0
- package/dist/template_manager/config/constants.js +163 -0
- package/dist/template_manager/config/constants.js.map +1 -0
- package/dist/template_manager/config/index.d.ts +6 -0
- package/dist/template_manager/config/index.d.ts.map +1 -0
- package/dist/{lib/emailer/utils → template_manager/config}/index.js +4 -4
- package/dist/template_manager/config/index.js.map +1 -0
- package/dist/template_manager/db/category_repository.d.ts +57 -0
- package/dist/template_manager/db/category_repository.d.ts.map +1 -0
- package/dist/template_manager/db/category_repository.js +326 -0
- package/dist/template_manager/db/category_repository.js.map +1 -0
- package/dist/template_manager/db/index.d.ts +6 -0
- package/dist/template_manager/db/index.d.ts.map +1 -0
- package/dist/template_manager/db/index.js +23 -0
- package/dist/template_manager/db/index.js.map +1 -0
- package/dist/template_manager/db/template_repository.d.ts +76 -0
- package/dist/template_manager/db/template_repository.d.ts.map +1 -0
- package/dist/template_manager/db/template_repository.js +684 -0
- package/dist/template_manager/db/template_repository.js.map +1 -0
- package/dist/template_manager/engine/handlebars_engine.d.ts +52 -0
- package/dist/template_manager/engine/handlebars_engine.d.ts.map +1 -0
- package/dist/template_manager/engine/handlebars_engine.js +175 -0
- package/dist/template_manager/engine/handlebars_engine.js.map +1 -0
- package/dist/template_manager/engine/index.d.ts +6 -0
- package/dist/template_manager/engine/index.d.ts.map +1 -0
- package/dist/template_manager/engine/index.js +19 -0
- package/dist/template_manager/engine/index.js.map +1 -0
- package/dist/template_manager/engine/variable_resolver.d.ts +48 -0
- package/dist/template_manager/engine/variable_resolver.d.ts.map +1 -0
- package/dist/template_manager/engine/variable_resolver.js +223 -0
- package/dist/template_manager/engine/variable_resolver.js.map +1 -0
- package/dist/template_manager/index.d.ts +32 -0
- package/dist/template_manager/index.d.ts.map +1 -0
- package/dist/template_manager/index.js +88 -0
- package/dist/template_manager/index.js.map +1 -0
- package/dist/template_manager/template_manager.d.ts +69 -0
- package/dist/template_manager/template_manager.d.ts.map +1 -0
- package/dist/template_manager/template_manager.js +335 -0
- package/dist/template_manager/template_manager.js.map +1 -0
- package/dist/template_manager/types.d.ts +255 -0
- package/dist/template_manager/types.d.ts.map +1 -0
- package/dist/template_manager/types.js +12 -0
- package/dist/template_manager/types.js.map +1 -0
- package/dist/template_manager/utils/index.d.ts +6 -0
- package/dist/template_manager/utils/index.d.ts.map +1 -0
- package/dist/template_manager/utils/index.js +21 -0
- package/dist/template_manager/utils/index.js.map +1 -0
- package/dist/template_manager/utils/system_variables.d.ts +28 -0
- package/dist/template_manager/utils/system_variables.d.ts.map +1 -0
- package/dist/template_manager/utils/system_variables.js +209 -0
- package/dist/template_manager/utils/system_variables.js.map +1 -0
- package/dist/template_manager/utils/validation.d.ts +74 -0
- package/dist/template_manager/utils/validation.d.ts.map +1 -0
- package/dist/template_manager/utils/validation.js +163 -0
- package/dist/template_manager/utils/validation.js.map +1 -0
- package/hazo_notify_config.ini +39 -0
- package/package.json +69 -21
- package/dist/lib/emailer/emailer.d.ts +0 -19
- package/dist/lib/emailer/emailer.d.ts.map +0 -1
- package/dist/lib/emailer/emailer.js +0 -220
- package/dist/lib/emailer/emailer.js.map +0 -1
- package/dist/lib/emailer/index.d.ts +0 -11
- package/dist/lib/emailer/index.d.ts.map +0 -1
- package/dist/lib/emailer/index.js +0 -34
- package/dist/lib/emailer/index.js.map +0 -1
- package/dist/lib/emailer/providers/index.d.ts +0 -15
- package/dist/lib/emailer/providers/index.d.ts.map +0 -1
- package/dist/lib/emailer/providers/index.js +0 -36
- package/dist/lib/emailer/providers/index.js.map +0 -1
- package/dist/lib/emailer/providers/pop3_provider.d.ts +0 -15
- package/dist/lib/emailer/providers/pop3_provider.d.ts.map +0 -1
- package/dist/lib/emailer/providers/pop3_provider.js +0 -29
- package/dist/lib/emailer/providers/pop3_provider.js.map +0 -1
- package/dist/lib/emailer/providers/smtp_provider.d.ts +0 -15
- package/dist/lib/emailer/providers/smtp_provider.d.ts.map +0 -1
- package/dist/lib/emailer/providers/smtp_provider.js +0 -29
- package/dist/lib/emailer/providers/smtp_provider.js.map +0 -1
- package/dist/lib/emailer/providers/zeptomail_provider.d.ts +0 -15
- package/dist/lib/emailer/providers/zeptomail_provider.d.ts.map +0 -1
- package/dist/lib/emailer/providers/zeptomail_provider.js +0 -250
- package/dist/lib/emailer/providers/zeptomail_provider.js.map +0 -1
- package/dist/lib/emailer/types.d.ts +0 -94
- package/dist/lib/emailer/types.d.ts.map +0 -1
- package/dist/lib/emailer/types.js +0 -6
- package/dist/lib/emailer/types.js.map +0 -1
- package/dist/lib/emailer/utils/constants.d.ts +0 -14
- package/dist/lib/emailer/utils/constants.d.ts.map +0 -1
- package/dist/lib/emailer/utils/constants.js +0 -22
- package/dist/lib/emailer/utils/constants.js.map +0 -1
- package/dist/lib/emailer/utils/index.d.ts +0 -8
- package/dist/lib/emailer/utils/index.d.ts.map +0 -1
- package/dist/lib/emailer/utils/index.js.map +0 -1
- package/dist/lib/emailer/utils/logger.d.ts +0 -37
- package/dist/lib/emailer/utils/logger.d.ts.map +0 -1
- package/dist/lib/emailer/utils/logger.js +0 -60
- package/dist/lib/emailer/utils/logger.js.map +0 -1
- package/dist/lib/emailer/utils/validation.d.ts +0 -37
- package/dist/lib/emailer/utils/validation.d.ts.map +0 -1
- package/dist/lib/emailer/utils/validation.js +0 -81
- package/dist/lib/emailer/utils/validation.js.map +0 -1
- package/dist/lib/index.d.ts +0 -6
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/index.js +0 -22
- package/dist/lib/index.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -3
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -9
- package/dist/lib/utils.js.map +0 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Validation utilities for template manager
|
|
4
|
+
*
|
|
5
|
+
* Validates template names, category names, variables, and content
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.validate_template_name = validate_template_name;
|
|
9
|
+
exports.validate_category_name = validate_category_name;
|
|
10
|
+
exports.validate_variable_name = validate_variable_name;
|
|
11
|
+
exports.validate_template_html_size = validate_template_html_size;
|
|
12
|
+
exports.validate_template_text_size = validate_template_text_size;
|
|
13
|
+
exports.extract_variables_from_content = extract_variables_from_content;
|
|
14
|
+
exports.validate_provided_variables = validate_provided_variables;
|
|
15
|
+
exports.validate_uuid = validate_uuid;
|
|
16
|
+
exports.sanitize_template_name = sanitize_template_name;
|
|
17
|
+
const constants_1 = require("../config/constants");
|
|
18
|
+
/**
|
|
19
|
+
* Validate a template name
|
|
20
|
+
*
|
|
21
|
+
* @param name - Template name to validate
|
|
22
|
+
* @returns true if valid, false otherwise
|
|
23
|
+
*/
|
|
24
|
+
function validate_template_name(name) {
|
|
25
|
+
if (typeof name !== 'string') {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
const trimmed = name.trim();
|
|
29
|
+
if (trimmed.length === 0) {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
if (trimmed.length > constants_1.MAX_TEMPLATE_NAME_LENGTH) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
// Template names should be alphanumeric with underscores
|
|
36
|
+
return constants_1.VALID_VARIABLE_NAME_PATTERN.test(trimmed);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Validate a category name
|
|
40
|
+
*
|
|
41
|
+
* @param name - Category name to validate
|
|
42
|
+
* @returns true if valid, false otherwise
|
|
43
|
+
*/
|
|
44
|
+
function validate_category_name(name) {
|
|
45
|
+
if (typeof name !== 'string') {
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
const trimmed = name.trim();
|
|
49
|
+
if (trimmed.length === 0) {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
if (trimmed.length > constants_1.MAX_CATEGORY_NAME_LENGTH) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Validate a variable name
|
|
59
|
+
*
|
|
60
|
+
* @param name - Variable name to validate
|
|
61
|
+
* @returns true if valid, false otherwise
|
|
62
|
+
*/
|
|
63
|
+
function validate_variable_name(name) {
|
|
64
|
+
if (typeof name !== 'string') {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
return constants_1.VALID_VARIABLE_NAME_PATTERN.test(name);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Validate template HTML content size
|
|
71
|
+
*
|
|
72
|
+
* @param html - HTML content to validate
|
|
73
|
+
* @returns true if valid, false otherwise
|
|
74
|
+
*/
|
|
75
|
+
function validate_template_html_size(html) {
|
|
76
|
+
if (typeof html !== 'string') {
|
|
77
|
+
return false;
|
|
78
|
+
}
|
|
79
|
+
const byte_size = Buffer.byteLength(html, 'utf8');
|
|
80
|
+
return byte_size <= constants_1.MAX_TEMPLATE_HTML_SIZE;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Validate template text content size
|
|
84
|
+
*
|
|
85
|
+
* @param text - Text content to validate
|
|
86
|
+
* @returns true if valid, false otherwise
|
|
87
|
+
*/
|
|
88
|
+
function validate_template_text_size(text) {
|
|
89
|
+
if (typeof text !== 'string') {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
const byte_size = Buffer.byteLength(text, 'utf8');
|
|
93
|
+
return byte_size <= constants_1.MAX_TEMPLATE_TEXT_SIZE;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Extract variable names from template content
|
|
97
|
+
*
|
|
98
|
+
* @param content - Template content (HTML or text)
|
|
99
|
+
* @returns Array of variable names found in the content
|
|
100
|
+
*/
|
|
101
|
+
function extract_variables_from_content(content) {
|
|
102
|
+
if (typeof content !== 'string') {
|
|
103
|
+
return [];
|
|
104
|
+
}
|
|
105
|
+
const matches = content.matchAll(constants_1.VARIABLE_PATTERN);
|
|
106
|
+
const variables = new Set();
|
|
107
|
+
for (const match of matches) {
|
|
108
|
+
if (match[1]) {
|
|
109
|
+
variables.add(match[1]);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return Array.from(variables);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Validate that all required variables are provided
|
|
116
|
+
*
|
|
117
|
+
* @param template_content - Template content to check
|
|
118
|
+
* @param provided_variables - Variables provided by user
|
|
119
|
+
* @param system_variable_names - Names of system variables
|
|
120
|
+
* @returns Object with validation result and missing variables
|
|
121
|
+
*/
|
|
122
|
+
function validate_provided_variables(template_content, provided_variables, system_variable_names) {
|
|
123
|
+
const required = extract_variables_from_content(template_content);
|
|
124
|
+
const provided_keys = Object.keys(provided_variables);
|
|
125
|
+
const all_available = [...provided_keys, ...system_variable_names];
|
|
126
|
+
const missing = required.filter((v) => !all_available.includes(v));
|
|
127
|
+
return {
|
|
128
|
+
valid: missing.length === 0,
|
|
129
|
+
missing,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Validate UUID format
|
|
134
|
+
*
|
|
135
|
+
* @param uuid - String to validate as UUID
|
|
136
|
+
* @returns true if valid UUID format, false otherwise
|
|
137
|
+
*/
|
|
138
|
+
function validate_uuid(uuid) {
|
|
139
|
+
if (typeof uuid !== 'string') {
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
const uuid_pattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
143
|
+
return uuid_pattern.test(uuid);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Sanitize template name for safe use
|
|
147
|
+
*
|
|
148
|
+
* @param name - Template name to sanitize
|
|
149
|
+
* @returns Sanitized template name
|
|
150
|
+
*/
|
|
151
|
+
function sanitize_template_name(name) {
|
|
152
|
+
if (typeof name !== 'string') {
|
|
153
|
+
return '';
|
|
154
|
+
}
|
|
155
|
+
return name
|
|
156
|
+
.trim()
|
|
157
|
+
.toLowerCase()
|
|
158
|
+
.replace(/[^a-z0-9_]/g, '_')
|
|
159
|
+
.replace(/_+/g, '_')
|
|
160
|
+
.replace(/^_|_$/g, '')
|
|
161
|
+
.substring(0, constants_1.MAX_TEMPLATE_NAME_LENGTH);
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/lib/template_manager/utils/validation.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAiBH,wDAiBC;AAQD,wDAgBC;AAQD,wDAMC;AAQD,kEAOC;AAQD,kEAOC;AAQD,wEAeC;AAUD,kEAeC;AAQD,sCAQC;AAQD,wDAYC;AAxLD,mDAO6B;AAE7B;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,IAAY;IACjD,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAE5B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,oCAAwB,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yDAAyD;IACzD,OAAO,uCAA2B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,IAAY;IACjD,IAAI,OAAO,IAAI,KAAK,QA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AAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,SAAS,CAAC,CAAC,EAAE,oCAAwB,CAAC,CAAC;AAC5C,CAAC"}
|
package/hazo_notify_config.ini
CHANGED
|
@@ -151,3 +151,42 @@ from_name=Hazo Notify
|
|
|
151
151
|
# Description: Enable the entire UI component and all routes for testing services
|
|
152
152
|
# Set to true to enable the UI, false to disable it
|
|
153
153
|
enable_ui=true
|
|
154
|
+
|
|
155
|
+
[template_manager]
|
|
156
|
+
# Template Manager Configuration
|
|
157
|
+
# ==============================
|
|
158
|
+
# Configure email template variable types and their associated variables.
|
|
159
|
+
# This defines what variables are available for each template type.
|
|
160
|
+
|
|
161
|
+
# Email Template Variable Types
|
|
162
|
+
# Required: No (defaults will be used if not specified)
|
|
163
|
+
# Description: JSON array defining template types and their variables
|
|
164
|
+
# Format: [{"template_name": "...", "template_label": "...", "variables": [...]}]
|
|
165
|
+
#
|
|
166
|
+
# Each template type has:
|
|
167
|
+
# - template_name: Internal name (lowercase, underscores, e.g., "welcome_email")
|
|
168
|
+
# - template_label: Display label for UI (e.g., "Welcome Email")
|
|
169
|
+
# - variables: Array of variable definitions
|
|
170
|
+
#
|
|
171
|
+
# Each variable has:
|
|
172
|
+
# - variable_name: Internal name (lowercase, underscores)
|
|
173
|
+
# - variable_description: Description for UI/documentation
|
|
174
|
+
#
|
|
175
|
+
# Default template types: welcome_email, email_verification, forgot_password, email_signature
|
|
176
|
+
#
|
|
177
|
+
# Example configuration (uses defaults if not specified):
|
|
178
|
+
# email_template_variable_types=[{"template_name":"welcome_email","template_label":"Welcome Email","variables":[{"variable_name":"user_name","variable_description":"Recipient's full name"},{"variable_name":"login_url","variable_description":"URL to login page"}]},{"template_name":"email_verification","template_label":"Email Verification","variables":[{"variable_name":"user_name","variable_description":"Recipient's name"},{"variable_name":"verification_link","variable_description":"Email verification URL"},{"variable_name":"expiry_hours","variable_description":"Hours until link expires"}]},{"template_name":"forgot_password","template_label":"Forgot Password","variables":[{"variable_name":"user_name","variable_description":"Recipient's name"},{"variable_name":"reset_link","variable_description":"Password reset URL"},{"variable_name":"expiry_minutes","variable_description":"Minutes until link expires"}]},{"template_name":"email_signature","template_label":"Email Signature","variables":[{"variable_name":"sender_name","variable_description":"Sender's name"},{"variable_name":"sender_title","variable_description":"Sender's job title"},{"variable_name":"company_name","variable_description":"Company name"}]}]
|
|
179
|
+
|
|
180
|
+
# System Variables (auto-generated, read-only)
|
|
181
|
+
# These are automatically available in all templates:
|
|
182
|
+
# - date_yyyy_mm_dd: Date in YYYY-MM-DD format (e.g., 2024-01-15)
|
|
183
|
+
# - date_mmm_dd: Date in MMM DD format (e.g., Jan 15)
|
|
184
|
+
# - date_mmmm_dd_yyyy: Date in full format (e.g., January 15, 2024)
|
|
185
|
+
# - date_dd_mm_yyyy: Date in DD/MM/YYYY format (e.g., 15/01/2024)
|
|
186
|
+
# - date_dd_mmm_yyyy: Date in DD MMM YYYY format (e.g., 15 Jan 2024)
|
|
187
|
+
# - time_hh_mm: Time in HH:MM format (24-hour)
|
|
188
|
+
# - time_hh_mm_ss: Time in HH:MM:SS format (24-hour)
|
|
189
|
+
# - datetime_full: Full datetime (e.g., January 15, 2024 at 2:30 PM)
|
|
190
|
+
# - year: Current year (e.g., 2024)
|
|
191
|
+
# - month_name: Current month name (e.g., January)
|
|
192
|
+
# - day_of_week: Current day of week (e.g., Monday)
|
package/package.json
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hazo_notify",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Email that acts as a notification center as well for schedules too",
|
|
5
|
-
"main": "./dist/
|
|
6
|
-
"types": "./dist/
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"types": "./dist/
|
|
10
|
-
"default": "./dist/
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
11
|
},
|
|
12
12
|
"./emailer": {
|
|
13
|
-
"types": "./dist/
|
|
14
|
-
"default": "./dist/
|
|
13
|
+
"types": "./dist/emailer/index.d.ts",
|
|
14
|
+
"default": "./dist/emailer/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./template_manager": {
|
|
17
|
+
"types": "./dist/template_manager/index.d.ts",
|
|
18
|
+
"default": "./dist/template_manager/index.js"
|
|
15
19
|
}
|
|
16
20
|
},
|
|
17
21
|
"scripts": {
|
|
@@ -24,10 +28,14 @@
|
|
|
24
28
|
"test": "jest",
|
|
25
29
|
"test:watch": "jest --watch",
|
|
26
30
|
"test:coverage": "jest --coverage",
|
|
31
|
+
"test:e2e": "playwright test",
|
|
32
|
+
"test:e2e:ui": "playwright test --ui",
|
|
33
|
+
"test:e2e:headed": "playwright test --headed",
|
|
27
34
|
"prepublishOnly": "npm run build:lib"
|
|
28
35
|
},
|
|
29
36
|
"files": [
|
|
30
37
|
"dist",
|
|
38
|
+
"data",
|
|
31
39
|
"hazo_notify_config.ini",
|
|
32
40
|
"README.md"
|
|
33
41
|
],
|
|
@@ -40,7 +48,10 @@
|
|
|
40
48
|
"notify",
|
|
41
49
|
"zeptomail",
|
|
42
50
|
"email",
|
|
43
|
-
"notification"
|
|
51
|
+
"notification",
|
|
52
|
+
"template",
|
|
53
|
+
"email-template",
|
|
54
|
+
"handlebars"
|
|
44
55
|
],
|
|
45
56
|
"author": "Pubs Abayasiri",
|
|
46
57
|
"license": "MIT",
|
|
@@ -49,37 +60,74 @@
|
|
|
49
60
|
},
|
|
50
61
|
"homepage": "https://github.com/pub12/hazo_notify#readme",
|
|
51
62
|
"dependencies": {
|
|
63
|
+
"handlebars": "^4.7.8",
|
|
64
|
+
"hazo_config": "^1.3.0",
|
|
65
|
+
"isomorphic-dompurify": "^2.9.0"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"hazo_logs": "^1.0.0"
|
|
69
|
+
},
|
|
70
|
+
"peerDependenciesMeta": {
|
|
71
|
+
"hazo_logs": {
|
|
72
|
+
"optional": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@lexical/code": "^0.39.0",
|
|
77
|
+
"@lexical/file": "^0.39.0",
|
|
78
|
+
"@lexical/hashtag": "^0.39.0",
|
|
79
|
+
"@lexical/link": "^0.39.0",
|
|
80
|
+
"@lexical/list": "^0.39.0",
|
|
81
|
+
"@lexical/markdown": "^0.39.0",
|
|
82
|
+
"@lexical/overflow": "^0.39.0",
|
|
52
83
|
"@lexical/react": "^0.38.2",
|
|
53
84
|
"@lexical/rich-text": "^0.38.2",
|
|
54
85
|
"@lexical/selection": "^0.38.2",
|
|
86
|
+
"@lexical/table": "^0.39.0",
|
|
87
|
+
"@lexical/text": "^0.39.0",
|
|
55
88
|
"@lexical/utils": "^0.38.2",
|
|
89
|
+
"@playwright/test": "^1.57.0",
|
|
90
|
+
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
91
|
+
"@radix-ui/react-checkbox": "^1.3.3",
|
|
92
|
+
"@radix-ui/react-collapsible": "^1.1.12",
|
|
93
|
+
"@radix-ui/react-dialog": "^1.1.15",
|
|
94
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
95
|
+
"@radix-ui/react-icons": "^1.3.2",
|
|
56
96
|
"@radix-ui/react-label": "^2.1.8",
|
|
97
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
98
|
+
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
99
|
+
"@radix-ui/react-select": "^2.2.6",
|
|
100
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
57
101
|
"@radix-ui/react-slot": "^1.2.4",
|
|
102
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
103
|
+
"@radix-ui/react-toggle": "^1.1.10",
|
|
104
|
+
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
58
105
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
59
|
-
"class-variance-authority": "^0.7.0",
|
|
60
|
-
"clsx": "^2.1.0",
|
|
61
|
-
"hazo_config": "^1.3.0",
|
|
62
|
-
"isomorphic-dompurify": "^2.9.0",
|
|
63
|
-
"lexical": "^0.38.2",
|
|
64
|
-
"lucide-react": "^0.344.0",
|
|
65
|
-
"next": "^14.2.0",
|
|
66
|
-
"react": "^18.3.0",
|
|
67
|
-
"react-dom": "^18.3.0",
|
|
68
|
-
"sonner": "^1.4.0",
|
|
69
|
-
"tailwind-merge": "^2.2.0"
|
|
70
|
-
},
|
|
71
|
-
"devDependencies": {
|
|
72
106
|
"@testing-library/jest-dom": "^6.2.0",
|
|
73
107
|
"@testing-library/react": "^14.1.0",
|
|
74
108
|
"@testing-library/user-event": "^14.5.0",
|
|
75
109
|
"@types/jest": "^29.5.0",
|
|
110
|
+
"@types/lodash": "^4.17.21",
|
|
76
111
|
"@types/node": "^20.11.0",
|
|
77
112
|
"@types/react": "^18.3.0",
|
|
78
113
|
"@types/react-dom": "^18.3.0",
|
|
79
114
|
"autoprefixer": "^10.4.0",
|
|
115
|
+
"class-variance-authority": "^0.7.0",
|
|
116
|
+
"clsx": "^2.1.0",
|
|
117
|
+
"cmdk": "^1.1.1",
|
|
118
|
+
"hazo_ui": "^2.3.0",
|
|
80
119
|
"jest": "^29.7.0",
|
|
81
120
|
"jest-environment-jsdom": "^29.7.0",
|
|
121
|
+
"lexical": "^0.38.2",
|
|
122
|
+
"lodash": "^4.17.21",
|
|
123
|
+
"lucide-react": "^0.344.0",
|
|
124
|
+
"next": "^14.2.0",
|
|
82
125
|
"postcss": "^8.4.0",
|
|
126
|
+
"react": "^18.3.0",
|
|
127
|
+
"react-dom": "^18.3.0",
|
|
128
|
+
"react-error-boundary": "^6.0.0",
|
|
129
|
+
"sonner": "^1.7.4",
|
|
130
|
+
"tailwind-merge": "^2.2.0",
|
|
83
131
|
"tailwindcss": "^3.4.0",
|
|
84
132
|
"tailwindcss-animate": "^1.0.7",
|
|
85
133
|
"ts-jest": "^29.1.0",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Emailer service implementation
|
|
3
|
-
* Reads configuration from hazo_notify_config.ini via hazo_config package
|
|
4
|
-
* and sends emails using the configured provider
|
|
5
|
-
*/
|
|
6
|
-
import { EmailerConfig, SendEmailOptions, EmailSendResponse } from './types';
|
|
7
|
-
/**
|
|
8
|
-
* Load emailer configuration from hazo_notify_config.ini
|
|
9
|
-
* @returns Emailer configuration
|
|
10
|
-
*/
|
|
11
|
-
export declare function load_emailer_config(): EmailerConfig;
|
|
12
|
-
/**
|
|
13
|
-
* Send email using the configured provider
|
|
14
|
-
* @param options - Email send options
|
|
15
|
-
* @param config - Optional emailer configuration (if not provided, loads from config file)
|
|
16
|
-
* @returns Promise with email send response
|
|
17
|
-
*/
|
|
18
|
-
export declare function send_email(options: SendEmailOptions, config?: EmailerConfig): Promise<EmailSendResponse>;
|
|
19
|
-
//# sourceMappingURL=emailer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emailer.d.ts","sourceRoot":"","sources":["../../../src/lib/emailer/emailer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAiB,MAAM,SAAS,CAAC;AAQ5F;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,aAAa,CAqHnD;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,iBAAiB,CAAC,CAoH5B"}
|
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Emailer service implementation
|
|
4
|
-
* Reads configuration from hazo_notify_config.ini via hazo_config package
|
|
5
|
-
* and sends emails using the configured provider
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.load_emailer_config = load_emailer_config;
|
|
9
|
-
exports.send_email = send_email;
|
|
10
|
-
const providers_1 = require("./providers");
|
|
11
|
-
const hazo_config_1 = require("hazo_config");
|
|
12
|
-
const path_1 = require("path");
|
|
13
|
-
const constants_1 = require("./utils/constants");
|
|
14
|
-
const logger_1 = require("./utils/logger");
|
|
15
|
-
const validation_1 = require("./utils/validation");
|
|
16
|
-
/**
|
|
17
|
-
* Load emailer configuration from hazo_notify_config.ini
|
|
18
|
-
* @returns Emailer configuration
|
|
19
|
-
*/
|
|
20
|
-
function load_emailer_config() {
|
|
21
|
-
const filename = 'emailer.ts';
|
|
22
|
-
const function_name = 'load_emailer_config';
|
|
23
|
-
try {
|
|
24
|
-
// Read configuration from hazo_notify_config.ini using hazo_config
|
|
25
|
-
const config_file_path = (0, path_1.join)(process.cwd(), 'hazo_notify_config.ini');
|
|
26
|
-
const hazo_config = new hazo_config_1.HazoConfig({ filePath: config_file_path });
|
|
27
|
-
const emailer_section = hazo_config.getSection('emailer') || {};
|
|
28
|
-
const emailer_module_raw = emailer_section?.emailer_module || 'zeptoemail_api';
|
|
29
|
-
// Validate emailer_module
|
|
30
|
-
if (!constants_1.VALID_EMAILER_MODULES.includes(emailer_module_raw)) {
|
|
31
|
-
throw new Error(`Invalid emailer_module: ${emailer_module_raw}. Must be one of: ${constants_1.VALID_EMAILER_MODULES.join(', ')}`);
|
|
32
|
-
}
|
|
33
|
-
const emailer_module = emailer_module_raw;
|
|
34
|
-
// Build configuration object
|
|
35
|
-
const config = {
|
|
36
|
-
emailer_module: emailer_module,
|
|
37
|
-
from_email: emailer_section?.from_email || '',
|
|
38
|
-
from_name: emailer_section?.from_name || 'Hazo Notify',
|
|
39
|
-
// Rate limiting
|
|
40
|
-
rate_limit_requests: parseInt(emailer_section?.rate_limit_requests || String(constants_1.DEFAULT_RATE_LIMIT_REQUESTS), 10),
|
|
41
|
-
rate_limit_window: parseInt(emailer_section?.rate_limit_window || String(constants_1.DEFAULT_RATE_LIMIT_WINDOW), 10),
|
|
42
|
-
// Attachment limits
|
|
43
|
-
max_attachment_size: parseInt(emailer_section?.max_attachment_size || String(constants_1.DEFAULT_MAX_ATTACHMENT_SIZE), 10),
|
|
44
|
-
max_attachments: parseInt(emailer_section?.max_attachments || String(constants_1.DEFAULT_MAX_ATTACHMENTS), 10),
|
|
45
|
-
// Request timeout
|
|
46
|
-
request_timeout: parseInt(emailer_section?.request_timeout || String(constants_1.DEFAULT_REQUEST_TIMEOUT), 10),
|
|
47
|
-
// Input length limits
|
|
48
|
-
max_subject_length: parseInt(emailer_section?.max_subject_length || String(constants_1.MAX_SUBJECT_LENGTH), 10),
|
|
49
|
-
max_body_length: parseInt(emailer_section?.max_body_length || String(constants_1.MAX_BODY_LENGTH), 10),
|
|
50
|
-
// CORS
|
|
51
|
-
cors_allowed_origins: emailer_section?.cors_allowed_origins || '',
|
|
52
|
-
};
|
|
53
|
-
// Load Zeptomail API configuration if emailer_module is 'zeptoemail_api'
|
|
54
|
-
if (emailer_module === 'zeptoemail_api') {
|
|
55
|
-
config.zeptomail_api_endpoint = emailer_section?.zeptomail_api_endpoint || 'https://api.zeptomail.com.au/v1.1/email';
|
|
56
|
-
// Prioritize environment variables over config file for security
|
|
57
|
-
// Check .env.local first (Next.js convention), then .env, then config file
|
|
58
|
-
config.zeptomail_api_key = process.env.ZEPTOMAIL_API_KEY || emailer_section?.zeptomail_api_key || '';
|
|
59
|
-
}
|
|
60
|
-
// Load optional configuration
|
|
61
|
-
if (emailer_section?.reply_to_email) {
|
|
62
|
-
config.reply_to_email = emailer_section.reply_to_email;
|
|
63
|
-
}
|
|
64
|
-
if (emailer_section?.bounce_email) {
|
|
65
|
-
config.bounce_email = emailer_section.bounce_email;
|
|
66
|
-
}
|
|
67
|
-
if (emailer_section?.return_path_email) {
|
|
68
|
-
config.return_path_email = emailer_section.return_path_email;
|
|
69
|
-
}
|
|
70
|
-
// Load SMTP configuration if emailer_module is 'smtp' (placeholder)
|
|
71
|
-
if (emailer_module === 'smtp') {
|
|
72
|
-
config.smtp_host = emailer_section?.smtp_host || '';
|
|
73
|
-
config.smtp_port = parseInt(emailer_section?.smtp_port || '587', 10);
|
|
74
|
-
const smtp_secure_value = emailer_section?.smtp_secure;
|
|
75
|
-
config.smtp_secure = smtp_secure_value === 'true' || smtp_secure_value === true;
|
|
76
|
-
config.smtp_auth_user = emailer_section?.smtp_auth_user || '';
|
|
77
|
-
config.smtp_auth_pass = emailer_section?.smtp_auth_pass || '';
|
|
78
|
-
config.smtp_timeout = parseInt(emailer_section?.smtp_timeout || '5000', 10);
|
|
79
|
-
const smtp_pool_value = emailer_section?.smtp_pool;
|
|
80
|
-
config.smtp_pool = smtp_pool_value === 'true' || smtp_pool_value === true;
|
|
81
|
-
}
|
|
82
|
-
// Load POP3 configuration if emailer_module is 'pop3' (placeholder)
|
|
83
|
-
if (emailer_module === 'pop3') {
|
|
84
|
-
config.pop3_host = emailer_section?.pop3_host || '';
|
|
85
|
-
config.pop3_port = parseInt(emailer_section?.pop3_port || '995', 10);
|
|
86
|
-
const pop3_secure_value = emailer_section?.pop3_secure;
|
|
87
|
-
config.pop3_secure = pop3_secure_value === 'true' || pop3_secure_value === true;
|
|
88
|
-
config.pop3_auth_user = emailer_section?.pop3_auth_user || '';
|
|
89
|
-
config.pop3_auth_pass = emailer_section?.pop3_auth_pass || '';
|
|
90
|
-
config.pop3_timeout = parseInt(emailer_section?.pop3_timeout || '5000', 10);
|
|
91
|
-
}
|
|
92
|
-
// Validate required configuration
|
|
93
|
-
if (!config.from_email) {
|
|
94
|
-
throw new Error('from_email is required in hazo_notify_config.ini');
|
|
95
|
-
}
|
|
96
|
-
if (!config.from_name) {
|
|
97
|
-
throw new Error('from_name is required in hazo_notify_config.ini');
|
|
98
|
-
}
|
|
99
|
-
// Validate emailer_module specific configuration
|
|
100
|
-
if (emailer_module === 'zeptoemail_api') {
|
|
101
|
-
if (!config.zeptomail_api_endpoint) {
|
|
102
|
-
throw new Error('zeptomail_api_endpoint is required when emailer_module=zeptoemail_api');
|
|
103
|
-
}
|
|
104
|
-
if (!config.zeptomail_api_key) {
|
|
105
|
-
throw new Error('Zeptomail API key is required. Set ZEPTOMAIL_API_KEY in .env.local or zeptomail_api_key in config file');
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
return config;
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
const error_message = error instanceof Error ? error.message : 'Failed to load emailer configuration';
|
|
112
|
-
const error_string = error instanceof Error ? error.toString() : String(error);
|
|
113
|
-
const stack = error instanceof Error ? error.stack : undefined;
|
|
114
|
-
(0, logger_1.log_error)((0, logger_1.create_log_entry)(filename, function_name, error_message, {
|
|
115
|
-
line_number: stack || 'unknown',
|
|
116
|
-
error: error_string,
|
|
117
|
-
}));
|
|
118
|
-
throw new Error(`Failed to load emailer configuration: ${error_message}`);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Send email using the configured provider
|
|
123
|
-
* @param options - Email send options
|
|
124
|
-
* @param config - Optional emailer configuration (if not provided, loads from config file)
|
|
125
|
-
* @returns Promise with email send response
|
|
126
|
-
*/
|
|
127
|
-
async function send_email(options, config) {
|
|
128
|
-
const filename = 'emailer.ts';
|
|
129
|
-
const function_name = 'send_email';
|
|
130
|
-
try {
|
|
131
|
-
// Load configuration if not provided
|
|
132
|
-
const emailer_config = config || load_emailer_config();
|
|
133
|
-
// Validate email options
|
|
134
|
-
if (!options.to || (Array.isArray(options.to) && options.to.length === 0)) {
|
|
135
|
-
throw new Error('Recipient email address(es) are required');
|
|
136
|
-
}
|
|
137
|
-
// Validate email addresses
|
|
138
|
-
const to_emails = Array.isArray(options.to) ? options.to : [options.to];
|
|
139
|
-
for (const email of to_emails) {
|
|
140
|
-
if (!(0, validation_1.validate_email_address)(email)) {
|
|
141
|
-
throw new Error(`Invalid recipient email address: ${email}`);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
if (!options.subject) {
|
|
145
|
-
throw new Error('Email subject is required');
|
|
146
|
-
}
|
|
147
|
-
// Validate subject length
|
|
148
|
-
if (!(0, validation_1.validate_subject_length)(options.subject)) {
|
|
149
|
-
throw new Error(`Email subject exceeds maximum length of ${emailer_config.max_subject_length || constants_1.MAX_SUBJECT_LENGTH} characters`);
|
|
150
|
-
}
|
|
151
|
-
if (!options.content.text && !options.content.html) {
|
|
152
|
-
throw new Error('Email content (text or html) is required');
|
|
153
|
-
}
|
|
154
|
-
// Validate body length
|
|
155
|
-
if (options.content.text && !(0, validation_1.validate_body_length)(options.content.text)) {
|
|
156
|
-
throw new Error(`Email text body exceeds maximum size of ${emailer_config.max_body_length || constants_1.MAX_BODY_LENGTH} bytes`);
|
|
157
|
-
}
|
|
158
|
-
if (options.content.html && !(0, validation_1.validate_body_length)(options.content.html)) {
|
|
159
|
-
throw new Error(`Email HTML body exceeds maximum size of ${emailer_config.max_body_length || constants_1.MAX_BODY_LENGTH} bytes`);
|
|
160
|
-
}
|
|
161
|
-
// Validate attachments
|
|
162
|
-
if (options.attachments) {
|
|
163
|
-
const max_attachments = emailer_config.max_attachments || constants_1.DEFAULT_MAX_ATTACHMENTS;
|
|
164
|
-
if (options.attachments.length > max_attachments) {
|
|
165
|
-
throw new Error(`Maximum ${max_attachments} attachments allowed`);
|
|
166
|
-
}
|
|
167
|
-
const max_size = emailer_config.max_attachment_size || constants_1.DEFAULT_MAX_ATTACHMENT_SIZE;
|
|
168
|
-
for (const attachment of options.attachments) {
|
|
169
|
-
if (!(0, validation_1.validate_attachment_size)(attachment.content, max_size)) {
|
|
170
|
-
throw new Error(`Attachment "${attachment.filename}" exceeds maximum size of ${max_size} bytes`);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
// Get appropriate provider
|
|
175
|
-
const provider = (0, providers_1.get_email_provider)(emailer_config);
|
|
176
|
-
// Send email
|
|
177
|
-
const response = await provider.send_email(options, emailer_config);
|
|
178
|
-
// Log error if email sending failed
|
|
179
|
-
if (!response.success) {
|
|
180
|
-
(0, logger_1.log_error)((0, logger_1.create_log_entry)(filename, function_name, response.error || 'Failed to send email', {
|
|
181
|
-
options: {
|
|
182
|
-
to: options.to,
|
|
183
|
-
subject: options.subject,
|
|
184
|
-
has_text: !!options.content.text,
|
|
185
|
-
has_html: !!options.content.html,
|
|
186
|
-
attachments_count: options.attachments?.length || 0,
|
|
187
|
-
},
|
|
188
|
-
response: response.raw_response,
|
|
189
|
-
}));
|
|
190
|
-
}
|
|
191
|
-
return response;
|
|
192
|
-
}
|
|
193
|
-
catch (error) {
|
|
194
|
-
const error_message = error instanceof Error ? error.message : 'Failed to send email';
|
|
195
|
-
const error_string = error instanceof Error ? error.toString() : String(error);
|
|
196
|
-
const stack = error instanceof Error ? error.stack : undefined;
|
|
197
|
-
const is_production = process.env.NODE_ENV === 'production';
|
|
198
|
-
(0, logger_1.log_error)((0, logger_1.create_log_entry)(filename, function_name, error_message, {
|
|
199
|
-
line_number: stack || 'unknown',
|
|
200
|
-
error: error_string,
|
|
201
|
-
options: {
|
|
202
|
-
to: options.to,
|
|
203
|
-
subject: options.subject,
|
|
204
|
-
has_text: !!options.content.text,
|
|
205
|
-
has_html: !!options.content.html,
|
|
206
|
-
attachments_count: options.attachments?.length || 0,
|
|
207
|
-
},
|
|
208
|
-
}));
|
|
209
|
-
return {
|
|
210
|
-
success: false,
|
|
211
|
-
error: error_message,
|
|
212
|
-
message: error_message,
|
|
213
|
-
raw_response: is_production ? undefined : {
|
|
214
|
-
error: error_string,
|
|
215
|
-
stack: stack,
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
//# sourceMappingURL=emailer.js.map
|
|
@@ -1 +0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AAC,SAAS,CAAC;QAC/D,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;QAE5D,IAAA,kBAAS,EAAC,IAAA,yBAAgB,EACxB,QAAQ,EACR,aAAa,EACb,aAAa,EACb;YACE,WAAW,EAAE,KAAK,IAAI,SAAS;YAC/B,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE;gBACP,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;gBAChC,QAAQ,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI;gBAChC,iBAAiB,EAAE,OAAO,CAAC,WAAW,EAAE,MAAM,IAAI,CAAC;aACpD;SACF,CACF,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,YAAY,EAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBACxC,KAAK,EAAE,YAAY;gBACnB,KAAK,EAAE,KAAK;aACb;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Emailer service exports
|
|
3
|
-
* Main entry point for the emailer library
|
|
4
|
-
*/
|
|
5
|
-
export { send_email, load_emailer_config } from './emailer';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export { get_email_provider } from './providers';
|
|
8
|
-
export { ZeptomailProvider } from './providers/zeptomail_provider';
|
|
9
|
-
export { SmtpProvider } from './providers/smtp_provider';
|
|
10
|
-
export { Pop3Provider } from './providers/pop3_provider';
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/emailer/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC5D,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC"}
|