@bobfrankston/mailx-types 0.1.17 → 0.1.19

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/index.d.ts CHANGED
@@ -115,6 +115,7 @@ export interface MessageEnvelope {
115
115
  flags: string[]; /** IMAP flags: ["\\Seen", "\\Flagged"] */
116
116
  size: number;
117
117
  hasAttachments: boolean;
118
+ isReplied?: boolean; /** Local DB knows the user (or anyone in this account) replied — derived from In-Reply-To linkage, independent of \Answered */
118
119
  preview: string; /** First ~200 chars of body text */
119
120
  bodyPath?: string; /** Local body location: "idb:..." or "gmail:<id>" */
120
121
  providerId?: string; /** Native server id (Gmail hex id, Outlook Graph id) — bypasses UID→id pagination on body fetch */
@@ -331,10 +332,14 @@ export interface AiTransformResponse {
331
332
  /** Optional reason for empty result, surfaced to UI status bar. */
332
333
  reason?: string;
333
334
  }
334
- /** Body storage backend interface -- implementations are swappable */
335
+ /** Body storage backend interface -- implementations are swappable.
336
+ * Uses Uint8Array, not Node's Buffer: mailx-types is a zero-dep, browser-
337
+ * capable package, and the browser client (DOM lib, no @types/node) imports
338
+ * it. Buffer extends Uint8Array, so Node implementations (FileMessageStore)
339
+ * still satisfy this; the browser side gets a real, node-free type. */
335
340
  export interface MessageStore {
336
- putMessage(accountId: string, folderId: number, uid: number, raw: Buffer): Promise<string>;
337
- getMessage(accountId: string, folderId: number, uid: number): Promise<Buffer>;
341
+ putMessage(accountId: string, folderId: number, uid: number, raw: Uint8Array): Promise<string>;
342
+ getMessage(accountId: string, folderId: number, uid: number): Promise<Uint8Array>;
338
343
  deleteMessage(accountId: string, folderId: number, uid: number): Promise<void>;
339
344
  hasMessage(accountId: string, folderId: number, uid: number): Promise<boolean>;
340
345
  }
package/mailx-api.d.ts CHANGED
@@ -51,7 +51,7 @@ export interface MailxApi {
51
51
  contentType: string;
52
52
  filename: string;
53
53
  }>;
54
- openAttachment(accountId: string, uid: number, attachmentId: number, folderId?: number): Promise<{
54
+ openAttachment(accountId: string, uid: number, attachmentId: number, folderId?: number, filename?: string): Promise<{
55
55
  ok: boolean;
56
56
  path: string;
57
57
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-types",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",