/** * Send Advanced Email via Infobip Service * Sends transactional or promotional emails using Infobip Advanced Email API v4 * * @see https://www.infobip.com/docs/api/channels/email/send-email-messages */ import type { ServiceOptions } from '@plyaz/types/api'; import type { EndpointsList } from '@/api/endpoints'; import type { FetchResponse } from 'fetchff'; import type { InfobipSendAdvancedEmailRequest } from '@plyaz/types/api'; /** * Send advanced email via Infobip * Uses endpoint: POST /email/4/send * * This is the advanced email API that supports: * - Multiple recipients with per-recipient placeholders * - Proper attachment objects with content, contentType, and fileName * - Inline images * - Webhooks per message * - Advanced tracking options * * @param payload - Advanced email send request payload (JSON format) * @param options - Optional service options (client override, config overrides) * @returns Promise with InfobipSendAdvancedEmailResponse * * @example * ```typescript * // Basic email * const result = await sendInfobipAdvancedEmail({ * messages: [{ * sender: 'noreply@example.com', * destinations: [{ destination: 'user@example.com' }], * content: { * subject: 'Welcome!', * text: 'Welcome to our platform', * }, * }], * }); * * // Email with attachments * const result = await sendInfobipAdvancedEmail({ * messages: [{ * sender: 'noreply@example.com', * destinations: [{ destination: 'user@example.com' }], * content: { * subject: 'Your Invoice', * html: '

Please find your invoice attached.

', * attachments: [{ * type: 'binary', * content: base64FileContent, * contentType: 'application/pdf', * fileName: 'invoice.pdf', * }], * }, * webhooks: { * delivery: { * url: 'https://example.com/webhooks/infobip/email', * }, * }, * }], * }); * ``` * * @throws {ApiPackageError} When the request fails or validation errors occur */ export declare function sendInfobipAdvancedEmail(payload: InfobipSendAdvancedEmailRequest, options?: ServiceOptions): Promise; //# sourceMappingURL=sendAdvancedEmail.d.ts.map