/** * Tool: new_emails * * Creates new Firefox Relay email addresses (masks) for anonymous email management. * Integrates with Firefox Relay API to generate random email forwarders. * * Follows golden-standard programming practices: * - Zod v4 validation for input parameters * - Comprehensive error handling with custom error classes * - Rate limiting and retry logic * - Database persistence with PQC encryption at rest * - Audit logging for security and traceability */ import { z } from 'zod/v4'; import { MCPTool, ToolResult } from '../types'; /** * Schema for validating new_emails tool input */ export declare const NewEmailsInputSchema: z.ZodObject<{ description: z.ZodOptional; enabled: z.ZodDefault>; generatedFor: z.ZodOptional; blockListEmails: z.ZodDefault>; usedOn: z.ZodOptional; count: z.ZodDefault>; }, z.core.$strip>; /** * Type for validated input */ export type NewEmailsInput = z.infer; /** * Response type for a created relay address */ export interface CreatedRelayAddress { id: number; relayId: number; fullAddress: string; address: string; domain: string; description: string; enabled: boolean; generatedFor: string; blockListEmails: boolean; usedOn: string | null; maskType: string; createdAt: string; lastModifiedAt: string; } /** * Response type for the new_emails tool */ export interface NewEmailsResponse { success: boolean; addresses: CreatedRelayAddress[]; count: number; requestId: string; timestamp: string; error?: string; } /** * Custom error for relay address creation failures */ export declare class RelayCreationError extends Error { readonly code: string; readonly details?: Record | undefined; constructor(message: string, code?: string, details?: Record | undefined); } /** * Custom error for validation failures */ export declare class ValidationFailureError extends Error { readonly validationErrors: z.ZodIssue[]; constructor(message: string, validationErrors: z.ZodIssue[]); } /** * Creates new Firefox Relay email addresses * * This function: * 1. Validates input using Zod v4 * 2. Calls Firefox Relay API to create relay addresses * 3. Persists created addresses to the local database * 4. Handles rate limiting and retries * 5. Logs all operations to audit trail * * @param input - Validated input parameters * @param context - MCP tool execution context * @returns Tool result with created addresses */ export declare function newEmailsHandler(input: unknown, context?: Record): Promise; /** * MCP Tool definition for new_emails */ export declare const newEmailsTool: MCPTool; export default newEmailsTool; //# sourceMappingURL=new_emails.d.ts.map