import { z } from 'zod'; import { ServiceBubble } from '../../types/service-bubble-class.js'; import type { BubbleContext } from '../../types/bubble.js'; import { CredentialType } from '@bubblelab/shared-schemas'; declare const ResendParamsSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{ from: z.ZodDefault; to: z.ZodUnion<[z.ZodString, z.ZodArray]>; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; subject: z.ZodString; text: z.ZodOptional; html: z.ZodOptional; reply_to: z.ZodOptional]>>; tags: z.ZodOptional, "many">>; headers: z.ZodOptional>; } & { operation: z.ZodLiteral<"send_email">; scheduled_at: z.ZodOptional; attachments: z.ZodOptional; contentType: z.ZodOptional; path: z.ZodOptional; }, "strip", z.ZodTypeAny, { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }, { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }>, "many">>; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "send_email"; from: string; to: string | string[]; subject: string; credentials?: Partial> | undefined; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; attachments?: { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }[] | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; scheduled_at?: string | undefined; }, { operation: "send_email"; to: string | string[]; subject: string; credentials?: Partial> | undefined; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; attachments?: { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }[] | undefined; from?: string | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; scheduled_at?: string | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"send_batch_emails">; emails: z.ZodArray; to: z.ZodUnion<[z.ZodString, z.ZodArray]>; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; subject: z.ZodString; text: z.ZodOptional; html: z.ZodOptional; reply_to: z.ZodOptional]>>; tags: z.ZodOptional, "many">>; headers: z.ZodOptional>; }, "strip", z.ZodTypeAny, { from: string; to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }, { to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; from?: string | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }>, "many">; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "send_batch_emails"; emails: { from: string; to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }[]; credentials?: Partial> | undefined; }, { operation: "send_batch_emails"; emails: { to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; from?: string | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }[]; credentials?: Partial> | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"get_email_status">; email_id: z.ZodString; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "get_email_status"; email_id: string; credentials?: Partial> | undefined; }, { operation: "get_email_status"; email_id: string; credentials?: Partial> | undefined; }>]>; declare const ResendResultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{ operation: z.ZodLiteral<"send_email">; success: z.ZodBoolean; email_id: z.ZodOptional; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "send_email"; email_id?: string | undefined; }, { error: string; success: boolean; operation: "send_email"; email_id?: string | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"send_batch_emails">; success: z.ZodBoolean; email_ids: z.ZodOptional>; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "send_batch_emails"; email_ids?: string[] | undefined; }, { error: string; success: boolean; operation: "send_batch_emails"; email_ids?: string[] | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"get_email_status">; success: z.ZodBoolean; status: z.ZodOptional; created_at: z.ZodOptional; last_event: z.ZodOptional; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "get_email_status"; status?: string | undefined; created_at?: string | undefined; last_event?: string | undefined; }, { error: string; success: boolean; operation: "get_email_status"; status?: string | undefined; created_at?: string | undefined; last_event?: string | undefined; }>]>; type ResendResult = z.output; type ResendParams = z.input; export type ResendOperationResult = Extract; export declare class ResendBubble extends ServiceBubble> { static readonly type: "service"; static readonly service = "resend"; static readonly authType: "apikey"; static readonly bubbleName = "resend"; static readonly schema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{ from: z.ZodDefault; to: z.ZodUnion<[z.ZodString, z.ZodArray]>; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; subject: z.ZodString; text: z.ZodOptional; html: z.ZodOptional; reply_to: z.ZodOptional]>>; tags: z.ZodOptional, "many">>; headers: z.ZodOptional>; } & { operation: z.ZodLiteral<"send_email">; scheduled_at: z.ZodOptional; attachments: z.ZodOptional; contentType: z.ZodOptional; path: z.ZodOptional; }, "strip", z.ZodTypeAny, { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }, { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }>, "many">>; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "send_email"; from: string; to: string | string[]; subject: string; credentials?: Partial> | undefined; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; attachments?: { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }[] | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; scheduled_at?: string | undefined; }, { operation: "send_email"; to: string | string[]; subject: string; credentials?: Partial> | undefined; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; attachments?: { filename: string; path?: string | undefined; content?: string | undefined; contentType?: string | undefined; }[] | undefined; from?: string | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; scheduled_at?: string | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"send_batch_emails">; emails: z.ZodArray; to: z.ZodUnion<[z.ZodString, z.ZodArray]>; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; subject: z.ZodString; text: z.ZodOptional; html: z.ZodOptional; reply_to: z.ZodOptional]>>; tags: z.ZodOptional, "many">>; headers: z.ZodOptional>; }, "strip", z.ZodTypeAny, { from: string; to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }, { to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; from?: string | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }>, "many">; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "send_batch_emails"; emails: { from: string; to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }[]; credentials?: Partial> | undefined; }, { operation: "send_batch_emails"; emails: { to: string | string[]; subject: string; text?: string | undefined; tags?: { value: string; name: string; }[] | undefined; headers?: Record | undefined; from?: string | undefined; cc?: string | string[] | undefined; bcc?: string | string[] | undefined; html?: string | undefined; reply_to?: string | string[] | undefined; }[]; credentials?: Partial> | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"get_email_status">; email_id: z.ZodString; credentials: z.ZodOptional, z.ZodString>>; }, "strip", z.ZodTypeAny, { operation: "get_email_status"; email_id: string; credentials?: Partial> | undefined; }, { operation: "get_email_status"; email_id: string; credentials?: Partial> | undefined; }>]>; static readonly resultSchema: z.ZodDiscriminatedUnion<"operation", [z.ZodObject<{ operation: z.ZodLiteral<"send_email">; success: z.ZodBoolean; email_id: z.ZodOptional; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "send_email"; email_id?: string | undefined; }, { error: string; success: boolean; operation: "send_email"; email_id?: string | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"send_batch_emails">; success: z.ZodBoolean; email_ids: z.ZodOptional>; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "send_batch_emails"; email_ids?: string[] | undefined; }, { error: string; success: boolean; operation: "send_batch_emails"; email_ids?: string[] | undefined; }>, z.ZodObject<{ operation: z.ZodLiteral<"get_email_status">; success: z.ZodBoolean; status: z.ZodOptional; created_at: z.ZodOptional; last_event: z.ZodOptional; error: z.ZodString; }, "strip", z.ZodTypeAny, { error: string; success: boolean; operation: "get_email_status"; status?: string | undefined; created_at?: string | undefined; last_event?: string | undefined; }, { error: string; success: boolean; operation: "get_email_status"; status?: string | undefined; created_at?: string | undefined; last_event?: string | undefined; }>]>; static readonly shortDescription = "Email sending service via Resend API"; static readonly longDescription = "\n Resend email service integration for sending transactional emails.\n Use cases:\n - Send transactional emails with HTML and text content\n - Track email delivery status and metrics\n - Manage email attachments and custom headers\n \n Security Features:\n - API key-based authentication\n - Email address validation\n - Domain enforcement for user credentials (validates that sender domain is verified in Resend)\n - System credentials (bubblelab.ai domain) skip domain validation\n - Content sanitization\n - Rate limiting awareness\n "; static readonly alias = "resend"; private resend?; private verifiedDomains?; constructor(params?: T, context?: BubbleContext); /** * Extracts the domain from an email address. * Handles both formats: "Name " and "email@domain.com" */ private extractDomainFromEmail; /** * Checks if the email domain is a system domain (BubbleLab's default domain). * System credentials use bubblelab.ai domain and should skip domain validation. */ private isSystemDomain; /** * Fetches and caches the list of verified domains from Resend API */ private getVerifiedDomains; /** * Validates that the from email domain is verified in Resend. * Skips validation for system domains (bubblelab.ai) as they use system credentials. * Only enforces validation for user-provided credentials. */ private validateFromDomain; testCredential(): Promise; protected performAction(context?: BubbleContext): Promise>; private sendEmail; private sendBatchEmails; private getEmailStatus; protected chooseCredential(): string | undefined; } export {}; //# sourceMappingURL=resend.d.ts.map