@qwanyx/stack 0.2.68 → 0.2.69
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.
- package/dist/client/MailClient.d.ts +26 -0
- package/dist/index.cjs.js +32 -32
- package/dist/index.esm.js +30 -0
- package/package.json +1 -1
|
@@ -150,6 +150,32 @@ export declare class MailClient {
|
|
|
150
150
|
size: number;
|
|
151
151
|
}>;
|
|
152
152
|
} | null>;
|
|
153
|
+
/**
|
|
154
|
+
* Find an email in All Mail by Message-ID or FROM+SUBJECT
|
|
155
|
+
* Useful for finding archived/moved emails when UID is stale
|
|
156
|
+
*
|
|
157
|
+
* @param accountId - The account to search in
|
|
158
|
+
* @param criteria - Search criteria (message_id takes precedence, then from+subject)
|
|
159
|
+
* @returns The found email or null
|
|
160
|
+
*/
|
|
161
|
+
findEmailInAllMail(accountId: string, criteria: {
|
|
162
|
+
message_id?: string;
|
|
163
|
+
from?: string;
|
|
164
|
+
subject?: string;
|
|
165
|
+
folder?: string;
|
|
166
|
+
}): Promise<{
|
|
167
|
+
found: boolean;
|
|
168
|
+
email?: {
|
|
169
|
+
uid: number;
|
|
170
|
+
message_id?: string;
|
|
171
|
+
subject: string;
|
|
172
|
+
from: string;
|
|
173
|
+
to: string;
|
|
174
|
+
date: string;
|
|
175
|
+
body: string;
|
|
176
|
+
has_attachments: boolean;
|
|
177
|
+
};
|
|
178
|
+
}>;
|
|
153
179
|
/**
|
|
154
180
|
* Convert content (string | ArrayBuffer | Uint8Array) to base64 string
|
|
155
181
|
*/
|