@bobfrankston/iflow 1.0.49 → 1.0.50
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/imaplib/imap-compat.d.ts
CHANGED
|
@@ -49,6 +49,10 @@ export declare class CompatImapClient {
|
|
|
49
49
|
getMessagesCount(mailbox: string): Promise<number>;
|
|
50
50
|
/** Get all UIDs in a mailbox */
|
|
51
51
|
getUids(mailbox: string): Promise<number[]>;
|
|
52
|
+
/** Fetch messages by UID range string (e.g. "100,200,300" or "100:200") */
|
|
53
|
+
fetchMessages(mailbox: string, uidRange: string, options?: {
|
|
54
|
+
source?: boolean;
|
|
55
|
+
}): Promise<any[]>;
|
|
52
56
|
/** Search messages in a mailbox */
|
|
53
57
|
searchMessages(mailbox: string, criteria: any): Promise<number[]>;
|
|
54
58
|
/** Delete a message by UID */
|
package/imaplib/imap-compat.js
CHANGED
|
@@ -131,6 +131,14 @@ export class CompatImapClient {
|
|
|
131
131
|
await this.native.closeMailbox();
|
|
132
132
|
return uids;
|
|
133
133
|
}
|
|
134
|
+
/** Fetch messages by UID range string (e.g. "100,200,300" or "100:200") */
|
|
135
|
+
async fetchMessages(mailbox, uidRange, options) {
|
|
136
|
+
await this.ensureConnected();
|
|
137
|
+
await this.native.select(mailbox);
|
|
138
|
+
const msgs = await this.native.fetchMessages(uidRange, options);
|
|
139
|
+
await this.native.closeMailbox();
|
|
140
|
+
return msgs.map(toCompatMessage);
|
|
141
|
+
}
|
|
134
142
|
/** Search messages in a mailbox */
|
|
135
143
|
async searchMessages(mailbox, criteria) {
|
|
136
144
|
await this.ensureConnected();
|