@haex-space/vault-sdk 3.3.0 → 3.4.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/vue.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { H as HaexVaultSdk, S as StorageAPI } from './client-BW3ayV19.mjs';
1
+ import { H as HaexVaultSdk, S as StorageAPI } from './client-C9FyPkqp.mjs';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
3
  import { Ref } from 'vue';
4
4
  import { H as HaexHubConfig } from './types-fHuxbqa4.mjs';
package/dist/vue.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { H as HaexVaultSdk, S as StorageAPI } from './client-Cm23j1wm.js';
1
+ import { H as HaexVaultSdk, S as StorageAPI } from './client--_QYySP0.js';
2
2
  import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
3
3
  import { Ref } from 'vue';
4
4
  import { H as HaexHubConfig } from './types-fHuxbqa4.js';
package/dist/vue.js CHANGED
@@ -680,6 +680,8 @@ var MAIL_COMMANDS = {
680
680
  fetchEnvelopes: "extension_mail_fetch_envelopes",
681
681
  /** Full message fetch (envelope + body + attachment metadata) */
682
682
  fetchMessage: "extension_mail_fetch_message",
683
+ /** Fetch a single attachment's bytes (base64) by part index */
684
+ fetchAttachment: "extension_mail_fetch_attachment",
683
685
  /** Set or unset IMAP flags on a UID set */
684
686
  setFlags: "extension_mail_set_flags",
685
687
  /** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
@@ -1719,6 +1721,21 @@ var MailAPI = class {
1719
1721
  uid
1720
1722
  });
1721
1723
  }
1724
+ /**
1725
+ * Fetch a single attachment's raw bytes by its `partIndex` (from the
1726
+ * `attachments` array of a fetched `MailMessage`), returned as a
1727
+ * standard-alphabet base64 string. The base64 form drops straight into
1728
+ * `OutgoingAttachment.data` when forwarding, and decodes to bytes for
1729
+ * viewing or downloading.
1730
+ */
1731
+ async fetchAttachmentAsync(imap, mailbox, uid, partIndex) {
1732
+ return this.client.request(MAIL_COMMANDS.fetchAttachment, {
1733
+ imap,
1734
+ mailbox,
1735
+ uid,
1736
+ partIndex
1737
+ });
1738
+ }
1722
1739
  /**
1723
1740
  * Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
1724
1741
  * mark messages as read; `add=false` removes the flag(s).