@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.
@@ -1,6 +1,6 @@
1
1
  import * as nuxt_app from 'nuxt/app';
2
2
  import { ShallowRef } from 'vue';
3
- import { H as HaexVaultSdk } from '../client-BW3ayV19.mjs';
3
+ import { H as HaexVaultSdk } from '../client-C9FyPkqp.mjs';
4
4
  import { A as ApplicationContext } from '../types-fHuxbqa4.mjs';
5
5
  import 'drizzle-orm/sqlite-proxy';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as nuxt_app from 'nuxt/app';
2
2
  import { ShallowRef } from 'vue';
3
- import { H as HaexVaultSdk } from '../client-Cm23j1wm.js';
3
+ import { H as HaexVaultSdk } from '../client--_QYySP0.js';
4
4
  import { A as ApplicationContext } from '../types-fHuxbqa4.js';
5
5
  import 'drizzle-orm/sqlite-proxy';
6
6
 
@@ -297,6 +297,8 @@ var MAIL_COMMANDS = {
297
297
  fetchEnvelopes: "extension_mail_fetch_envelopes",
298
298
  /** Full message fetch (envelope + body + attachment metadata) */
299
299
  fetchMessage: "extension_mail_fetch_message",
300
+ /** Fetch a single attachment's bytes (base64) by part index */
301
+ fetchAttachment: "extension_mail_fetch_attachment",
300
302
  /** Set or unset IMAP flags on a UID set */
301
303
  setFlags: "extension_mail_set_flags",
302
304
  /** MOVE messages between mailboxes (COPY+EXPUNGE fallback) */
@@ -1361,6 +1363,21 @@ var MailAPI = class {
1361
1363
  uid
1362
1364
  });
1363
1365
  }
1366
+ /**
1367
+ * Fetch a single attachment's raw bytes by its `partIndex` (from the
1368
+ * `attachments` array of a fetched `MailMessage`), returned as a
1369
+ * standard-alphabet base64 string. The base64 form drops straight into
1370
+ * `OutgoingAttachment.data` when forwarding, and decodes to bytes for
1371
+ * viewing or downloading.
1372
+ */
1373
+ async fetchAttachmentAsync(imap, mailbox, uid, partIndex) {
1374
+ return this.client.request(MAIL_COMMANDS.fetchAttachment, {
1375
+ imap,
1376
+ mailbox,
1377
+ uid,
1378
+ partIndex
1379
+ });
1380
+ }
1364
1381
  /**
1365
1382
  * Set or unset IMAP flags. Use `flags=["\\Seen"]` + `add=true` to
1366
1383
  * mark messages as read; `add=false` removes the flag(s).