/** * Send Email via Infobip Service * Sends transactional or promotional emails using Infobip Email API v3 * * @see https://www.infobip.com/docs/api/channels/email/send-fully-featured-email */ import type { ServiceOptions } from '@plyaz/types/api'; import type { EndpointsList } from '@/api/endpoints'; import type { FetchResponse } from 'fetchff'; import type { InfobipSendEmailRequest } from '@plyaz/types/api'; /** * Send email via Infobip * Uses endpoint: POST /email/3/send * * @param payload - Email send request payload (multipart/form-data format) * @param options - Optional service options (client override, config overrides) * @returns Promise with InfobipSendEmailResponse * * @example * ```typescript * // Basic text email * const result = await sendInfobipEmail({ * from: 'noreply@example.com', * fromName: 'Example App', * to: 'user@example.com', * subject: 'Welcome!', * text: 'Welcome to our platform', * }); * * // HTML email with tracking * const result = await sendInfobipEmail({ * from: 'noreply@example.com', * to: 'user@example.com', * subject: 'Newsletter', * html: '

Hello!

Check out our latest updates.

', * track: true, * trackClicks: true, * trackOpens: true, * }); * * // Email with attachments and webhook * const result = await sendInfobipEmail({ * from: 'noreply@example.com', * to: 'user@example.com', * subject: 'Your Invoice', * html: '

Please find your invoice attached.

', * attachment: [{ * data: base64FileContent, * name: 'invoice.pdf', * contentType: 'application/pdf', * }], * notifyUrl: 'https://example.com/webhooks/infobip/email', * notifyContentType: 'application/json', * }); * ``` * * @throws {ApiPackageError} When the request fails or validation errors occur */ export declare function sendInfobipEmail(payload: InfobipSendEmailRequest, options?: ServiceOptions): Promise; //# sourceMappingURL=sendEmail.d.ts.map