@bobfrankston/rmfmail 1.0.706 → 1.0.708
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/client/android-bootstrap.bundle.js +163 -2
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js.map +2 -2
- package/client/compose/compose.bundle.js +15 -1
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/compose/compose.js +25 -5
- package/client/compose/compose.js.map +1 -1
- package/client/compose/compose.ts +21 -5
- package/package.json +3 -3
- package/packages/mailx-service/index.d.ts +27 -2
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +17 -0
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +21 -2
- package/packages/mailx-settings/index.d.ts.map +1 -1
- package/packages/mailx-settings/index.js +11 -1
- package/packages/mailx-settings/index.js.map +1 -1
- package/packages/mailx-settings/index.ts +11 -1
- package/packages/mailx-store/parse-worker.js +17 -1
- package/packages/mailx-store/parse-worker.js.map +1 -1
- package/packages/mailx-store/parse-worker.ts +17 -1
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/web-service.d.ts +88 -3
- package/packages/mailx-store-web/web-service.d.ts.map +1 -1
- package/packages/mailx-store-web/web-service.js +92 -2
- package/packages/mailx-store-web/web-service.js.map +1 -1
- package/packages/mailx-store-web/web-service.ts +110 -5
- package/packages/mailx-types/index.d.ts +1 -0
- package/packages/mailx-types/index.d.ts.map +1 -1
- package/packages/mailx-types/index.js.map +1 -1
- package/packages/mailx-types/index.ts +1 -0
- package/packages/mailx-types/mailx-api.d.ts +212 -0
- package/packages/mailx-types/mailx-api.d.ts.map +1 -0
- package/packages/mailx-types/mailx-api.js +41 -0
- package/packages/mailx-types/mailx-api.js.map +1 -0
- package/packages/mailx-types/mailx-api.ts +159 -0
- package/packages/mailx-types/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-44928 → node_modules.npm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,CAAA;KAAE,CAAC,CAAC;IACvE,gBAAgB,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/F,aAAa,CAAC,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChF"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MailxApi — the single typed contract that every mailx service implementation
|
|
3
|
+
* must satisfy. Both the Node-side desktop service (`MailxService`) and the
|
|
4
|
+
* browser-side Android service (`WebMailxService`) declare
|
|
5
|
+
* `implements MailxApi`. Missing methods become build errors instead of
|
|
6
|
+
* silent runtime "parent bridge has no method X" failures.
|
|
7
|
+
*
|
|
8
|
+
* **Why this exists**: until now the two implementations drifted independently.
|
|
9
|
+
* A method added to MailxService for one platform release would be silently
|
|
10
|
+
* absent on the other for months. spellcheck-on-GDrive (2026-05-13) added
|
|
11
|
+
* `getUserDict` / `addUserDictWord` / `removeUserDictWord` to the desktop
|
|
12
|
+
* service; the Android service got none of them; the relay returned
|
|
13
|
+
* `parent bridge has no method`, the client `.catch(() => {})` swallowed the
|
|
14
|
+
* rejection, and the feature silently regressed on phone. With this contract
|
|
15
|
+
* any such addition is a compile-time failure on whichever side it's missing.
|
|
16
|
+
*
|
|
17
|
+
* **Surface**: the 83 method names dispatched by
|
|
18
|
+
* `mailx-service/jsonrpc.ts` plus a handful of internal helpers both
|
|
19
|
+
* implementations need. IPC-only names (`sendMessage`, `createCalendarEvent`,
|
|
20
|
+
* etc.) are listed under their dispatch names — desktop classes that today
|
|
21
|
+
* use a different internal name (e.g., `send`, `createCalendarEventLocal`)
|
|
22
|
+
* add a thin alias method so the contract holds without renaming call sites.
|
|
23
|
+
*
|
|
24
|
+
* **Optional methods**: a handful of methods require an OS popup or native
|
|
25
|
+
* filesystem hook and have no meaningful browser equivalent
|
|
26
|
+
* (`openInWord`, `closeWordEdit`, `showReminderPopup`, `openInTextEditor`,
|
|
27
|
+
* `openLocalPath`). They are declared `?:` so the browser service can
|
|
28
|
+
* legitimately omit them. The desktop service must implement them.
|
|
29
|
+
*
|
|
30
|
+
* **Types**: signatures use `any` where the shape genuinely varies across
|
|
31
|
+
* implementations (envelope rows, settings, AI payloads). The contract's
|
|
32
|
+
* job is name + arity enforcement, not deep schema typing — that lives in
|
|
33
|
+
* the relevant domain types (`Folder`, `AccountConfig`, etc.).
|
|
34
|
+
*
|
|
35
|
+
* **Where to add a new method**: add the method here first. Both
|
|
36
|
+
* implementations will fail to compile until they implement it. Don't add
|
|
37
|
+
* methods to a service class without the interface entry — that's how we
|
|
38
|
+
* got into the silent-drift hole.
|
|
39
|
+
*/
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=mailx-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mailx-api.js","sourceRoot":"","sources":["mailx-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MailxApi — the single typed contract that every mailx service implementation
|
|
3
|
+
* must satisfy. Both the Node-side desktop service (`MailxService`) and the
|
|
4
|
+
* browser-side Android service (`WebMailxService`) declare
|
|
5
|
+
* `implements MailxApi`. Missing methods become build errors instead of
|
|
6
|
+
* silent runtime "parent bridge has no method X" failures.
|
|
7
|
+
*
|
|
8
|
+
* **Why this exists**: until now the two implementations drifted independently.
|
|
9
|
+
* A method added to MailxService for one platform release would be silently
|
|
10
|
+
* absent on the other for months. spellcheck-on-GDrive (2026-05-13) added
|
|
11
|
+
* `getUserDict` / `addUserDictWord` / `removeUserDictWord` to the desktop
|
|
12
|
+
* service; the Android service got none of them; the relay returned
|
|
13
|
+
* `parent bridge has no method`, the client `.catch(() => {})` swallowed the
|
|
14
|
+
* rejection, and the feature silently regressed on phone. With this contract
|
|
15
|
+
* any such addition is a compile-time failure on whichever side it's missing.
|
|
16
|
+
*
|
|
17
|
+
* **Surface**: the 83 method names dispatched by
|
|
18
|
+
* `mailx-service/jsonrpc.ts` plus a handful of internal helpers both
|
|
19
|
+
* implementations need. IPC-only names (`sendMessage`, `createCalendarEvent`,
|
|
20
|
+
* etc.) are listed under their dispatch names — desktop classes that today
|
|
21
|
+
* use a different internal name (e.g., `send`, `createCalendarEventLocal`)
|
|
22
|
+
* add a thin alias method so the contract holds without renaming call sites.
|
|
23
|
+
*
|
|
24
|
+
* **Optional methods**: a handful of methods require an OS popup or native
|
|
25
|
+
* filesystem hook and have no meaningful browser equivalent
|
|
26
|
+
* (`openInWord`, `closeWordEdit`, `showReminderPopup`, `openInTextEditor`,
|
|
27
|
+
* `openLocalPath`). They are declared `?:` so the browser service can
|
|
28
|
+
* legitimately omit them. The desktop service must implement them.
|
|
29
|
+
*
|
|
30
|
+
* **Types**: signatures use `any` where the shape genuinely varies across
|
|
31
|
+
* implementations (envelope rows, settings, AI payloads). The contract's
|
|
32
|
+
* job is name + arity enforcement, not deep schema typing — that lives in
|
|
33
|
+
* the relevant domain types (`Folder`, `AccountConfig`, etc.).
|
|
34
|
+
*
|
|
35
|
+
* **Where to add a new method**: add the method here first. Both
|
|
36
|
+
* implementations will fail to compile until they implement it. Don't add
|
|
37
|
+
* methods to a service class without the interface entry — that's how we
|
|
38
|
+
* got into the silent-drift hole.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
import type { AutocompleteSettings, AutocompleteRequest, AutocompleteResponse, AiTransformRequest, AiTransformResponse } from "./index.js";
|
|
42
|
+
import type { Folder } from "./index.js";
|
|
43
|
+
|
|
44
|
+
export interface MailxApi {
|
|
45
|
+
// ── Accounts / folders / messages ─────────────────────────────────
|
|
46
|
+
getAccounts(): any[] | Promise<any[]>;
|
|
47
|
+
getFolders(accountId: string): Folder[] | Promise<Folder[]>;
|
|
48
|
+
getMessages(accountId: string, folderId: number, page?: number, pageSize?: number, sort?: string, sortDir?: string, search?: string, flaggedOnly?: boolean): any | Promise<any>;
|
|
49
|
+
getUnifiedInbox(page?: number, pageSize?: number): any | Promise<any>;
|
|
50
|
+
getMessage(accountId: string, uid: number, allowRemote?: boolean, folderId?: number): Promise<any>;
|
|
51
|
+
getThreadMessages(accountId: string, threadId: string): any | Promise<any>;
|
|
52
|
+
getAttachment(accountId: string, uid: number, attachmentId: number, folderId?: number): Promise<{ content: any; contentType: string; filename: string }>;
|
|
53
|
+
|
|
54
|
+
// ── Flags / move / delete ─────────────────────────────────────────
|
|
55
|
+
updateFlags(accountId: string, uid: number, flags: string[]): Promise<void>;
|
|
56
|
+
deleteMessage(accountId: string, uid: number): Promise<void>;
|
|
57
|
+
deleteMessages(accountId: string, uids: number[]): Promise<void>;
|
|
58
|
+
undeleteMessage(accountId: string, uid: number, folderId: number): Promise<void>;
|
|
59
|
+
moveMessage(accountId: string, uid: number, targetFolderId: number, targetAccountId?: string): Promise<void>;
|
|
60
|
+
moveMessages(accountId: string, uids: number[], targetFolderId: number): Promise<void>;
|
|
61
|
+
markAsSpamMessages(accountId: string, uids: number[]): Promise<{ targetFolderId: number; moved: number }>;
|
|
62
|
+
recordSpamReport(accountId: string, uid: number, folderId: number): Promise<any>;
|
|
63
|
+
markFolderRead(folderId: number): void | Promise<void>;
|
|
64
|
+
|
|
65
|
+
// ── Folders ───────────────────────────────────────────────────────
|
|
66
|
+
createFolder(accountId: string, parentPath: string, name: string): Promise<void>;
|
|
67
|
+
renameFolder(accountId: string, folderId: number, newName: string): Promise<void>;
|
|
68
|
+
deleteFolder(accountId: string, folderId: number): Promise<void>;
|
|
69
|
+
moveFolderToTrash(accountId: string, folderId: number): Promise<void>;
|
|
70
|
+
emptyFolder(accountId: string, folderId: number): Promise<void>;
|
|
71
|
+
|
|
72
|
+
// ── Send / draft / outbox ─────────────────────────────────────────
|
|
73
|
+
sendMessage(msg: any): Promise<void>;
|
|
74
|
+
saveDraft(accountId: string, subject: string, bodyHtml: string, bodyText: string, to?: string, cc?: string, previousDraftUid?: number, draftId?: string): Promise<{ draftUid: number | null; draftId: string }>;
|
|
75
|
+
deleteDraft(accountId: string, draftUid: number, draftId?: string): Promise<void>;
|
|
76
|
+
getOutboxStatus(): any | Promise<any>;
|
|
77
|
+
listQueuedOutgoing(): any[] | Promise<any[]>;
|
|
78
|
+
cancelQueuedOutgoing(filePath: string): { ok: true } | Promise<{ ok: true }>;
|
|
79
|
+
|
|
80
|
+
// ── Sync ──────────────────────────────────────────────────────────
|
|
81
|
+
syncAll(): Promise<void>;
|
|
82
|
+
syncAccount(accountId: string): Promise<void>;
|
|
83
|
+
getSyncPending(): { pending: number } | Promise<{ pending: number }>;
|
|
84
|
+
drainStoreSync(): Promise<void>;
|
|
85
|
+
reauthenticate(accountId: string): Promise<boolean>;
|
|
86
|
+
reauthGoogleScopes(): { cleared: number } | Promise<{ cleared: number }>;
|
|
87
|
+
|
|
88
|
+
// ── Search ────────────────────────────────────────────────────────
|
|
89
|
+
searchMessages(query: string, page?: number, pageSize?: number, scope?: string, accountId?: string, folderId?: number, includeTrashSpam?: boolean): Promise<any>;
|
|
90
|
+
|
|
91
|
+
// ── Contacts / autocomplete ───────────────────────────────────────
|
|
92
|
+
searchContacts(query: string): any[] | Promise<any[]>;
|
|
93
|
+
hasCcHistoryTo(email: string): boolean | Promise<boolean>;
|
|
94
|
+
hasBccHistoryTo(email: string): boolean | Promise<boolean>;
|
|
95
|
+
addContact(name: string, email: string): boolean | Promise<boolean>;
|
|
96
|
+
listContacts(query: string, page?: number, pageSize?: number): any | Promise<any>;
|
|
97
|
+
upsertContact(name: string, email: string): { ok: true } | Promise<{ ok: true }>;
|
|
98
|
+
deleteContact(email: string): { ok: true } | Promise<{ ok: true }>;
|
|
99
|
+
addPreferredContact(entry: { name: string; email: string; source?: string; organization?: string }): Promise<void>;
|
|
100
|
+
addToDenylist(email: string): Promise<void>;
|
|
101
|
+
loadContactsConfig(): Promise<any>;
|
|
102
|
+
|
|
103
|
+
// ── Priority lists / sender reputation ────────────────────────────
|
|
104
|
+
getPriorityLists(): { senders: string[]; domains: string[] } | Promise<{ senders: string[]; domains: string[] }>;
|
|
105
|
+
setPrioritySender(email: string, value: boolean, name?: string): Promise<void>;
|
|
106
|
+
setPriorityDomain(domain: string, value: boolean): Promise<void>;
|
|
107
|
+
flagSenderOrDomain(type: "sender" | "domain", value: string): Promise<{ flagged: boolean }>;
|
|
108
|
+
allowRemoteContent(type: "sender" | "domain" | "recipient", value: string): Promise<void>;
|
|
109
|
+
|
|
110
|
+
// ── Calendar / tasks ──────────────────────────────────────────────
|
|
111
|
+
getCalendarEvents(fromMs: number, toMs: number): Promise<any[]>;
|
|
112
|
+
createCalendarEvent(ev: any): Promise<{ uuid: string }>;
|
|
113
|
+
updateCalendarEvent(uuid: string, patch: any): Promise<{ ok: true }>;
|
|
114
|
+
deleteCalendarEvent(uuid: string): Promise<{ ok: true }>;
|
|
115
|
+
getTasks(includeCompleted?: boolean): Promise<any[]>;
|
|
116
|
+
createTask(t: { title: string; notes?: string; dueMs?: number }): Promise<{ uuid: string }>;
|
|
117
|
+
updateTask(uuid: string, patch: any): Promise<{ ok: true }>;
|
|
118
|
+
deleteTask(uuid: string): Promise<{ ok: true }>;
|
|
119
|
+
|
|
120
|
+
// ── User dictionary (cloud-mirrored spellcheck) ───────────────────
|
|
121
|
+
getUserDict(): Promise<string[]>;
|
|
122
|
+
addUserDictWord(word: string): Promise<string[]>;
|
|
123
|
+
removeUserDictWord(word: string): Promise<string[]>;
|
|
124
|
+
|
|
125
|
+
// ── Settings / setup / diagnostics ────────────────────────────────
|
|
126
|
+
getSettings(): any | Promise<any>;
|
|
127
|
+
saveSettingsData(settings: any): Promise<void>;
|
|
128
|
+
getDiagnostics(): any | Promise<any>;
|
|
129
|
+
getPrimaryAccount(feature?: string): any | Promise<any>;
|
|
130
|
+
setupAccount(name: string, email: string, password?: string): Promise<{ ok: boolean; error?: string; message?: string }>;
|
|
131
|
+
repairAccounts(): Promise<{ ok: boolean; error?: string; message?: string }>;
|
|
132
|
+
getAutocompleteSettings(): AutocompleteSettings | Promise<AutocompleteSettings>;
|
|
133
|
+
saveAutocompleteSettings(settings: AutocompleteSettings): void | Promise<void>;
|
|
134
|
+
|
|
135
|
+
// ── AI / autocomplete (ghost text + transforms) ───────────────────
|
|
136
|
+
autocomplete(req: AutocompleteRequest): Promise<AutocompleteResponse>;
|
|
137
|
+
aiTransform(req: AiTransformRequest): Promise<AiTransformResponse>;
|
|
138
|
+
|
|
139
|
+
// ── Config JSONC editor + help docs ───────────────────────────────
|
|
140
|
+
readJsoncFile(name: string): Promise<string | null>;
|
|
141
|
+
writeJsoncFile(name: string, content: string): Promise<void>;
|
|
142
|
+
formatJsonc(content: string): Promise<string>;
|
|
143
|
+
readConfigHelp(name: string): Promise<string>;
|
|
144
|
+
|
|
145
|
+
// ── External actions (mailto, unsubscribe, restart, etc.) ─────────
|
|
146
|
+
unsubscribeOneClick(url: string): Promise<{ ok: boolean; status: number; statusText: string }>;
|
|
147
|
+
consumePendingMailto(): any | Promise<any>;
|
|
148
|
+
logClientEvent?(...args: any[]): void | Promise<void>;
|
|
149
|
+
getVersion?(): any | Promise<any>;
|
|
150
|
+
|
|
151
|
+
// ── Desktop-only (OS popups, native FS, Word integration) ─────────
|
|
152
|
+
// Browser/Android services may omit these — declared optional so a
|
|
153
|
+
// missing implementation on the web side compiles cleanly.
|
|
154
|
+
openInWord?(editId: string, html: string): Promise<{ ok: boolean; path: string; opener: string }>;
|
|
155
|
+
closeWordEdit?(editId: string): Promise<void>;
|
|
156
|
+
showReminderPopup?(opts: any): Promise<{ button: string; form?: any }>;
|
|
157
|
+
openInTextEditor?(filePath: string): Promise<{ ok: boolean; opener: string; reason?: string }>;
|
|
158
|
+
openLocalPath?(which: "config" | "log"): Promise<{ ok: true; path: string }>;
|
|
159
|
+
}
|