Comparing version 1.0.163 to 1.0.164
# Changelog | ||
## [1.0.164](https://github.com/postalsys/imapflow/compare/v1.0.163...v1.0.164) (2024-07-09) | ||
### Bug Fixes | ||
* **api:** Add fetchAll method ([#207](https://github.com/postalsys/imapflow/issues/207)) ([bc09998](https://github.com/postalsys/imapflow/commit/bc09998270006ea6ff8430b3461619dd9b3e91c8)) | ||
## [1.0.163](https://github.com/postalsys/imapflow/compare/v1.0.162...v1.0.163) (2024-07-06) | ||
@@ -4,0 +11,0 @@ |
@@ -358,3 +358,3 @@ /// <reference types="node" /> | ||
/** | ||
* Delete messages from currently opened mailbox. Method does not indicate info about deleted messages, | ||
* Delete messages from the currently opened mailbox. Method does not indicate info about deleted messages, | ||
* instead you should be using {@link ImapFlow#expunge} event for this | ||
@@ -414,3 +414,3 @@ * @example | ||
/** | ||
* Search messages from currently opened mailbox | ||
* Search messages from the currently opened mailbox | ||
* @example | ||
@@ -436,3 +436,3 @@ * let mailbox = await client.mailboxOpen('INBOX'); | ||
/** | ||
* Fetch messages from currently opened mailbox | ||
* Fetch messages from the currently opened mailbox | ||
* @example | ||
@@ -458,5 +458,30 @@ * let mailbox = await client.mailboxOpen('INBOX'); | ||
/** | ||
* Fetch a single message from currently opened mailbox | ||
* Fetch messages from the currently opened mailbox. | ||
* | ||
* This method will fetch all messages before resolving the promise, unlike .fetch(), which | ||
* is an async generator. Do not use large ranges like 1:*, as this might exhaust all available | ||
* memory if the mailbox contains a large number of emails. | ||
* @example | ||
* let mailbox = await client.mailboxOpen('INBOX'); | ||
* // fetch UID for all messages in a mailbox | ||
* const messages = await client.fetchAll('1:*', {uid: true}); | ||
* for (let msg of messages){ | ||
* console.log(msg.uid); | ||
* } | ||
* @param range - Range of messages to fetch | ||
* @param query - Fetch query | ||
* @param [options.uid] - If `true` then uses UID numbers instead of sequence numbers for `range` | ||
* @param [options.changedSince] - If set then only messages with a higher modseq value are returned. Ignored if server does not support `CONDSTORE` extension. | ||
* @param [options.binary = false] - If `true` then requests a binary response if the server supports this | ||
* @returns Array of Message data object | ||
*/ | ||
fetchAll(range: SequenceString | Number[] | SearchObject, query: FetchQueryObject, options?: { | ||
uid?: boolean; | ||
changedSince?: bigint; | ||
binary?: boolean; | ||
}): Promise<FetchMessageObject[]>; | ||
/** | ||
* Fetch a single message from the currently opened mailbox | ||
* @example | ||
* let mailbox = await client.mailboxOpen('INBOX'); | ||
* // fetch UID for the last email in the selected mailbox | ||
@@ -463,0 +488,0 @@ * let lastMsg = await client.fetchOne('*', {uid: true}) |
{ | ||
"name": "imapflow", | ||
"version": "1.0.163", | ||
"version": "1.0.164", | ||
"description": "IMAP Client for Node", | ||
@@ -5,0 +5,0 @@ "main": "./lib/imap-flow.js", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
590981
12855