Expand description
Core types for pidge: accounts, configuration, and the normalized message model.
This crate is intentionally provider-agnostic — it knows nothing about HTTP,
Microsoft Graph, or authentication. Those concerns live in pidge-client.
Re-exports§
pub use contacts::Contact;pub use contacts::ContactSource;pub use contacts::ContactsCache;
Modules§
- availability
- Free-slot computation over a busy list within working hours.
- contacts
- Local name → email index built from the user’s own mail and calendar.
- flags
- Cheap facts about a list item that a harness can triage on. No ranking.
- render
- Text rendering shared by the CLI and the MCP server: HTML → text and quoted-history stripping. Pure functions, no terminal assumptions.
- timerange
- Time-range parsing in the user’s local timezone.
Structs§
- Account
- A signed-in Microsoft account.
- Attachment
- An attachment listed on a message. Bytes are NOT included — fetch separately
via
GraphClient::get_attachment_bytes(account, message_id, attachment.id). - Attendee
- Cached
Event Ref - Cached pointer to a Microsoft Graph event. Keyed in the cache by
short_hash("{account}|{event_id}")so the same event ID under different signed-in accounts gets distinct hashes. - Cached
Message Ref - Calendar
- Config
- Defaults
- Event
- Event
Cache - Event
Time - A calendar instant.
atis the canonical UTC time;tzis the IANA zone the event was scheduled in (e.g."Europe/Stockholm"). Display layers honourtzso a Stockholm-scheduled meeting still says “10:00 Stockholm” when read from a laptop in Sydney. - Full
Message - Full message content as returned by
GraphClient::get_message. Compared toMessage(the list-row shape), this carries full body, all recipient lists, sent/received timestamps, and ahas_attachmentsflag for triggering the attachment fetch. - Message
- One message in a mailbox, as presented to commands and output formatters.
- Message
Cache - Message
From - Recurrence
Pattern
Enums§
- Attendee
Kind - Body
Content Type - Cache
Lookup - Result of looking up a fragment against the cache.
- Core
Error - Flag
Status - Outlook’s follow-up flag state on a message. Three values to match what
Graph returns; the CLI currently only sets
Flagged/NotFlagged, but it reads and displays all three so a flag a user completed in Outlook shows up correctly here. - Fragment
Error - Typed fragment-resolution failure, used for exit-code classification (agents get exit 4 + a machine-readable code instead of prose-only).
- Recurrence
Freq - Recurrence
Range - Response
Status - Token
Storage - Where pidge stores OAuth tokens for an account.
- Weekday
Functions§
- short_
hash - Compute the 8-char hex short hash for a Graph ID. Deterministic: same input -> same output. Stable across pidge runs and machines.