import { z } from 'zod'; /** * Hosted email (remote connections only). A mailbox belongs to the agent's immutable id; * addresses can be renamed by a human operator without moving any mail. Sending is a * capability an operator grants per agent, with rate limits and an audit trail on the server. */ export declare const EMAIL_FOLDERS: readonly ["inbox", "sent", "drafts", "spam", "archive", "trash"]; export type EmailFolder = (typeof EMAIL_FOLDERS)[number]; export interface EmailParty { address: string; name?: string; } export interface EmailMessageSummary { id: string; folder: EmailFolder; direction: 'inbound' | 'outbound'; threadId: string; from: EmailParty | null; to: EmailParty[]; cc: EmailParty[]; subject: string; snippet: string; seen: boolean; flagged: boolean; attachmentCount: number; deliveryStatus?: string | null; spamScore?: number; date: string; } export interface EmailMessage extends EmailMessageSummary { bcc: EmailParty[]; replyTo: EmailParty[]; mailboxAddress: string | null; messageIdHeader: string | null; inReplyTo: string | null; references: string[]; text: string; html?: string; hasHtml: boolean; attachments: { index: number; filename: string; contentType: string; size: number; inline: boolean; }[]; authentication?: Record; delivery?: Record; queueId?: string | null; sizeBytes: number; untrustedContent: boolean; } export interface EmailMessagePage { messages: EmailMessageSummary[]; nextCursor?: string; } export interface EmailAttachmentContent { index: number; filename: string; contentType: string; size: number; inline: boolean; contentBase64: string; } export interface EmailMailbox { id: string; agentId: string; status: 'active' | 'disabled'; primaryAddress: string | null; addresses: { id: string; address: string; displayName: string | null; kind: 'default' | 'chosen'; primary: boolean; status: 'active' | 'retired'; }[]; sending: { policy: 'off' | 'internal' | 'external'; suspended: boolean; suspendedReason: string | null; organizationOutboundEnabled: boolean; deploymentOutboundEnabled: boolean; limits: { hourly: number; daily: number; maxRecipientsPerMessage: number; newExternalRecipientsPerDay: number; }; usage: { lastHour: number; lastDay: number; newExternalRecipientsLastDay: number; }; }; folders: Record; /** Sent mail from the last 7 days that bounced or is still being retried. */ recentDeliveryFailures?: { messageId: string; threadId: string; subject: string; deliveryStatus: string; sentAt: string | null; recipients: { address: string; status: string; dsn: string | null; detail: string | null; at: string | null; }[]; }[]; } export declare const emailListSchema: z.ZodObject<{ folder: z.ZodOptional>; unread: z.ZodOptional; flagged: z.ZodOptional; from: z.ZodOptional; since: z.ZodOptional; before: z.ZodOptional; limit: z.ZodOptional; cursor: z.ZodOptional; }, z.core.$strict>; export type EmailListInput = z.infer & { q?: string; threadId?: string; }; export declare const emailSearchSchema: z.ZodObject<{ query: z.ZodString; folder: z.ZodOptional>; limit: z.ZodOptional; cursor: z.ZodOptional; }, z.core.$strict>; export declare const emailReadSchema: z.ZodObject<{ messageId: z.ZodString; includeHtml: z.ZodOptional; markSeen: z.ZodOptional; }, z.core.$strict>; export declare const emailThreadSchema: z.ZodObject<{ threadId: z.ZodString; }, z.core.$strict>; export declare const emailAttachmentSchema: z.ZodObject<{ messageId: z.ZodString; index: z.ZodNumber; }, z.core.$strict>; export declare const emailSendSchema: z.ZodObject<{ attachments: z.ZodOptional; contentBase64: z.ZodString; }, z.core.$strict>>>; fromAddress: z.ZodOptional; idempotencyKey: z.ZodOptional; text: z.ZodOptional; html: z.ZodOptional; to: z.ZodUnion]>; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; subject: z.ZodString; }, z.core.$strict>; export type EmailComposeInput = z.infer; export declare const emailReplySchema: z.ZodObject<{ messageId: z.ZodString; text: z.ZodString; html: z.ZodOptional; replyAll: z.ZodOptional; quote: z.ZodOptional; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; attachments: z.ZodOptional; contentBase64: z.ZodString; }, z.core.$strict>>>; fromAddress: z.ZodOptional; idempotencyKey: z.ZodOptional; }, z.core.$strict>; export type EmailReplyInput = z.infer; export declare const emailForwardSchema: z.ZodObject<{ messageId: z.ZodString; to: z.ZodUnion]>; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; text: z.ZodOptional; includeAttachments: z.ZodOptional; fromAddress: z.ZodOptional; idempotencyKey: z.ZodOptional; }, z.core.$strict>; export type EmailForwardInput = z.infer; export declare const emailDraftSchema: z.ZodObject<{ replyToMessageId: z.ZodOptional; replyAll: z.ZodOptional; fromAddress: z.ZodOptional; text: z.ZodOptional; html: z.ZodOptional; draftId: z.ZodOptional; to: z.ZodOptional]>>; cc: z.ZodOptional]>>; bcc: z.ZodOptional]>>; subject: z.ZodOptional; }, z.core.$strict>; export type EmailDraftInput = z.infer; export declare const emailDraftSendSchema: z.ZodObject<{ draftId: z.ZodString; }, z.core.$strict>; export declare const emailMoveSchema: z.ZodObject<{ messageId: z.ZodString; folder: z.ZodEnum<{ inbox: "inbox"; archive: "archive"; spam: "spam"; trash: "trash"; }>; }, z.core.$strict>; export declare const emailMarkSchema: z.ZodObject<{ messageId: z.ZodString; seen: z.ZodOptional; flagged: z.ZodOptional; }, z.core.$strict>; export declare const emailDeleteSchema: z.ZodObject<{ messageId: z.ZodString; }, z.core.$strict>; export declare const emailAuditSchema: z.ZodObject<{ limit: z.ZodOptional; cursor: z.ZodOptional; }, z.core.$strict>; //# sourceMappingURL=email.d.ts.map