{
  "version": 3,
  "sources": ["../src/index.js", "../src/email/nodemailer.js", "../src/email/templatedMailer.js", "../src/sms/twilio.js"],
  "sourcesContent": ["// communication/src/index.js\n/**\n * @file Main entry point for the @daitanjs/communication package.\n * @module @daitanjs/communication\n *\n * @description\n * This package provides a suite of utilities for handling communications, including\n * email and SMS/WhatsApp messaging. It abstracts away the complexities of different\n * providers and integrates with a background job queue for reliable, asynchronous delivery.\n *\n * Key Features:\n * - **Email**:\n *   - `sendMail`: Queues an email for sending via a configured SMTP provider.\n *   - `sendTemplatedEmail`: A high-level function to send pre-defined, styled emails\n *     (e.g., welcome, password reset) using HTML templates.\n * - **SMS & WhatsApp**:\n *   - `sendSMS` / `sendWhatsapp`: Functions for sending messages via Twilio.\n *   - `createMessageTemplate`, `composeMessageFromTemplate`: Utilities for creating\n *     and using message templates with placeholders.\n * - **General**:\n *   - `replacePlaceholders`: A utility re-exported for convenience in message composition.\n */\nimport { getLogger } from '@daitanjs/development';\nimport { replacePlaceholders } from '@daitanjs/utilities';\n\nconst communicationIndexLogger = getLogger('daitan-communication-index');\n\ncommunicationIndexLogger.debug('Exporting DaitanJS Communication modules...');\n\n// --- Email Functionalities ---\nexport { sendMail } from './email/nodemailer.js';\nexport { sendTemplatedEmail } from './email/templatedMailer.js';\n\n// --- SMS & WhatsApp Functionalities ---\nexport {\n  sendSMS,\n  sendWhatsapp,\n  createMessageTemplate,\n  composeMessageFromTemplate,\n} from './sms/twilio.js';\n\n// --- General Utilities ---\n// Re-exported from @daitanjs/utilities for convenience within this package's context.\nexport { replacePlaceholders };\n\ncommunicationIndexLogger.info('DaitanJS Communication module exports ready.');\n", "// packages/communication/src/email/nodemailer.js\n/**\n * @file Email sending functionalities using Nodemailer, offloaded to a queue.\n * @module @daitanjs/communication/email/nodemailer\n */\nimport { getLogger, getOptionalEnvVariable } from '@daitanjs/development';\nimport { getConfigManager } from '@daitanjs/config';\nimport { addJob } from '@daitanjs/queues';\nimport {\n  DaitanConfigurationError,\n  DaitanOperationError,\n  DaitanInvalidInputError,\n} from '@daitanjs/error';\n\nconst emailLogger = getLogger('daitan-comm-email-queuer');\nconst EMAIL_QUEUE_NAME = 'mail-queue';\nconst SEND_EMAIL_JOB_NAME = 'send-email-via-nodemailer';\n\n/**\n * @typedef {Object} NodemailerMailerConfig\n * @property {string} [host] - SMTP server host.\n * @property {number} [port] - SMTP server port.\n * @property {boolean} [secure] - Whether to use SSL/TLS.\n * @property {object} [auth] - Authentication object.\n * @property {string} [auth.user] - SMTP username.\n * @property {string} [auth.pass] - SMTP password.\n * @property {string} [fromName] - Default sender name for emails.\n * @property {string} [fromAddress] - Default sender email address.\n * @property {boolean} [tlsRejectUnauthorized] - Override for `MAIL_TLS_REJECT_UNAUTHORIZED`.\n */\n\n/**\n * @typedef {Object} EmailMessage\n * @property {string | string[]} to - Recipient email address(es).\n * @property {string} subject - Email subject line.\n * @property {string} html - HTML content of the email.\n * @property {string} [text] - Optional plain text version.\n * @property {string} [from] - Sender email address.\n * @property {string} [name] - Sender name.\n * @property {string | string[]} [cc] - CC recipient(s).\n * @property {string | string[]} [bcc] - BCC recipient(s).\n * @property {Array<import('nodemailer/lib/mailer').Attachment>} [attachments] - Array of attachment objects.\n * @property {string | string[]} [replyTo] - Optional Reply-To address(es).\n * @property {object} [headers] - Optional custom headers.\n */\n\n/**\n * @typedef {Object} SendMailParams\n * @property {EmailMessage} message - The email message details.\n * @property {NodemailerMailerConfig} [config={}] - Optional mailer configuration for this send operation.\n */\n\n/**\n * Validates email parameters and adds a job to the `mail-queue` for background processing.\n *\n * @public\n * @async\n * @param {SendMailParams} params - The consolidated parameters object.\n * @returns {Promise<import('bullmq').Job>} The BullMQ Job object that was created.\n * @throws {DaitanInvalidInputError} If essential `message` fields are missing or invalid.\n * @throws {DaitanOperationError} If adding the job to the queue fails.\n */\nexport const sendMail = async ({ message, config = {} }) => {\n  const configManager = getConfigManager(); // Lazy-load the config manager\n  const callId = `mail-queue-${Date.now().toString(36)}-${Math.random()\n    .toString(36)\n    .substring(2, 7)}`;\n  emailLogger.info(\n    `[${callId}] sendMail: Queuing email. Subject: \"${String(\n      message?.subject\n    ).substring(0, 50)}...\"`,\n    { to: message?.to }\n  );\n\n  if (!message || typeof message !== 'object') {\n    throw new DaitanInvalidInputError(\n      '`message` object must be a non-null object.'\n    );\n  }\n  const missingFields = [];\n  if (\n    !message.to ||\n    (Array.isArray(message.to) && message.to.length === 0) ||\n    (typeof message.to === 'string' && !message.to.trim())\n  )\n    missingFields.push('to');\n  if (!message.subject || !String(message.subject).trim())\n    missingFields.push('subject');\n  if (!message.html || !String(message.html).trim()) missingFields.push('html');\n  if (missingFields.length > 0) {\n    throw new DaitanInvalidInputError(\n      `Email message missing required field(s): ${missingFields.join(', ')}.`,\n      { missingFields }\n    );\n  }\n\n  // This object contains the full SMTP configuration needed by the worker.\n  const finalSmtpConfig = {\n    host: config.host || configManager.get('SMTP_HOST'),\n    port: Number(config.port ?? configManager.get('SMTP_PORT', 587)),\n    auth: {\n      user: config.auth?.user || configManager.get('SMTP_USER'),\n      pass: config.auth?.pass || configManager.get('SMTP_PASS'),\n    },\n    tls: {\n      rejectUnauthorized:\n        config.tlsRejectUnauthorized ??\n        getOptionalEnvVariable('MAIL_TLS_REJECT_UNAUTHORIZED', 'false', {\n          type: 'boolean',\n        }) === true,\n    },\n  };\n  finalSmtpConfig.secure =\n    config.secure !== undefined ? config.secure : finalSmtpConfig.port === 465;\n\n  let senderName =\n    message.name ||\n    config.fromName ||\n    configManager.get('SMTP_FROM_NAME') ||\n    'DaitanJS App';\n  let fromEmailAddress =\n    message.from ||\n    config.fromAddress ||\n    configManager.get('SMTP_FROM_ADDRESS') ||\n    finalSmtpConfig.auth.user;\n\n  const fromRegex = /^(.*?)<([^>]+)>$/;\n  const fromMatch =\n    typeof message.from === 'string' ? message.from.match(fromRegex) : null;\n  if (fromMatch) {\n    senderName = fromMatch[1].trim() || senderName;\n    fromEmailAddress = fromMatch[2].trim();\n  } else if (typeof message.from === 'string') {\n    fromEmailAddress = message.from.trim();\n  }\n\n  const finalFromHeader = senderName\n    ? `\"${senderName.replace(/\"/g, '\\\\\"')}\" <${fromEmailAddress}>`\n    : fromEmailAddress;\n\n  let finalToRecipients = Array.isArray(message.to) ? message.to : [message.to];\n  const recipientOverride = configManager.get('MAIL_RECIPIENT_OVERRIDE');\n\n  // The development override logic is correctly placed here.\n  if (configManager.get('NODE_ENV') === 'development' && recipientOverride) {\n    emailLogger.warn(\n      `[${callId}] DEV MODE: Email recipients overridden to \"${recipientOverride}\".`\n    );\n    finalToRecipients = [recipientOverride.trim()];\n    message.cc = [];\n    message.bcc = [];\n  }\n\n  // This is the full payload for the email itself.\n  const mailOptions = {\n    from: finalFromHeader,\n    to: finalToRecipients.join(', '),\n    subject: message.subject,\n    html: message.html,\n    ...(message.text && { text: message.text }),\n    ...(message.cc &&\n      Array.isArray(message.cc) &&\n      message.cc.length > 0 && { cc: message.cc.join(', ') }),\n    ...(message.bcc &&\n      Array.isArray(message.bcc) &&\n      message.bcc.length > 0 && { bcc: message.bcc.join(', ') }),\n    ...(message.attachments && { attachments: message.attachments }),\n    ...(message.replyTo && { replyTo: message.replyTo }),\n    ...(message.headers && { headers: message.headers }),\n  };\n\n  // The job data contains everything the worker needs to send the email.\n  const jobData = { mailOptions, smtpConfig: finalSmtpConfig, callId };\n  emailLogger.debug(\n    `[${callId}] Preparing to add email job to queue \"${EMAIL_QUEUE_NAME}\".`\n  );\n\n  try {\n    const job = await addJob(EMAIL_QUEUE_NAME, SEND_EMAIL_JOB_NAME, jobData, {\n      attempts: 3,\n      backoff: { type: 'exponential', delay: 5000 },\n    });\n    emailLogger.info(\n      `[${callId}] Email job successfully added to queue \"${EMAIL_QUEUE_NAME}\" with Job ID: ${job.id}.`\n    );\n    return job;\n  } catch (queueError) {\n    throw new DaitanOperationError(\n      `Failed to queue email for sending: ${queueError.message}`,\n      { to: message.to },\n      queueError\n    );\n  }\n};\n", "// communication/src/email/templatedMailer.js\n/**\n * @file High-level function for sending pre-defined, templated emails.\n * @module @daitanjs/communication/email/templatedMailer\n *\n * @description\n * This module provides the `sendTemplatedEmail` function, which simplifies sending\n * common types of transactional emails (e.g., welcome, password reset) by abstracting\n * away the HTML generation and assembly process.\n */\nimport { getLogger } from '@daitanjs/development';\nimport {\n  createEmailWrapper,\n  createEmailHeader,\n  createEmailFooter,\n  createHeading,\n  createParagraph,\n  createButton,\n  createAlert,\n} from '@daitanjs/html';\nimport { sendMail } from './nodemailer.js';\nimport {\n  DaitanConfigurationError,\n  DaitanInvalidInputError,\n} from '@daitanjs/error';\n\nconst templatedMailerLogger = getLogger('daitan-templated-mailer');\n\n/**\n * @typedef {Object} WelcomeTemplateData\n * @property {string} name - The recipient's name.\n * @property {string} activationLink - The URL for account activation.\n * @property {string} [companyName] - The name of the company/app sending the email.\n */\n\n/**\n * @typedef {Object} PasswordResetTemplateData\n * @property {string} name - The recipient's name.\n * @property {string} resetLink - The URL for the password reset form.\n * @property {string} [companyName] - The name of the company/app.\n */\n\n/**\n * @typedef {Object} GenericNotificationTemplateData\n * @property {string} name - The recipient's name.\n * @property {string} notificationMessage - The main content of the notification.\n * @property {string} [actionLink] - Optional URL for a call-to-action button.\n * @property {string} [actionText] - Text for the call-to-action button.\n * @property {'info'|'success'|'warning'|'error'} [alertType] - Optional type for an alert box.\n * @property {string} [companyName] - The name of the company/app.\n */\n\n/**\n * @typedef {Object} SendTemplatedEmailParams\n * @property {string} to - The recipient's email address.\n * @property {string} subject - The subject line of the email.\n * @property {'welcome' | 'passwordReset' | 'notification'} templateName - The name of the email template to use.\n * @property {WelcomeTemplateData | PasswordResetTemplateData | GenericNotificationTemplateData} templateData - An object containing the data to populate the template.\n * @property {import('./nodemailer.js').NodemailerMailerConfig} [mailerConfig] - Optional mailer configuration to override defaults.\n */\n\nconst generateWelcomeEmailBody = (data) => {\n  const heading = createHeading({ text: `Welcome, ${data.name}!`, level: 1 });\n  const p1 = createParagraph({\n    text: `We're thrilled to have you on board. We're confident that our platform will help you achieve your goals.`,\n  });\n  const p2 = createParagraph({\n    text: `To get started, please click the button below to activate your account:`,\n  });\n  const button = createButton({\n    text: 'Activate Your Account',\n    href: data.activationLink,\n  });\n  return `${heading}${p1}${p2}<br>${button}`;\n};\n\nconst generatePasswordResetEmailBody = (data) => {\n  const heading = createHeading({ text: `Reset Your Password`, level: 1 });\n  const p1 = createParagraph({\n    text: `Hi ${data.name}, a password reset was requested for your account.`,\n  });\n  const p2 = createParagraph({\n    text: `If you did not request this, you can safely ignore this email. Otherwise, click the button below to set a new password:`,\n  });\n  const button = createButton({ text: 'Reset Password', href: data.resetLink });\n  const p3 = createParagraph({\n    text: `This link is valid for 1 hour.`,\n    fontSize: 12,\n    color: '#888888',\n  });\n  return `${heading}${p1}${p2}<br>${button}<br>${p3}`;\n};\n\nconst generateNotificationEmailBody = (data) => {\n  let content = createHeading({\n    text: `Notification for ${data.name}`,\n    level: 2,\n  });\n  if (data.alertType) {\n    content += createAlert({\n      message: data.notificationMessage,\n      type: data.alertType,\n    });\n  } else {\n    content += createParagraph({ text: data.notificationMessage });\n  }\n  if (data.actionLink && data.actionText) {\n    content += `<br>${createButton({\n      text: data.actionText,\n      href: data.actionLink,\n    })}`;\n  }\n  return content;\n};\n\nconst templates = {\n  welcome: generateWelcomeEmailBody,\n  passwordReset: generatePasswordResetEmailBody,\n  notification: generateNotificationEmailBody,\n};\n\n/**\n * Sends a pre-defined, templated email.\n * @public\n * @async\n * @param {SendTemplatedEmailParams} params - The parameters for the templated email.\n * @returns {Promise<import('bullmq').Job>} The BullMQ Job object that was created.\n */\nexport const sendTemplatedEmail = async ({\n  to,\n  subject,\n  templateName,\n  templateData,\n  mailerConfig = {},\n}) => {\n  const callId = `templated-email-${templateName}-${Date.now().toString(36)}`;\n  templatedMailerLogger.info(`[${callId}] Preparing to send templated email.`, {\n    to,\n    templateName,\n  });\n\n  if (!to || !subject || !templateName || !templateData) {\n    throw new DaitanInvalidInputError(\n      'Missing required parameters: `to`, `subject`, `templateName`, and `templateData` are all required.'\n    );\n  }\n\n  const templateGenerator = templates[templateName];\n  if (!templateGenerator) {\n    throw new DaitanConfigurationError(\n      `Email template \"${templateName}\" not found. Available templates: ${Object.keys(\n        templates\n      ).join(', ')}`\n    );\n  }\n\n  const bodyContent = templateGenerator(templateData);\n  const header = createEmailHeader({ title: subject });\n  const footer = createEmailFooter({\n    companyName: templateData.companyName || 'DaitanJS Platform',\n    address: '123 Innovation Drive, Tech City, 12345',\n  });\n\n  const fullHtmlBody = `<div style=\"padding: 20px;\">${header}${bodyContent}${footer}</div>`;\n  const finalHtml = createEmailWrapper({\n    bodyContent: fullHtmlBody,\n    config: {\n      title: subject,\n      previewText:\n        typeof bodyContent === 'string'\n          ? bodyContent.substring(0, 100)\n          : 'Notification',\n    },\n  });\n\n  return sendMail({\n    message: { to, subject, html: finalHtml },\n    config: mailerConfig,\n  });\n};\n", "// src/communication/src/sms/twilio.js\n/**\n * @file SMS and WhatsApp sending functionalities using Twilio.\n * @module @daitanjs/communication/sms/twilio\n */\nimport twilio from 'twilio';\nimport { getLogger } from '@daitanjs/development';\nimport { getConfigManager } from '@daitanjs/config';\nimport { replacePlaceholders } from '@daitanjs/utilities';\nimport {\n  DaitanConfigurationError,\n  DaitanApiError,\n  DaitanInvalidInputError,\n} from '@daitanjs/error';\n\nconst smsLogger = getLogger('daitan-comm-twilio');\nlet twilioClientInstance = null;\n\n/** @private */\nconst getTwilioClient = () => {\n  if (twilioClientInstance) {\n    return twilioClientInstance;\n  }\n  const configManager = getConfigManager(); // Lazy-load the config manager\n  const accountSid = configManager.get('TWILIO_ACCOUNTSID');\n  const authToken = configManager.get('TWILIO_AUTHTOKEN');\n\n  if (!accountSid || !authToken) {\n    throw new DaitanConfigurationError(\n      'Twilio Account SID and Auth Token must be configured in environment variables (TWILIO_ACCOUNTSID, TWILIO_AUTHTOKEN).'\n    );\n  }\n  twilioClientInstance = twilio(accountSid, authToken);\n  smsLogger.info('Twilio client initialized successfully.');\n  return twilioClientInstance;\n};\n\n/**\n * Sends an SMS message using Twilio.\n * @public\n * @async\n * @param {object} params\n * @param {string} params.recipient - The recipient phone number in E.164 format.\n * @param {string} params.messageBody - The text content of the message.\n * @param {string} [params.from] - Optional: A specific Twilio sender number to use.\n * @returns {Promise<string>} The Twilio Message SID.\n */\nexport async function sendSMS({ recipient, messageBody, from }) {\n  if (!recipient || !/^\\+?[1-9]\\d{1,14}$/.test(recipient)) {\n    throw new DaitanInvalidInputError(\n      'Invalid recipient phone number. Must be in E.164 format.'\n    );\n  }\n  if (!messageBody || typeof messageBody !== 'string' || !messageBody.trim()) {\n    throw new DaitanInvalidInputError('Message body cannot be empty.');\n  }\n  const client = getTwilioClient();\n  const fromNumber = from || getConfigManager().get('TWILIO_SENDER'); // Lazy-load here too\n  if (!fromNumber) {\n    throw new DaitanConfigurationError(\n      'Twilio sender number (TWILIO_SENDER) is not configured.'\n    );\n  }\n\n  try {\n    const message = await client.messages.create({\n      to: recipient,\n      from: fromNumber,\n      body: messageBody,\n    });\n    smsLogger.info(\n      `SMS sent successfully to ${recipient}. SID: ${message.sid}`\n    );\n    return message.sid;\n  } catch (error) {\n    smsLogger.error(`Failed to send SMS to ${recipient}: ${error.message}`);\n    throw new DaitanApiError(\n      `Twilio API error: ${error.message}`,\n      'Twilio',\n      error.status,\n      { apiErrorCode: error.code },\n      error\n    );\n  }\n}\n\n/**\n * Sends a WhatsApp message using Twilio.\n * @public\n * @async\n * @param {object} params\n * @param {string} params.recipient - The recipient phone number in E.164 format.\n * @param {string} params.messageBody - The text content of the message.\n * @param {string} [params.from] - Optional: A specific Twilio WhatsApp sender ID.\n * @returns {Promise<string>} The Twilio Message SID.\n */\nexport async function sendWhatsapp({ recipient, messageBody, from }) {\n  if (!recipient || !/^\\+?[1-9]\\d{1,14}$/.test(recipient)) {\n    throw new DaitanInvalidInputError(\n      'Invalid recipient phone number. Must be in E.164 format.'\n    );\n  }\n  if (!messageBody || typeof messageBody !== 'string' || !messageBody.trim()) {\n    throw new DaitanInvalidInputError('Message body cannot be empty.');\n  }\n  const client = getTwilioClient();\n  const fromNumber = from || getConfigManager().get('TWILIO_WHATSAPP_SENDER'); // Lazy-load here too\n  if (!fromNumber) {\n    throw new DaitanConfigurationError(\n      'Twilio WhatsApp sender ID (TWILIO_WHATSAPP_SENDER) is not configured.'\n    );\n  }\n\n  try {\n    const message = await client.messages.create({\n      to: `whatsapp:${recipient}`,\n      from: fromNumber.startsWith('whatsapp:')\n        ? fromNumber\n        : `whatsapp:${fromNumber}`,\n      body: messageBody,\n    });\n    smsLogger.info(\n      `WhatsApp message sent successfully to ${recipient}. SID: ${message.sid}`\n    );\n    return message.sid;\n  } catch (error) {\n    smsLogger.error(\n      `Failed to send WhatsApp message to ${recipient}: ${error.message}`\n    );\n    throw new DaitanApiError(\n      `Twilio WhatsApp API error: ${error.message}`,\n      'Twilio',\n      error.status,\n      { apiErrorCode: error.code },\n      error\n    );\n  }\n}\n\n/**\n * Creates a template function for composing messages with placeholders.\n * @public\n * @param {string} templateString - The template string with {{placeholder}} syntax.\n * @returns {(placeholders: object) => string} A function that takes a placeholder object and returns the composed message.\n */\nexport const createMessageTemplate = (templateString) => {\n  return (placeholders) =>\n    replacePlaceholders({ templateString, placeholders });\n};\n\n/**\n * Composes a message from a template function and placeholder values.\n * @public\n * @param {(placeholders: object) => string} templateFn - A function created by `createMessageTemplate`.\n * @param {object} placeholders - An object with key-value pairs for the placeholders.\n * @returns {string} The composed message.\n */\nexport const composeMessageFromTemplate = (templateFn, placeholders) => {\n  if (typeof templateFn !== 'function') {\n    throw new DaitanInvalidInputError(\n      'templateFn must be a function created with createMessageTemplate.'\n    );\n  }\n  return templateFn(placeholders);\n};\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA,IAAAA,sBAA0B;AAC1B,IAAAC,oBAAoC;;;AClBpC,yBAAkD;AAClD,o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AAe,YAAY;AACpC,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO,WAAW,YAAY;AAChC;;;AH3IA,IAAM,+BAA2B,+BAAU,4BAA4B;AAEvE,yBAAyB,MAAM,6CAA6C;AAkB5E,yBAAyB,KAAK,8CAA8C;",
  "names": ["import_development", "import_utilities", "import_development", "import_error", "import_development", "import_config", "import_error", "twilio"]
}
