@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
package/dist/index.mjs
CHANGED
|
@@ -1217,6 +1217,12 @@ var MAIL_COMMANDS = {
|
|
|
1217
1217
|
fetchMessage: "extension_mail_fetch_message",
|
|
1218
1218
|
/** Fetch a single attachment's bytes (base64) by part index */
|
|
1219
1219
|
fetchAttachment: "extension_mail_fetch_attachment",
|
|
1220
|
+
/** Search a mailbox on the server by criteria; answers UIDs, newest first */
|
|
1221
|
+
search: "extension_mail_search",
|
|
1222
|
+
/** CREATE a mailbox (reports whether it was already there) */
|
|
1223
|
+
createMailbox: "extension_mail_create_mailbox",
|
|
1224
|
+
/** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
|
|
1225
|
+
deleteMessages: "extension_mail_delete_messages",
|
|
1220
1226
|
/** Set or unset IMAP flags on a UID set */
|
|
1221
1227
|
setFlags: "extension_mail_set_flags",
|
|
1222
1228
|
/** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
|
|
@@ -2548,6 +2554,45 @@ var MailAPI = class {
|
|
|
2548
2554
|
partIndex
|
|
2549
2555
|
});
|
|
2550
2556
|
}
|
|
2557
|
+
/**
|
|
2558
|
+
* Search a whole mailbox on the server. Answers the UIDs of the newest `limit` hits (1 to 1000;
|
|
2559
|
+
* all that fit one answer when omitted), newest first, and the number of all hits. Fetch their
|
|
2560
|
+
* envelopes with `fetchEnvelopesAsync` and a `uidList` range.
|
|
2561
|
+
*/
|
|
2562
|
+
async searchMessagesAsync(imap, mailbox, criteria, limit) {
|
|
2563
|
+
return this.client.request(MAIL_COMMANDS.search, {
|
|
2564
|
+
imap,
|
|
2565
|
+
mailbox,
|
|
2566
|
+
criteria,
|
|
2567
|
+
limit
|
|
2568
|
+
});
|
|
2569
|
+
}
|
|
2570
|
+
/**
|
|
2571
|
+
* Create a mailbox. Resolves to `false`, not an error, when it already existed. The name may
|
|
2572
|
+
* contain the server's hierarchy delimiter; `*` and `%` are not allowed.
|
|
2573
|
+
*/
|
|
2574
|
+
async createMailboxAsync(imap, mailbox) {
|
|
2575
|
+
const { created } = await this.client.request(
|
|
2576
|
+
MAIL_COMMANDS.createMailbox,
|
|
2577
|
+
{ imap, mailbox }
|
|
2578
|
+
);
|
|
2579
|
+
return created;
|
|
2580
|
+
}
|
|
2581
|
+
/**
|
|
2582
|
+
* Delete messages for good: flags exactly these UIDs `\Deleted` and expunges exactly them, so
|
|
2583
|
+
* other messages marked `\Deleted` stay. Refused with an error on a server without UIDPLUS,
|
|
2584
|
+
* before anything is marked. If the expunge fails after marking, the messages stay in the
|
|
2585
|
+
* mailbox flagged `\Deleted` and the call rejects; do not show them as deleted. At most 1000 UIDs
|
|
2586
|
+
* per call. For a message that can still be recovered, use `moveMessagesAsync` into the trash
|
|
2587
|
+
* instead.
|
|
2588
|
+
*/
|
|
2589
|
+
async deleteMessagesAsync(imap, mailbox, uids) {
|
|
2590
|
+
return this.client.request(MAIL_COMMANDS.deleteMessages, {
|
|
2591
|
+
imap,
|
|
2592
|
+
mailbox,
|
|
2593
|
+
uids
|
|
2594
|
+
});
|
|
2595
|
+
}
|
|
2551
2596
|
/**
|
|
2552
2597
|
* Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
|
|
2553
2598
|
* mark messages as read; `add=false` removes the flag(s).
|