@haex-space/vault-sdk 4.6.0 → 4.7.0
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-CcNhK76M.d.mts → client-DS-j-fHu.d.mts} +50 -2
- package/dist/{client-DIvNHfx-.d.ts → client-DkVe1o-u.d.ts} +50 -2
- package/dist/index.d.mts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -0
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +45 -0
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +45 -0
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.js +45 -0
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +45 -0
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +45 -0
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +45 -0
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +45 -0
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +45 -0
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -350,6 +350,12 @@ var MAIL_COMMANDS = {
|
|
|
350
350
|
fetchMessage: "extension_mail_fetch_message",
|
|
351
351
|
/** Fetch a single attachment's bytes (base64) by part index */
|
|
352
352
|
fetchAttachment: "extension_mail_fetch_attachment",
|
|
353
|
+
/** Search a mailbox on the server by criteria; answers UIDs, newest first */
|
|
354
|
+
search: "extension_mail_search",
|
|
355
|
+
/** CREATE a mailbox (reports whether it was already there) */
|
|
356
|
+
createMailbox: "extension_mail_create_mailbox",
|
|
357
|
+
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
358
|
+
deleteMessages: "extension_mail_delete_messages",
|
|
353
359
|
/** Set or unset IMAP flags on a UID set */
|
|
354
360
|
setFlags: "extension_mail_set_flags",
|
|
355
361
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -1660,6 +1666,45 @@ var MailAPI = class {
|
|
|
1660
1666
|
partIndex
|
|
1661
1667
|
});
|
|
1662
1668
|
}
|
|
1669
|
+
/**
|
|
1670
|
+
* Search a whole mailbox on the server. Answers the UIDs of the newest `limit` hits (1 to 1000;
|
|
1671
|
+
* all that fit one answer when omitted), newest first, and the number of all hits. Fetch their
|
|
1672
|
+
* envelopes with `fetchEnvelopesAsync` and a `uidList` range.
|
|
1673
|
+
*/
|
|
1674
|
+
async searchMessagesAsync(imap, mailbox, criteria, limit) {
|
|
1675
|
+
return this.client.request(MAIL_COMMANDS.search, {
|
|
1676
|
+
imap,
|
|
1677
|
+
mailbox,
|
|
1678
|
+
criteria,
|
|
1679
|
+
limit
|
|
1680
|
+
});
|
|
1681
|
+
}
|
|
1682
|
+
/**
|
|
1683
|
+
* Create a mailbox. Resolves to `false`, not an error, when it already existed. The name may
|
|
1684
|
+
* contain the server's hierarchy delimiter; `*` and `%` are not allowed.
|
|
1685
|
+
*/
|
|
1686
|
+
async createMailboxAsync(imap, mailbox) {
|
|
1687
|
+
const { created } = await this.client.request(
|
|
1688
|
+
MAIL_COMMANDS.createMailbox,
|
|
1689
|
+
{ imap, mailbox }
|
|
1690
|
+
);
|
|
1691
|
+
return created;
|
|
1692
|
+
}
|
|
1693
|
+
/**
|
|
1694
|
+
* Delete messages for good: flags exactly these UIDs `\Deleted` and expunges exactly them, so
|
|
1695
|
+
* other messages marked `\Deleted` stay. Refused with an error on a server without UIDPLUS,
|
|
1696
|
+
* before anything is marked. If the expunge fails after marking, the messages stay in the
|
|
1697
|
+
* mailbox flagged `\Deleted` and the call rejects; do not show them as deleted. At most 1000 UIDs
|
|
1698
|
+
* per call. For a message that can still be recovered, use `moveMessagesAsync` into the trash
|
|
1699
|
+
* instead.
|
|
1700
|
+
*/
|
|
1701
|
+
async deleteMessagesAsync(imap, mailbox, uids) {
|
|
1702
|
+
return this.client.request(MAIL_COMMANDS.deleteMessages, {
|
|
1703
|
+
imap,
|
|
1704
|
+
mailbox,
|
|
1705
|
+
uids
|
|
1706
|
+
});
|
|
1707
|
+
}
|
|
1663
1708
|
/**
|
|
1664
1709
|
* Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
|
|
1665
1710
|
* mark messages as read; `add=false` removes the flag(s).
|