@bobfrankston/mailx-types 0.1.8 → 0.1.11
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 +28 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -38,8 +38,7 @@ export interface AccountConfig {
|
|
|
38
38
|
primaryContacts?: boolean; /** Per-feature override: use this account's Google Contacts. Falls back to `primary` if unset. */
|
|
39
39
|
defaultSend?: boolean; /** Use this account's SMTP when From doesn't match any account */
|
|
40
40
|
syncContacts?: boolean; /** Sync contacts even when account is disabled (contacts-only Gmail) */
|
|
41
|
-
relayDomains?: string[]; /** Domains to skip in Delivered-To chain (e.g., ["
|
|
42
|
-
deliveredToPrefix?: string[]; /** Prefixes to strip from Delivered-To to get clean alias (e.g., ["bobf-ma-", "bobf-"]) — order matters, longest first */
|
|
41
|
+
relayDomains?: string[]; /** Domains to skip in Delivered-To chain (e.g., ["relay.aaz.lt"]) */
|
|
43
42
|
identityDomains?: string[]; /** Domains where Delivered-To address should become the reply From (e.g., ["bob.ma", "bobf.frankston.com"]) */
|
|
44
43
|
spam?: string; /** IMAP folder path for "Mark as spam" button (e.g., "_spam"). Button hidden when not set. */
|
|
45
44
|
signature?: string; /** Legacy: HTML signature appended to all outgoing messages (new + reply + forward). Plain text or HTML allowed. Superseded by `sig`. */
|
|
@@ -269,16 +268,40 @@ export interface AutocompleteResponse {
|
|
|
269
268
|
}
|
|
270
269
|
export interface AiTransformRequest {
|
|
271
270
|
/** translate = render in `targetLang`; proofread = corrected version
|
|
272
|
-
* with grammar/spelling fixes; summarize = short paragraph summary
|
|
273
|
-
|
|
271
|
+
* with grammar/spelling fixes; summarize = short paragraph summary;
|
|
272
|
+
* extractEvent = parse natural-language event description into a
|
|
273
|
+
* structured calendar event (title/start/end/location/notes). */
|
|
274
|
+
action: "translate" | "proofread" | "summarize" | "extractEvent";
|
|
274
275
|
text: string;
|
|
275
276
|
/** ISO-639-1 (or BCP-47) language code for translate. Defaults to "en". */
|
|
276
277
|
targetLang?: string;
|
|
278
|
+
/** Caller's "now" hint, ISO 8601 (e.g. 2026-05-05T18:30:00). Used by
|
|
279
|
+
* extractEvent to resolve relative dates ("tomorrow at 3pm"). The
|
|
280
|
+
* service can't trust its own clock — the user might be on a phone
|
|
281
|
+
* in a different timezone — so the caller supplies it. */
|
|
282
|
+
nowISO?: string;
|
|
283
|
+
}
|
|
284
|
+
/** Structured calendar event fields parsed from a natural-language
|
|
285
|
+
* description by aiTransform({ action: "extractEvent" }). All times are
|
|
286
|
+
* ISO 8601 in the caller's local timezone (no `Z` suffix); the client
|
|
287
|
+
* shapes them into Google Calendar's `dates=` URL parameter. */
|
|
288
|
+
export interface ExtractedEvent {
|
|
289
|
+
title: string;
|
|
290
|
+
startISO?: string;
|
|
291
|
+
endISO?: string;
|
|
292
|
+
allDay?: boolean;
|
|
293
|
+
location?: string;
|
|
294
|
+
notes?: string;
|
|
277
295
|
}
|
|
278
296
|
export interface AiTransformResponse {
|
|
279
297
|
/** Transformed text. Empty when AI is disabled / provider error / feature
|
|
280
|
-
* not enabled — caller should treat empty as "no result".
|
|
298
|
+
* not enabled — caller should treat empty as "no result". For
|
|
299
|
+
* extractEvent this holds the JSON-stringified ExtractedEvent so the
|
|
300
|
+
* response shape stays single-field across all actions. */
|
|
281
301
|
text: string;
|
|
302
|
+
/** Parsed ExtractedEvent, populated only for extractEvent. Lets the
|
|
303
|
+
* client skip the JSON.parse step (the service already validated). */
|
|
304
|
+
event?: ExtractedEvent;
|
|
282
305
|
/** Optional reason for empty result, surfaced to UI status bar. */
|
|
283
306
|
reason?: string;
|
|
284
307
|
}
|