Skip to content

feat: email attachments#188

Merged
felipefreitag merged 3 commits intomainfrom
feat-email-attachments
Apr 9, 2026
Merged

feat: email attachments#188
felipefreitag merged 3 commits intomainfrom
feat-email-attachments

Conversation

@felipefreitag
Copy link
Copy Markdown
Contributor

@felipefreitag felipefreitag commented Apr 8, 2026

Support outbound email attachments endpoints
Add interactivity to inbound emails attachments


Summary by cubic

Adds outbound email attachment list/get commands and makes inbound attachment retrieval interactive. Users can browse and download attachments via signed URLs.

  • New Features

    • Outbound: resend emails attachments (list) and resend emails attachment (get). Prompts for email/attachment if omitted; list supports --limit, --after, --before; shows signed download_url with expiry.
    • Inbound: resend emails receiving attachment now accepts optional email and attachment IDs with interactive pickers and prints the same metadata as outbound.
  • Refactors

    • Moved renderAttachmentsTable and shared pickers to src/commands/emails/utils.ts; added receivedAttachmentPickerConfig; receiving list now uses the shared table.
    • Standardized on runGet/runList, registered new commands in the emails index, and added tests for outbound list/get.
    • Fixed attachment error tests to spy on console.error instead of console.log.

Written for commit a9f7ed7. Summary will update on new commits.

@felipefreitag felipefreitag requested a review from vcapretz April 8, 2026 20:21
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 9 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/emails/attachment.ts">

<violation number="1" location="src/commands/emails/attachment.ts:8">
P3: This command duplicates the inbound attachment command almost line-for-line. Consider extracting a shared helper for the attachment fetch/output formatting to avoid future drift when one side changes.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

Comment thread src/commands/emails/attachment.ts
Add list/get subcommands for outbound email attachments, mirroring the
existing receiving (inbound) attachment commands. Move shared
renderAttachmentsTable to emails/utils.ts for reuse across both.
Make receiving attachment command symmetrical with outbound: both
emailId and attachmentId are now optional with interactive pickers.
Add receivedAttachmentPickerConfig to receiving/utils.ts.
@felipefreitag felipefreitag force-pushed the feat-email-attachments branch from d958946 to 7ecc75a Compare April 9, 2026 19:06
…tests

outputError() writes to console.error, so the error test spies were
capturing nothing.
@felipefreitag felipefreitag merged commit 3833d7a into main Apr 9, 2026
8 checks passed
@felipefreitag felipefreitag deleted the feat-email-attachments branch April 9, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants