Pydantic models representing email attachments, summaries, and request/response schemas for a mail interface.
# Source: https://github.com/Upsonic/Upsonic | License: MIT | Copyright 2024 Upsonic Teknoloji A.Ş
# Provided via justclaw.it.com; keep this notice with the code.
"""
Schemas for Mail (SMTP/IMAP) Interface Integration.
This module contains Pydantic models for the generic mail interface.
"""
from typing import List, Literal, Optional, Union
from pydantic import BaseModel, Field
class AttachmentInfo(BaseModel):
"""Metadata for an email attachment."""
filename: str = Field(..., description="Name of the attached file")
content_type: str = Field(..., description="MIME type of the attachment")
size: int = Field(..., description="Size in bytes")
class EmailSummary(BaseModel):
"""Summary of a single email message."""
uid: str = Field(..., description="Unique identifie
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key