@qwanyx/stack 0.2.13 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84,9 +84,9 @@ export declare class MailClient {
84
84
  */
85
85
  listEmailsSorted(accountId: string, folder?: string, limit?: number): Promise<MailListResult>;
86
86
  /**
87
- * Get a single email by UID with full body content
87
+ * Get a single email by UID with full body content (server-side parsing)
88
88
  */
89
- getEmail(accountId: string, uid: number): Promise<{
89
+ getEmail(accountId: string, uid: number, folder?: string): Promise<{
90
90
  uid: number;
91
91
  from: string;
92
92
  subject: string;
@@ -94,6 +94,33 @@ export declare class MailClient {
94
94
  body: string;
95
95
  seen: boolean;
96
96
  } | null>;
97
+ /**
98
+ * Get email with client-side parsing using postal-mime
99
+ * This handles CID embedded images by converting them to base64 data URIs
100
+ */
101
+ getEmailParsed(accountId: string, uid: number, folder?: string): Promise<{
102
+ uid: number;
103
+ from: string;
104
+ subject: string;
105
+ date: string;
106
+ body: string;
107
+ html: string;
108
+ text: string;
109
+ seen: boolean;
110
+ attachments: Array<{
111
+ filename: string;
112
+ mimeType: string;
113
+ size: number;
114
+ }>;
115
+ } | null>;
116
+ /**
117
+ * Convert content (string | ArrayBuffer | Uint8Array) to base64 string
118
+ */
119
+ private contentToBase64;
120
+ /**
121
+ * Get size of content (string | ArrayBuffer | Uint8Array)
122
+ */
123
+ private getContentSize;
97
124
  /**
98
125
  * Send an email via SMTP
99
126
  * Uses the email coprocessor which handles SMTP configuration