@haex-space/vault-sdk 5.4.2 → 5.5.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/index.mjs CHANGED
@@ -1264,6 +1264,10 @@ var MAIL_COMMANDS = {
1264
1264
  search: "extension_mail_search",
1265
1265
  /** CREATE a mailbox (reports whether it was already there) */
1266
1266
  createMailbox: "extension_mail_create_mailbox",
1267
+ /** DELETE a mailbox (never INBOX) */
1268
+ deleteMailbox: "extension_mail_delete_mailbox",
1269
+ /** RENAME a mailbox (never INBOX) */
1270
+ renameMailbox: "extension_mail_rename_mailbox",
1267
1271
  /** Delete messages for good: `\Deleted` plus UID EXPUNGE of exactly those UIDs */
1268
1272
  deleteMessages: "extension_mail_delete_messages",
1269
1273
  /** Set or unset IMAP flags on a UID set */
@@ -2819,6 +2823,25 @@ var MailAPI = class {
2819
2823
  );
2820
2824
  return created;
2821
2825
  }
2826
+ /**
2827
+ * Delete a mailbox. `mailbox` is the IMAP-encoded name (modified UTF-7), like in every other
2828
+ * call. `INBOX` can be neither deleted nor renamed; the host refuses it. Whether the mailbox's
2829
+ * messages and child mailboxes go with it, and whether a missing mailbox is an error, is up to
2830
+ * the server. Needs the same `fetch` permission as the other IMAP calls.
2831
+ */
2832
+ async deleteMailboxAsync(imap, mailbox) {
2833
+ return this.client.request(MAIL_COMMANDS.deleteMailbox, { imap, mailbox });
2834
+ }
2835
+ /**
2836
+ * Rename a mailbox from `from` to `to`, both IMAP-encoded names (modified UTF-7). `to` may
2837
+ * contain the server's hierarchy delimiter to move the mailbox in the tree; `*` and `%` are not
2838
+ * allowed. `INBOX` can be neither deleted nor renamed; the host refuses it. Whether child
2839
+ * mailboxes follow and whether an existing `to` is an error is up to the server. Needs the same
2840
+ * `fetch` permission as the other IMAP calls.
2841
+ */
2842
+ async renameMailboxAsync(imap, from, to) {
2843
+ return this.client.request(MAIL_COMMANDS.renameMailbox, { imap, from, to });
2844
+ }
2822
2845
  /**
2823
2846
  * Delete messages for good: flags exactly these UIDs `\Deleted` and expunges exactly them, so
2824
2847
  * other messages marked `\Deleted` stay. Refused with an error on a server without UIDPLUS,