@bobfrankston/mailx-types 0.1.21 → 0.1.23
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 +5 -1
- package/mailx-api.d.ts +24 -2
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -107,7 +107,8 @@ export interface MessageEnvelope {
|
|
|
107
107
|
inReplyTo: string; /** For threading */
|
|
108
108
|
references: string[]; /** For threading */
|
|
109
109
|
threadId?: string; /** Computed thread id (root Message-ID of the conversation) */
|
|
110
|
-
date: number; /** Epoch ms */
|
|
110
|
+
date: number; /** Epoch ms — per-account arrival time (IMAP INTERNALDATE / Gmail internalDate) */
|
|
111
|
+
sentDate?: number; /** Epoch ms — the message's own Date: header (send time); falls back to date */
|
|
111
112
|
subject: string;
|
|
112
113
|
from: EmailAddress;
|
|
113
114
|
to: EmailAddress[];
|
|
@@ -150,6 +151,9 @@ export interface MessageQuery {
|
|
|
150
151
|
pageSize?: number;
|
|
151
152
|
sort?: "date" | "from" | "subject";
|
|
152
153
|
sortDir?: "asc" | "desc";
|
|
154
|
+
/** Which date drives the "date" sort + the date column: the Date: header
|
|
155
|
+
* (sent, default) or the per-account arrival time (received). */
|
|
156
|
+
dateBasis?: "sent" | "received";
|
|
153
157
|
search?: string;
|
|
154
158
|
/** Restrict to messages with the \Flagged flag set (whole-folder, not
|
|
155
159
|
* just the currently-rendered page — lets the "show flagged" filter
|
package/mailx-api.d.ts
CHANGED
|
@@ -55,13 +55,18 @@ export interface MailxApi {
|
|
|
55
55
|
ok: boolean;
|
|
56
56
|
path: string;
|
|
57
57
|
}>;
|
|
58
|
+
getMessageSource(accountId: string, uid: number, folderId?: number): Promise<{
|
|
59
|
+
dataBase64: string;
|
|
60
|
+
filename: string;
|
|
61
|
+
}>;
|
|
58
62
|
updateFlags(accountId: string, uid: number, flags: string[], folderId?: number): Promise<void>;
|
|
59
63
|
deleteMessage(accountId: string, uid: number): Promise<void>;
|
|
60
64
|
deleteMessages(accountId: string, uids: number[]): Promise<void>;
|
|
61
65
|
undeleteMessage(accountId: string, uid: number, folderId: number): Promise<void>;
|
|
62
66
|
moveMessage(accountId: string, uid: number, targetFolderId: number, targetAccountId?: string): Promise<void>;
|
|
63
|
-
moveMessages(accountId: string, uids: number[], targetFolderId: number): Promise<void>;
|
|
64
|
-
|
|
67
|
+
moveMessages(accountId: string, uids: number[], targetFolderId: number, folderIds?: number[]): Promise<void>;
|
|
68
|
+
copyMessages(accountId: string, uids: number[], folderIds: number[] | undefined, targetFolderId: number): Promise<void>;
|
|
69
|
+
markAsSpamMessages(accountId: string, uids: number[], folderIds?: number[]): Promise<{
|
|
65
70
|
targetFolderId: number;
|
|
66
71
|
moved: number;
|
|
67
72
|
}>;
|
|
@@ -87,6 +92,7 @@ export interface MailxApi {
|
|
|
87
92
|
}>;
|
|
88
93
|
syncAll(): Promise<void>;
|
|
89
94
|
syncAccount(accountId: string): Promise<void>;
|
|
95
|
+
syncFolderNow(accountId: string, folderId: number): Promise<void>;
|
|
90
96
|
getSyncPending(): {
|
|
91
97
|
pending: number;
|
|
92
98
|
} | Promise<{
|
|
@@ -100,6 +106,7 @@ export interface MailxApi {
|
|
|
100
106
|
cleared: number;
|
|
101
107
|
}>;
|
|
102
108
|
searchMessages(query: string, page?: number, pageSize?: number, scope?: string, accountId?: string, folderId?: number, includeTrashSpam?: boolean): Promise<any>;
|
|
109
|
+
cancelServerSearch(): void | Promise<void>;
|
|
103
110
|
searchContacts(query: string): any[] | Promise<any[]>;
|
|
104
111
|
hasCcHistoryTo(email: string): boolean | Promise<boolean>;
|
|
105
112
|
hasBccHistoryTo(email: string): boolean | Promise<boolean>;
|
|
@@ -137,6 +144,12 @@ export interface MailxApi {
|
|
|
137
144
|
}>;
|
|
138
145
|
allowRemoteContent(type: "sender" | "domain" | "recipient", value: string): Promise<void>;
|
|
139
146
|
getCalendarEvents(fromMs: number, toMs: number): Promise<any[]>;
|
|
147
|
+
getCalendars(): Promise<Array<{
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
color: string;
|
|
151
|
+
primary: boolean;
|
|
152
|
+
}>>;
|
|
140
153
|
createCalendarEvent(ev: any): Promise<{
|
|
141
154
|
uuid: string;
|
|
142
155
|
}>;
|
|
@@ -192,6 +205,11 @@ export interface MailxApi {
|
|
|
192
205
|
statusText: string;
|
|
193
206
|
}>;
|
|
194
207
|
consumePendingMailto(): any | Promise<any>;
|
|
208
|
+
getReminderSound(): Promise<{
|
|
209
|
+
mute?: boolean;
|
|
210
|
+
dataBase64?: string;
|
|
211
|
+
mime?: string;
|
|
212
|
+
}>;
|
|
195
213
|
logClientEvent?(...args: any[]): void | Promise<void>;
|
|
196
214
|
getVersion?(): any | Promise<any>;
|
|
197
215
|
openInWord?(editId: string, html: string): Promise<{
|
|
@@ -213,5 +231,9 @@ export interface MailxApi {
|
|
|
213
231
|
ok: true;
|
|
214
232
|
path: string;
|
|
215
233
|
}>;
|
|
234
|
+
popoutWindow?(accountId: string, uid: number, folderId?: number, subject?: string): Promise<{
|
|
235
|
+
ok: boolean;
|
|
236
|
+
reason?: string;
|
|
237
|
+
}>;
|
|
216
238
|
}
|
|
217
239
|
//# sourceMappingURL=mailx-api.d.ts.map
|