hazo_notify 1.0.1 → 1.0.2

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.
Files changed (53) hide show
  1. package/dist/emailer/emailer.d.ts +19 -0
  2. package/dist/emailer/emailer.d.ts.map +1 -0
  3. package/dist/emailer/emailer.js +224 -0
  4. package/dist/emailer/emailer.js.map +1 -0
  5. package/dist/emailer/index.d.ts +11 -0
  6. package/dist/emailer/index.d.ts.map +1 -0
  7. package/dist/emailer/index.js +34 -0
  8. package/dist/emailer/index.js.map +1 -0
  9. package/dist/emailer/providers/index.d.ts +15 -0
  10. package/dist/emailer/providers/index.d.ts.map +1 -0
  11. package/dist/emailer/providers/index.js +36 -0
  12. package/dist/emailer/providers/index.js.map +1 -0
  13. package/dist/emailer/providers/pop3_provider.d.ts +15 -0
  14. package/dist/emailer/providers/pop3_provider.d.ts.map +1 -0
  15. package/dist/emailer/providers/pop3_provider.js +29 -0
  16. package/dist/emailer/providers/pop3_provider.js.map +1 -0
  17. package/dist/emailer/providers/smtp_provider.d.ts +15 -0
  18. package/dist/emailer/providers/smtp_provider.d.ts.map +1 -0
  19. package/dist/emailer/providers/smtp_provider.js +29 -0
  20. package/dist/emailer/providers/smtp_provider.js.map +1 -0
  21. package/dist/emailer/providers/zeptomail_provider.d.ts +15 -0
  22. package/dist/emailer/providers/zeptomail_provider.d.ts.map +1 -0
  23. package/dist/emailer/providers/zeptomail_provider.js +255 -0
  24. package/dist/emailer/providers/zeptomail_provider.js.map +1 -0
  25. package/dist/emailer/types.d.ts +94 -0
  26. package/dist/emailer/types.d.ts.map +1 -0
  27. package/dist/emailer/types.js +6 -0
  28. package/dist/emailer/types.js.map +1 -0
  29. package/dist/emailer/utils/constants.d.ts +15 -0
  30. package/dist/emailer/utils/constants.d.ts.map +1 -0
  31. package/dist/emailer/utils/constants.js +22 -0
  32. package/dist/emailer/utils/constants.js.map +1 -0
  33. package/dist/emailer/utils/index.d.ts +8 -0
  34. package/dist/emailer/utils/index.d.ts.map +1 -0
  35. package/dist/emailer/utils/index.js +24 -0
  36. package/dist/emailer/utils/index.js.map +1 -0
  37. package/dist/emailer/utils/logger.d.ts +40 -0
  38. package/dist/emailer/utils/logger.d.ts.map +1 -0
  39. package/dist/emailer/utils/logger.js +60 -0
  40. package/dist/emailer/utils/logger.js.map +1 -0
  41. package/dist/emailer/utils/validation.d.ts +37 -0
  42. package/dist/emailer/utils/validation.d.ts.map +1 -0
  43. package/dist/emailer/utils/validation.js +81 -0
  44. package/dist/emailer/utils/validation.js.map +1 -0
  45. package/dist/index.d.ts +6 -0
  46. package/dist/index.d.ts.map +1 -0
  47. package/dist/index.js +22 -0
  48. package/dist/index.js.map +1 -0
  49. package/dist/utils.d.ts +12 -0
  50. package/dist/utils.d.ts.map +1 -0
  51. package/dist/utils.js +18 -0
  52. package/dist/utils.js.map +1 -0
  53. package/package.json +3 -1
@@ -0,0 +1,19 @@
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 type { 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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emailer.d.ts","sourceRoot":"","sources":["../../src/lib/emailer/emailer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAsBH,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAiB,MAAM,SAAS,CAAC;AAEjG;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,aAAa,CAsJnD;AAED;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE,gBAAgB,EACzB,MAAM,CAAC,EAAE,aAAa,GACrB,OAAO,CAAC,iBAAiB,CAAC,CAwH5B"}
@@ -0,0 +1,224 @@
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 =
56
+ emailer_section?.zeptomail_api_endpoint ||
57
+ 'https://api.zeptomail.com.au/v1.1/email';
58
+ // Prioritize environment variables over config file for security
59
+ config.zeptomail_api_key =
60
+ process.env.ZEPTOMAIL_API_KEY || emailer_section?.zeptomail_api_key || '';
61
+ }
62
+ // Load optional configuration
63
+ if (emailer_section?.reply_to_email) {
64
+ config.reply_to_email = emailer_section.reply_to_email;
65
+ }
66
+ if (emailer_section?.bounce_email) {
67
+ config.bounce_email = emailer_section.bounce_email;
68
+ }
69
+ if (emailer_section?.return_path_email) {
70
+ config.return_path_email = emailer_section.return_path_email;
71
+ }
72
+ // Load SMTP configuration if emailer_module is 'smtp'
73
+ if (emailer_module === 'smtp') {
74
+ config.smtp_host = emailer_section?.smtp_host || '';
75
+ config.smtp_port = parseInt(emailer_section?.smtp_port || '587', 10);
76
+ const smtp_secure_value = String(emailer_section?.smtp_secure || '');
77
+ config.smtp_secure = smtp_secure_value === 'true';
78
+ config.smtp_auth_user = emailer_section?.smtp_auth_user || '';
79
+ config.smtp_auth_pass = emailer_section?.smtp_auth_pass || '';
80
+ config.smtp_timeout = parseInt(emailer_section?.smtp_timeout || '5000', 10);
81
+ const smtp_pool_value = String(emailer_section?.smtp_pool || '');
82
+ config.smtp_pool = smtp_pool_value === 'true';
83
+ }
84
+ // Load POP3 configuration if emailer_module is 'pop3'
85
+ if (emailer_module === 'pop3') {
86
+ config.pop3_host = emailer_section?.pop3_host || '';
87
+ config.pop3_port = parseInt(emailer_section?.pop3_port || '995', 10);
88
+ const pop3_secure_value = String(emailer_section?.pop3_secure || '');
89
+ config.pop3_secure = pop3_secure_value === 'true';
90
+ config.pop3_auth_user = emailer_section?.pop3_auth_user || '';
91
+ config.pop3_auth_pass = emailer_section?.pop3_auth_pass || '';
92
+ config.pop3_timeout = parseInt(emailer_section?.pop3_timeout || '5000', 10);
93
+ }
94
+ // Validate required configuration
95
+ if (!config.from_email) {
96
+ throw new Error('from_email is required in hazo_notify_config.ini');
97
+ }
98
+ if (!config.from_name) {
99
+ throw new Error('from_name is required in hazo_notify_config.ini');
100
+ }
101
+ // Validate emailer_module specific configuration
102
+ if (emailer_module === 'zeptoemail_api') {
103
+ if (!config.zeptomail_api_endpoint) {
104
+ throw new Error('zeptomail_api_endpoint is required when emailer_module=zeptoemail_api');
105
+ }
106
+ if (!config.zeptomail_api_key) {
107
+ throw new Error('Zeptomail API key is required. Set ZEPTOMAIL_API_KEY in .env.local or zeptomail_api_key in config file');
108
+ }
109
+ }
110
+ return config;
111
+ }
112
+ catch (error) {
113
+ const error_message = error instanceof Error ? error.message : 'Failed to load emailer configuration';
114
+ const error_string = error instanceof Error ? error.toString() : String(error);
115
+ const stack = error instanceof Error ? error.stack : undefined;
116
+ (0, logger_1.log_error)((0, logger_1.create_log_entry)(filename, function_name, error_message, {
117
+ line_number: stack || 'unknown',
118
+ error: error_string,
119
+ }));
120
+ throw new Error(`Failed to load emailer configuration: ${error_message}`);
121
+ }
122
+ }
123
+ /**
124
+ * Send email using the configured provider
125
+ * @param options - Email send options
126
+ * @param config - Optional emailer configuration (if not provided, loads from config file)
127
+ * @returns Promise with email send response
128
+ */
129
+ async function send_email(options, config) {
130
+ const filename = 'emailer.ts';
131
+ const function_name = 'send_email';
132
+ try {
133
+ // Load configuration if not provided
134
+ const emailer_config = config || load_emailer_config();
135
+ // Validate email options
136
+ if (!options.to || (Array.isArray(options.to) && options.to.length === 0)) {
137
+ throw new Error('Recipient email address(es) are required');
138
+ }
139
+ // Validate email addresses
140
+ const to_emails = Array.isArray(options.to) ? options.to : [options.to];
141
+ for (const email of to_emails) {
142
+ if (!(0, validation_1.validate_email_address)(email)) {
143
+ throw new Error(`Invalid recipient email address: ${email}`);
144
+ }
145
+ }
146
+ if (!options.subject) {
147
+ throw new Error('Email subject is required');
148
+ }
149
+ // Validate subject length
150
+ if (!(0, validation_1.validate_subject_length)(options.subject)) {
151
+ throw new Error(`Email subject exceeds maximum length of ${emailer_config.max_subject_length || constants_1.MAX_SUBJECT_LENGTH} characters`);
152
+ }
153
+ if (!options.content.text && !options.content.html) {
154
+ throw new Error('Email content (text or html) is required');
155
+ }
156
+ // Validate body length
157
+ if (options.content.text && !(0, validation_1.validate_body_length)(options.content.text)) {
158
+ throw new Error(`Email text body exceeds maximum size of ${emailer_config.max_body_length || constants_1.MAX_BODY_LENGTH} bytes`);
159
+ }
160
+ if (options.content.html && !(0, validation_1.validate_body_length)(options.content.html)) {
161
+ throw new Error(`Email HTML body exceeds maximum size of ${emailer_config.max_body_length || constants_1.MAX_BODY_LENGTH} bytes`);
162
+ }
163
+ // Validate attachments
164
+ if (options.attachments) {
165
+ const max_attachments = emailer_config.max_attachments || constants_1.DEFAULT_MAX_ATTACHMENTS;
166
+ if (options.attachments.length > max_attachments) {
167
+ throw new Error(`Maximum ${max_attachments} attachments allowed`);
168
+ }
169
+ const max_size = emailer_config.max_attachment_size || constants_1.DEFAULT_MAX_ATTACHMENT_SIZE;
170
+ for (const attachment of options.attachments) {
171
+ if (!(0, validation_1.validate_attachment_size)(attachment.content, max_size)) {
172
+ throw new Error(`Attachment "${attachment.filename}" exceeds maximum size of ${max_size} bytes`);
173
+ }
174
+ }
175
+ }
176
+ // Get appropriate provider
177
+ const provider = (0, providers_1.get_email_provider)(emailer_config);
178
+ // Send email
179
+ const response = await provider.send_email(options, emailer_config);
180
+ // Log error if email sending failed
181
+ if (!response.success) {
182
+ (0, logger_1.log_error)((0, logger_1.create_log_entry)(filename, function_name, response.error || 'Failed to send email', {
183
+ options: {
184
+ to: options.to,
185
+ subject: options.subject,
186
+ has_text: !!options.content.text,
187
+ has_html: !!options.content.html,
188
+ attachments_count: options.attachments?.length || 0,
189
+ },
190
+ response: response.raw_response,
191
+ }));
192
+ }
193
+ return response;
194
+ }
195
+ catch (error) {
196
+ const error_message = error instanceof Error ? error.message : 'Failed to send email';
197
+ const error_string = error instanceof Error ? error.toString() : String(error);
198
+ const stack = error instanceof Error ? error.stack : undefined;
199
+ const is_production = process.env.NODE_ENV === 'production';
200
+ (0, logger_1.log_error)((0, logger_1.create_log_entry)(filename, function_name, error_message, {
201
+ line_number: stack || 'unknown',
202
+ error: error_string,
203
+ options: {
204
+ to: options.to,
205
+ subject: options.subject,
206
+ has_text: !!options.content.text,
207
+ has_html: !!options.content.html,
208
+ attachments_count: options.attachments?.length || 0,
209
+ },
210
+ }));
211
+ return {
212
+ success: false,
213
+ error: error_message,
214
+ message: error_message,
215
+ raw_response: is_production
216
+ ? undefined
217
+ : {
218
+ error: error_string,
219
+ stack: stack,
220
+ },
221
+ };
222
+ }
223
+ }
224
+ //# sourceMappingURL=emailer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emailer.js","sourceRoot":"","sources":["../../src/lib/emailer/emailer.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AA4BH,kDAsJC;AAQD,gCA2HC;AAnTD,2CAAiD;AACjD,6CAAyC;AACzC,+BAA4B;AAC5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AI,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,CAAC,CACH,CAAC;QAEF,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,YAAY,EAAE,aAAa;gBACzB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC;oBACE,KAAK,EAAE,YAAY;oBACnB,KAAK,EAAE,KAAK;iBACb;SACN,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ /**
3
+ * Emailer service exports
4
+ * Main entry point for the emailer library
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.Pop3Provider = exports.SmtpProvider = exports.ZeptomailProvider = exports.get_email_provider = exports.load_emailer_config = exports.send_email = void 0;
22
+ var emailer_1 = require("./emailer");
23
+ Object.defineProperty(exports, "send_email", { enumerable: true, get: function () { return emailer_1.send_email; } });
24
+ Object.defineProperty(exports, "load_emailer_config", { enumerable: true, get: function () { return emailer_1.load_emailer_config; } });
25
+ __exportStar(require("./types"), exports);
26
+ var providers_1 = require("./providers");
27
+ Object.defineProperty(exports, "get_email_provider", { enumerable: true, get: function () { return providers_1.get_email_provider; } });
28
+ var zeptomail_provider_1 = require("./providers/zeptomail_provider");
29
+ Object.defineProperty(exports, "ZeptomailProvider", { enumerable: true, get: function () { return zeptomail_provider_1.ZeptomailProvider; } });
30
+ var smtp_provider_1 = require("./providers/smtp_provider");
31
+ Object.defineProperty(exports, "SmtpProvider", { enumerable: true, get: function () { return smtp_provider_1.SmtpProvider; } });
32
+ var pop3_provider_1 = require("./providers/pop3_provider");
33
+ Object.defineProperty(exports, "Pop3Provider", { enumerable: true, get: function () { return pop3_provider_1.Pop3Provider; } });
34
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/emailer/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAEH,qCAA4D;AAAnD,qGAAA,UAAU,OAAA;AAAE,8GAAA,mBAAmB,OAAA;AACxC,0CAAwB;AACxB,yCAAiD;AAAxC,+GAAA,kBAAkB,OAAA;AAC3B,qEAAmE;AAA1D,uHAAA,iBAAiB,OAAA;AAC1B,2DAAyD;AAAhD,6GAAA,YAAY,OAAA;AACrB,2DAAyD;AAAhD,6GAAA,YAAY,OAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Provider factory for email providers
3
+ * Selects and returns the appropriate provider based on configuration
4
+ */
5
+ import type { EmailerConfig, EmailProvider } from '../types';
6
+ /**
7
+ * Get email provider based on configuration module
8
+ * @param config - Emailer configuration
9
+ * @returns Email provider instance
10
+ */
11
+ export declare function get_email_provider(config: EmailerConfig): EmailProvider;
12
+ export { ZeptomailProvider } from './zeptomail_provider';
13
+ export { SmtpProvider } from './smtp_provider';
14
+ export { Pop3Provider } from './pop3_provider';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/emailer/providers/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE7D;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,aAAa,CAavE;AAED,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ /**
3
+ * Provider factory for email providers
4
+ * Selects and returns the appropriate provider based on configuration
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Pop3Provider = exports.SmtpProvider = exports.ZeptomailProvider = void 0;
8
+ exports.get_email_provider = get_email_provider;
9
+ const zeptomail_provider_1 = require("./zeptomail_provider");
10
+ const smtp_provider_1 = require("./smtp_provider");
11
+ const pop3_provider_1 = require("./pop3_provider");
12
+ /**
13
+ * Get email provider based on configuration module
14
+ * @param config - Emailer configuration
15
+ * @returns Email provider instance
16
+ */
17
+ function get_email_provider(config) {
18
+ const emailer_module = config.emailer_module || 'zeptoemail_api';
19
+ switch (emailer_module) {
20
+ case 'zeptoemail_api':
21
+ return new zeptomail_provider_1.ZeptomailProvider();
22
+ case 'smtp':
23
+ return new smtp_provider_1.SmtpProvider();
24
+ case 'pop3':
25
+ return new pop3_provider_1.Pop3Provider();
26
+ default:
27
+ throw new Error(`Unsupported emailer module: ${emailer_module}`);
28
+ }
29
+ }
30
+ var zeptomail_provider_2 = require("./zeptomail_provider");
31
+ Object.defineProperty(exports, "ZeptomailProvider", { enumerable: true, get: function () { return zeptomail_provider_2.ZeptomailProvider; } });
32
+ var smtp_provider_2 = require("./smtp_provider");
33
+ Object.defineProperty(exports, "SmtpProvider", { enumerable: true, get: function () { return smtp_provider_2.SmtpProvider; } });
34
+ var pop3_provider_2 = require("./pop3_provider");
35
+ Object.defineProperty(exports, "Pop3Provider", { enumerable: true, get: function () { return pop3_provider_2.Pop3Provider; } });
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/emailer/providers/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAYH,gDAaC;AAvBD,6DAAyD;AACzD,mDAA+C;AAC/C,mDAA+C;AAG/C;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,MAAqB;IACtD,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,IAAI,gBAAgB,CAAC;IAEjE,QAAQ,cAAc,EAAE,CAAC;QACvB,KAAK,gBAAgB;YACnB,OAAO,IAAI,sCAAiB,EAAE,CAAC;QACjC,KAAK,MAAM;YACT,OAAO,IAAI,4BAAY,EAAE,CAAC;QAC5B,KAAK,MAAM;YACT,OAAO,IAAI,4BAAY,EAAE,CAAC;QAC5B;YACE,MAAM,IAAI,KAAK,CAAC,+BAA+B,cAAc,EAAE,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AACrB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * POP3 provider implementation (placeholder)
3
+ * This provider is not yet implemented and will return an error
4
+ */
5
+ import type { EmailProvider, SendEmailOptions, EmailerConfig, EmailSendResponse } from '../types';
6
+ export declare class Pop3Provider implements EmailProvider {
7
+ /**
8
+ * Send email using POP3 (not implemented)
9
+ * @param options - Email send options
10
+ * @param config - Emailer configuration
11
+ * @returns Promise with error response
12
+ */
13
+ send_email(options: SendEmailOptions, config: EmailerConfig): Promise<EmailSendResponse>;
14
+ }
15
+ //# sourceMappingURL=pop3_provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pop3_provider.d.ts","sourceRoot":"","sources":["../../../src/lib/emailer/providers/pop3_provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,qBAAa,YAAa,YAAW,aAAa;IAChD;;;;;OAKG;IACG,UAAU,CACd,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,iBAAiB,CAAC;CAY9B"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * POP3 provider implementation (placeholder)
4
+ * This provider is not yet implemented and will return an error
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.Pop3Provider = void 0;
8
+ class Pop3Provider {
9
+ /**
10
+ * Send email using POP3 (not implemented)
11
+ * @param options - Email send options
12
+ * @param config - Emailer configuration
13
+ * @returns Promise with error response
14
+ */
15
+ async send_email(options, config) {
16
+ return {
17
+ success: false,
18
+ error: 'POP3 provider is not yet implemented',
19
+ message: 'POP3 provider is not yet implemented. Please use API method instead.',
20
+ raw_response: {
21
+ provider: 'pop3',
22
+ status: 'not_implemented',
23
+ message: 'POP3 provider is a placeholder and will be implemented in a future version',
24
+ },
25
+ };
26
+ }
27
+ }
28
+ exports.Pop3Provider = Pop3Provider;
29
+ //# sourceMappingURL=pop3_provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pop3_provider.js","sourceRoot":"","sources":["../../../src/lib/emailer/providers/pop3_provider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,MAAa,YAAY;IACvB;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CACd,OAAyB,EACzB,MAAqB;QAErB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,sCAAsC;YAC7C,OAAO,EAAE,sEAAsE;YAC/E,YAAY,EAAE;gBACZ,QAAQ,EAAE,MAAM;gBAChB,MAAM,EAAE,iBAAiB;gBACzB,OAAO,EAAE,4EAA4E;aACtF;SACF,CAAC;IACJ,CAAC;CACF;AAtBD,oCAsBC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * SMTP provider implementation (placeholder)
3
+ * This provider is not yet implemented and will return an error
4
+ */
5
+ import type { EmailProvider, SendEmailOptions, EmailerConfig, EmailSendResponse } from '../types';
6
+ export declare class SmtpProvider implements EmailProvider {
7
+ /**
8
+ * Send email using SMTP (not implemented)
9
+ * @param options - Email send options
10
+ * @param config - Emailer configuration
11
+ * @returns Promise with error response
12
+ */
13
+ send_email(options: SendEmailOptions, config: EmailerConfig): Promise<EmailSendResponse>;
14
+ }
15
+ //# sourceMappingURL=smtp_provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smtp_provider.d.ts","sourceRoot":"","sources":["../../../src/lib/emailer/providers/smtp_provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,qBAAa,YAAa,YAAW,aAAa;IAChD;;;;;OAKG;IACG,UAAU,CACd,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,iBAAiB,CAAC;CAY9B"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * SMTP provider implementation (placeholder)
4
+ * This provider is not yet implemented and will return an error
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.SmtpProvider = void 0;
8
+ class SmtpProvider {
9
+ /**
10
+ * Send email using SMTP (not implemented)
11
+ * @param options - Email send options
12
+ * @param config - Emailer configuration
13
+ * @returns Promise with error response
14
+ */
15
+ async send_email(options, config) {
16
+ return {
17
+ success: false,
18
+ error: 'SMTP provider is not yet implemented',
19
+ message: 'SMTP provider is not yet implemented. Please use API method instead.',
20
+ raw_response: {
21
+ provider: 'smtp',
22
+ status: 'not_implemented',
23
+ message: 'SMTP provider is a placeholder and will be implemented in a future version',
24
+ },
25
+ };
26
+ }
27
+ }
28
+ exports.SmtpProvider = SmtpProvider;
29
+ //# sourceMappingURL=smtp_provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smtp_provider.js","sourceRoot":"","sources":["../../../src/lib/emailer/providers/smtp_provider.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AASH,MAAa,YAAY;IACvB;;;;;OAKG;IACH,KAAK,CAAC,UAAU,CACd,OAAyB,EACzB,MAAqB;QAErB,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,sCAAsC;YAC7C,OAAO,EAAE,sEAAsE;YAC/E,YAAY,EAAE;gBACZ,QAAQ,EAAE,MAAM;gBAChB,MAAM,EAAE,iBAAiB;gBACzB,OAAO,EAAE,4EAA4E;aACtF;SACF,CAAC;IACJ,CAAC;CACF;AAtBD,oCAsBC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Zeptomail API provider implementation
3
+ * Sends emails using the Zeptomail API
4
+ */
5
+ import type { EmailProvider, SendEmailOptions, EmailerConfig, EmailSendResponse } from '../types';
6
+ export declare class ZeptomailProvider implements EmailProvider {
7
+ /**
8
+ * Send email using Zeptomail API
9
+ * @param options - Email send options
10
+ * @param config - Emailer configuration
11
+ * @returns Promise with email send response
12
+ */
13
+ send_email(options: SendEmailOptions, config: EmailerConfig): Promise<EmailSendResponse>;
14
+ }
15
+ //# sourceMappingURL=zeptomail_provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zeptomail_provider.d.ts","sourceRoot":"","sources":["../../../src/lib/emailer/providers/zeptomail_provider.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EAElB,MAAM,UAAU,CAAC;AAElB,qBAAa,iBAAkB,YAAW,aAAa;IACrD;;;;;OAKG;IACG,UAAU,CACd,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,iBAAiB,CAAC;CAiR9B"}