@dawnlit/outlook-bridge 1.0.0 → 1.1.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.
- package/README.md +2 -1
- package/dist/OutlookService.d.ts +1 -1
- package/dist/OutlookService.js +2 -2
- package/dist/OutlookService.js.map +1 -1
- package/dist/errors.js +19 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/mac/drafts.d.ts +12 -1
- package/dist/mac/drafts.js +71 -0
- package/dist/mac/drafts.js.map +1 -1
- package/dist/mac/index.js +1 -0
- package/dist/mac/index.js.map +1 -1
- package/dist/runtime.js +1 -1
- package/dist/runtime.js.map +1 -1
- package/dist/types.d.ts +19 -0
- package/dist/windows/drafts.d.ts +12 -1
- package/dist/windows/drafts.js +60 -0
- package/dist/windows/drafts.js.map +1 -1
- package/dist/windows/index.js +1 -0
- package/dist/windows/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -188,7 +188,8 @@ building block for "find the emails matching X" without knowing which subfolder
|
|
|
188
188
|
**Sending & replying** — `sendOutlookEmail`, `replyOutlookEmail` (answers the sender; pass `replyAll: true` to answer
|
|
189
189
|
every recipient), `sendAllDrafts`.
|
|
190
190
|
|
|
191
|
-
**Drafts** — `listOutlookDrafts`, `deleteOutlookDrafts
|
|
191
|
+
**Drafts** — `listOutlookDrafts`, `deleteOutlookDrafts`, `sendDrafts` (sends a chosen subset by
|
|
192
|
+
EntryID — the review-and-select alternative to `sendAllDrafts`'s account-wide sweep).
|
|
192
193
|
|
|
193
194
|
**Attachments** — `saveEmailAttachment`, `saveEmailAttachmentDetailed`, `saveEmailAttachments`
|
|
194
195
|
(the same, batched into one COM round trip for several attachments off one email). All take an optional `destDir`,
|
package/dist/OutlookService.d.ts
CHANGED
|
@@ -40,4 +40,4 @@ export interface OutlookBridgeInstance extends OutlookBridge {
|
|
|
40
40
|
* is called.
|
|
41
41
|
*/
|
|
42
42
|
export declare function createOutlookBridge(options?: BridgeOptions): OutlookBridgeInstance;
|
|
43
|
-
export declare const getOutlookAccounts: () => Promise<string[]>, sendOutlookEmail: (params: import("./types").SendEmailParams) => Promise<void>, replyOutlookEmail: (params: import("./types").ReplyEmailParams) => Promise<import("./types").ReplyEmailResult>, sendAllDrafts: (emailAccount: string) => Promise<import("./types").SendAllDraftsResult>, readInboxEmails: (emailAccount: string, daysBack?: number, limit?: number, folder?: string) => Promise<import("./types").InboxEmail[]>, searchInboxByFilter: (emailAccount: string, filter?: import("./types").InboxSearchFilter, daysBack?: number) => Promise<import("./types").InboxSearchMatch[]>, readSelectedEmail: () => Promise<import("./types").SelectedEmail>, readEmailBody: (entryId: string, storeId?: string, maxChars?: number, includeQuoted?: boolean) => Promise<import("./types").EmailBodyResult>, openOutlookEmail: (entryId: string) => Promise<void>, listInboxFolders: (emailAccount: string, maxDepth?: number) => Promise<import("./types").InboxFolderInfo[]>, moveOutlookEmails: (emailAccount: string, entryIds: string[], folderName: string, createIfMissing?: boolean) => Promise<import("./types").MoveEmailsResult>, listOutlookDrafts: (emailAccount: string, limit?: number, previewChars?: number) => Promise<import("./types").ListDraftsResult>, deleteOutlookDrafts: (emailAccount: string, entryIds: string[]) => Promise<import("./types").DeleteDraftsResult>, deleteOutlookEmails: (emailAccount: string, entryIds: string[], options?: import("./types").DeleteMailOptions) => Promise<import("./types").DeleteMailResult>, purgeDeletedItems: (emailAccount: string, olderThanDays?: number, dryRun?: boolean) => Promise<import("./types").PurgeDeletedItemsResult>, saveEmailAttachment: (entryId: string, fileName: string, storeId?: string, destDir?: string) => Promise<string>, saveEmailAttachmentDetailed: (entryId: string, fileName: string, storeId?: string, destDir?: string) => Promise<import("./types").SavedAttachment>, saveEmailAttachments: (entryId: string, fileNames: string[], storeId?: string, destDir?: string) => Promise<import("./types").SavedAttachment[]>, cleanUndeliverableEmails: (emailAccount: string, daysBack?: number, dryRun?: boolean) => Promise<import("./types").CleanUndeliverableResult>, collectBouncedRecipients: (emailAccount: string, daysBack?: number, scanDeleted?: boolean) => Promise<string[]>, readSentRecipientGroups: (emailAccount: string, daysBack?: number, limit?: number) => Promise<import("./types").SentRecipientGroup[]>, listOutlookSignatures: () => Promise<string[]>, readOutlookSignatureHtml: (name: string) => Promise<string>, readTemplateEmails: (emailAccount: string, folderName?: string, limit?: number, includeBody?: boolean, subject?: string) => Promise<import("./types").TemplateFolderResult>, saveTemplateEmail: (emailAccount: string, subject: string, htmlBody: string, folderName?: string) => Promise<import("./types").SaveTemplateResult>, editEmailTemplate: (label: string, currentHtml: string) => Promise<string>;
|
|
43
|
+
export declare const getOutlookAccounts: () => Promise<string[]>, sendOutlookEmail: (params: import("./types").SendEmailParams) => Promise<void>, replyOutlookEmail: (params: import("./types").ReplyEmailParams) => Promise<import("./types").ReplyEmailResult>, sendAllDrafts: (emailAccount: string) => Promise<import("./types").SendAllDraftsResult>, readInboxEmails: (emailAccount: string, daysBack?: number, limit?: number, folder?: string) => Promise<import("./types").InboxEmail[]>, searchInboxByFilter: (emailAccount: string, filter?: import("./types").InboxSearchFilter, daysBack?: number) => Promise<import("./types").InboxSearchMatch[]>, readSelectedEmail: () => Promise<import("./types").SelectedEmail>, readEmailBody: (entryId: string, storeId?: string, maxChars?: number, includeQuoted?: boolean) => Promise<import("./types").EmailBodyResult>, openOutlookEmail: (entryId: string) => Promise<void>, listInboxFolders: (emailAccount: string, maxDepth?: number) => Promise<import("./types").InboxFolderInfo[]>, moveOutlookEmails: (emailAccount: string, entryIds: string[], folderName: string, createIfMissing?: boolean) => Promise<import("./types").MoveEmailsResult>, listOutlookDrafts: (emailAccount: string, limit?: number, previewChars?: number) => Promise<import("./types").ListDraftsResult>, deleteOutlookDrafts: (emailAccount: string, entryIds: string[]) => Promise<import("./types").DeleteDraftsResult>, sendDrafts: (emailAccount: string, entryIds: string[]) => Promise<import("./types").SendDraftsResult>, deleteOutlookEmails: (emailAccount: string, entryIds: string[], options?: import("./types").DeleteMailOptions) => Promise<import("./types").DeleteMailResult>, purgeDeletedItems: (emailAccount: string, olderThanDays?: number, dryRun?: boolean) => Promise<import("./types").PurgeDeletedItemsResult>, saveEmailAttachment: (entryId: string, fileName: string, storeId?: string, destDir?: string) => Promise<string>, saveEmailAttachmentDetailed: (entryId: string, fileName: string, storeId?: string, destDir?: string) => Promise<import("./types").SavedAttachment>, saveEmailAttachments: (entryId: string, fileNames: string[], storeId?: string, destDir?: string) => Promise<import("./types").SavedAttachment[]>, cleanUndeliverableEmails: (emailAccount: string, daysBack?: number, dryRun?: boolean) => Promise<import("./types").CleanUndeliverableResult>, collectBouncedRecipients: (emailAccount: string, daysBack?: number, scanDeleted?: boolean) => Promise<string[]>, readSentRecipientGroups: (emailAccount: string, daysBack?: number, limit?: number) => Promise<import("./types").SentRecipientGroup[]>, listOutlookSignatures: () => Promise<string[]>, readOutlookSignatureHtml: (name: string) => Promise<string>, readTemplateEmails: (emailAccount: string, folderName?: string, limit?: number, includeBody?: boolean, subject?: string) => Promise<import("./types").TemplateFolderResult>, saveTemplateEmail: (emailAccount: string, subject: string, htmlBody: string, folderName?: string) => Promise<import("./types").SaveTemplateResult>, editEmailTemplate: (label: string, currentHtml: string) => Promise<string>;
|
package/dist/OutlookService.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.editEmailTemplate = exports.saveTemplateEmail = exports.readTemplateEmails = exports.readOutlookSignatureHtml = exports.listOutlookSignatures = exports.readSentRecipientGroups = exports.collectBouncedRecipients = exports.cleanUndeliverableEmails = exports.saveEmailAttachments = exports.saveEmailAttachmentDetailed = exports.saveEmailAttachment = exports.purgeDeletedItems = exports.deleteOutlookEmails = exports.deleteOutlookDrafts = exports.listOutlookDrafts = exports.moveOutlookEmails = exports.listInboxFolders = exports.openOutlookEmail = exports.readEmailBody = exports.readSelectedEmail = exports.searchInboxByFilter = exports.readInboxEmails = exports.sendAllDrafts = exports.replyOutlookEmail = exports.sendOutlookEmail = exports.getOutlookAccounts = void 0;
|
|
36
|
+
exports.editEmailTemplate = exports.saveTemplateEmail = exports.readTemplateEmails = exports.readOutlookSignatureHtml = exports.listOutlookSignatures = exports.readSentRecipientGroups = exports.collectBouncedRecipients = exports.cleanUndeliverableEmails = exports.saveEmailAttachments = exports.saveEmailAttachmentDetailed = exports.saveEmailAttachment = exports.purgeDeletedItems = exports.deleteOutlookEmails = exports.sendDrafts = exports.deleteOutlookDrafts = exports.listOutlookDrafts = exports.moveOutlookEmails = exports.listInboxFolders = exports.openOutlookEmail = exports.readEmailBody = exports.readSelectedEmail = exports.searchInboxByFilter = exports.readInboxEmails = exports.sendAllDrafts = exports.replyOutlookEmail = exports.sendOutlookEmail = exports.getOutlookAccounts = void 0;
|
|
37
37
|
exports.capabilities = capabilities;
|
|
38
38
|
exports.supports = supports;
|
|
39
39
|
exports.createOutlookBridge = createOutlookBridge;
|
|
@@ -133,5 +133,5 @@ function build(config) {
|
|
|
133
133
|
function createOutlookBridge(options = {}) {
|
|
134
134
|
return build((0, runtime_1.mergeOptions)((0, runtime_1.getGlobalConfig)(), options));
|
|
135
135
|
}
|
|
136
|
-
exports.getOutlookAccounts = impl.getOutlookAccounts, exports.sendOutlookEmail = impl.sendOutlookEmail, exports.replyOutlookEmail = impl.replyOutlookEmail, exports.sendAllDrafts = impl.sendAllDrafts, exports.readInboxEmails = impl.readInboxEmails, exports.searchInboxByFilter = impl.searchInboxByFilter, exports.readSelectedEmail = impl.readSelectedEmail, exports.readEmailBody = impl.readEmailBody, exports.openOutlookEmail = impl.openOutlookEmail, exports.listInboxFolders = impl.listInboxFolders, exports.moveOutlookEmails = impl.moveOutlookEmails, exports.listOutlookDrafts = impl.listOutlookDrafts, exports.deleteOutlookDrafts = impl.deleteOutlookDrafts, exports.deleteOutlookEmails = impl.deleteOutlookEmails, exports.purgeDeletedItems = impl.purgeDeletedItems, exports.saveEmailAttachment = impl.saveEmailAttachment, exports.saveEmailAttachmentDetailed = impl.saveEmailAttachmentDetailed, exports.saveEmailAttachments = impl.saveEmailAttachments, exports.cleanUndeliverableEmails = impl.cleanUndeliverableEmails, exports.collectBouncedRecipients = impl.collectBouncedRecipients, exports.readSentRecipientGroups = impl.readSentRecipientGroups, exports.listOutlookSignatures = impl.listOutlookSignatures, exports.readOutlookSignatureHtml = impl.readOutlookSignatureHtml, exports.readTemplateEmails = impl.readTemplateEmails, exports.saveTemplateEmail = impl.saveTemplateEmail, exports.editEmailTemplate = impl.editEmailTemplate;
|
|
136
|
+
exports.getOutlookAccounts = impl.getOutlookAccounts, exports.sendOutlookEmail = impl.sendOutlookEmail, exports.replyOutlookEmail = impl.replyOutlookEmail, exports.sendAllDrafts = impl.sendAllDrafts, exports.readInboxEmails = impl.readInboxEmails, exports.searchInboxByFilter = impl.searchInboxByFilter, exports.readSelectedEmail = impl.readSelectedEmail, exports.readEmailBody = impl.readEmailBody, exports.openOutlookEmail = impl.openOutlookEmail, exports.listInboxFolders = impl.listInboxFolders, exports.moveOutlookEmails = impl.moveOutlookEmails, exports.listOutlookDrafts = impl.listOutlookDrafts, exports.deleteOutlookDrafts = impl.deleteOutlookDrafts, exports.sendDrafts = impl.sendDrafts, exports.deleteOutlookEmails = impl.deleteOutlookEmails, exports.purgeDeletedItems = impl.purgeDeletedItems, exports.saveEmailAttachment = impl.saveEmailAttachment, exports.saveEmailAttachmentDetailed = impl.saveEmailAttachmentDetailed, exports.saveEmailAttachments = impl.saveEmailAttachments, exports.cleanUndeliverableEmails = impl.cleanUndeliverableEmails, exports.collectBouncedRecipients = impl.collectBouncedRecipients, exports.readSentRecipientGroups = impl.readSentRecipientGroups, exports.listOutlookSignatures = impl.listOutlookSignatures, exports.readOutlookSignatureHtml = impl.readOutlookSignatureHtml, exports.readTemplateEmails = impl.readTemplateEmails, exports.saveTemplateEmail = impl.saveTemplateEmail, exports.editEmailTemplate = impl.editEmailTemplate;
|
|
137
137
|
//# sourceMappingURL=OutlookService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutlookService.js","sourceRoot":"","sources":["../src/OutlookService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,oCAEC;AAGD,4BAEC;AA6ED,kDAEC;AAtID,yEAAyE;AACzE,+EAA+E;AAC/E,8EAA8E;AAC9E,2EAA2E;AAC3E,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,2EAA2E;AAC3E,4EAA4E;AAC5E,6EAA6E;AAC7E,WAAW;AACX,yDAA2C;AAC3C,iDAAmC;AAEnC,uCAAsE;AACtE,qCAAoD;AAGpD,8EAA8E;AAC9E,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAuB,CAAC;AAEjF;;;;;;;;GAQG;AACH,MAAM,iBAAiB,GAAG;IACtB,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;QACpD,IAAI;QACJ,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,iCAAwB,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;KACvE,CAAC,CAA6B;IAC/B,YAAY,EAAE,MAAM,CAAC,MAAM,CACvB,MAAM,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CACjD;CACrB,CAAC;AAEF,sEAAsE;AACtE,sDAAsD;AACtD,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAClD,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa;IACxC,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CA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BhB,IAAI,mBAzBJ,yBAAiB,GAyBjB,IAAI,oBAxBJ,qBAAa,GAwBb,IAAI,gBAvBJ,uBAAe,GAuBf,IAAI,kBAtBJ,2BAAmB,GAsBnB,IAAI,sBArBJ,yBAAiB,GAqBjB,IAAI,oBApBJ,qBAAa,GAoBb,IAAI,gBAnBJ,wBAAgB,GAmBhB,IAAI,mBAlBJ,wBAAgB,GAkBhB,IAAI,mBAjBJ,yBAAiB,GAiBjB,IAAI,oBAhBJ,yBAAiB,GAgBjB,IAAI,oBAfJ,2BAAmB,GAenB,IAAI,sBAdJ,kBAAU,GAcV,IAAI,aAbJ,2BAAmB,GAanB,IAAI,sBAZJ,yBAAiB,GAYjB,IAAI,oBAXJ,2BAAmB,GAWnB,IAAI,sBAVJ,mCAA2B,GAU3B,IAAI,8BATJ,4BAAoB,GASpB,IAAI,uBARJ,gCAAwB,GAQxB,IAAI,2BAPJ,gCAAwB,GAOxB,IAAI,2BANJ,+BAAuB,GAMvB,IAAI,0BALJ,6BAAqB,GAKrB,IAAI,wBAJJ,gCAAwB,GAIxB,IAAI,2BAHJ,0BAAkB,GAGlB,IAAI,qBAFJ,yBAAiB,GAEjB,IAAI,oBADJ,yBAAiB,GACjB,IAAI,mBAAC"}
|
package/dist/errors.js
CHANGED
|
@@ -15,6 +15,9 @@ exports.AbortedError = exports.TimeoutError = exports.ScriptError = exports.Inva
|
|
|
15
15
|
exports.classifyRunFailure = classifyRunFailure;
|
|
16
16
|
/** Base class for every error this package raises deliberately. */
|
|
17
17
|
class OutlookError extends Error {
|
|
18
|
+
code;
|
|
19
|
+
/** The underlying failure, when there was one. */
|
|
20
|
+
cause;
|
|
18
21
|
constructor(code, message, options) {
|
|
19
22
|
// Declared as a field rather than passed to `super`: the ES2022 `cause`
|
|
20
23
|
// constructor option isn't in this package's ES2020 target.
|
|
@@ -33,6 +36,8 @@ class OutlookError extends Error {
|
|
|
33
36
|
exports.OutlookError = OutlookError;
|
|
34
37
|
/** This OS has no Outlook automation backend. */
|
|
35
38
|
class UnsupportedPlatformError extends OutlookError {
|
|
39
|
+
/** The platform that was asked, i.e. `process.platform` at the time. */
|
|
40
|
+
platform;
|
|
36
41
|
constructor(platform, detail = 'Outlook automation is only supported on Windows and macOS.') {
|
|
37
42
|
super('UNSUPPORTED_PLATFORM', `${detail} (running on '${platform}')`);
|
|
38
43
|
this.platform = platform;
|
|
@@ -41,6 +46,9 @@ class UnsupportedPlatformError extends OutlookError {
|
|
|
41
46
|
exports.UnsupportedPlatformError = UnsupportedPlatformError;
|
|
42
47
|
/** The platform supports this, but the port isn't written yet. */
|
|
43
48
|
class NotImplementedError extends OutlookError {
|
|
49
|
+
/** The bridge function that isn't ported. */
|
|
50
|
+
operation;
|
|
51
|
+
platform;
|
|
44
52
|
constructor(operation, platform) {
|
|
45
53
|
super('NOT_IMPLEMENTED', `'${operation}' is not implemented for Outlook on ${platform} yet.`);
|
|
46
54
|
this.operation = operation;
|
|
@@ -50,6 +58,7 @@ class NotImplementedError extends OutlookError {
|
|
|
50
58
|
exports.NotImplementedError = NotImplementedError;
|
|
51
59
|
/** No configured Outlook account matches the requested address. */
|
|
52
60
|
class AccountNotFoundError extends OutlookError {
|
|
61
|
+
account;
|
|
53
62
|
constructor(account) {
|
|
54
63
|
super('ACCOUNT_NOT_FOUND', `Outlook account '${account}' not found.`);
|
|
55
64
|
this.account = account;
|
|
@@ -58,6 +67,8 @@ class AccountNotFoundError extends OutlookError {
|
|
|
58
67
|
exports.AccountNotFoundError = AccountNotFoundError;
|
|
59
68
|
/** A named folder, template, signature or item didn't resolve. */
|
|
60
69
|
class NotFoundError extends OutlookError {
|
|
70
|
+
/** What kind of thing was looked up — 'folder', 'template', 'signature', 'email'. */
|
|
71
|
+
kind;
|
|
61
72
|
constructor(kind, message) {
|
|
62
73
|
super('NOT_FOUND', message);
|
|
63
74
|
this.kind = kind;
|
|
@@ -80,6 +91,10 @@ exports.InvalidRequestError = InvalidRequestError;
|
|
|
80
91
|
* attached to the failure itself.
|
|
81
92
|
*/
|
|
82
93
|
class ScriptError extends OutlookError {
|
|
94
|
+
runner;
|
|
95
|
+
script;
|
|
96
|
+
stderr;
|
|
97
|
+
durationMs;
|
|
83
98
|
constructor(init) {
|
|
84
99
|
super('SCRIPT_FAILED', init.stderr || `${init.runner} failed with no output.`, { cause: init.cause });
|
|
85
100
|
this.runner = init.runner;
|
|
@@ -91,6 +106,9 @@ class ScriptError extends OutlookError {
|
|
|
91
106
|
exports.ScriptError = ScriptError;
|
|
92
107
|
/** The run exceeded its budget and was killed. */
|
|
93
108
|
class TimeoutError extends OutlookError {
|
|
109
|
+
runner;
|
|
110
|
+
timeoutMs;
|
|
111
|
+
script;
|
|
94
112
|
constructor(init) {
|
|
95
113
|
super('TIMEOUT', `${init.runner} run exceeded its ${init.timeoutMs}ms budget and was killed.`);
|
|
96
114
|
this.runner = init.runner;
|
|
@@ -101,6 +119,7 @@ class TimeoutError extends OutlookError {
|
|
|
101
119
|
exports.TimeoutError = TimeoutError;
|
|
102
120
|
/** The caller's AbortSignal fired. */
|
|
103
121
|
class AbortedError extends OutlookError {
|
|
122
|
+
runner;
|
|
104
123
|
constructor(runner, reason) {
|
|
105
124
|
super('ABORTED', `${runner} run was aborted by the caller.`, { cause: reason });
|
|
106
125
|
this.runner = runner;
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,gFAAgF;AAChF,EAAE;AACF,iFAAiF;AACjF,8EAA8E;AAC9E,uCAAuC;;;AA4KvC,gDAsBC;AAvKD,mEAAmE;AACnE,MAAa,YAAa,SAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA,gCAAgC;AAChC,EA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,YAAY,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,MAAM,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,KAAK;QAAE,OAAO,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,OAAO,IAAI,WAAW,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,IAAI,SAAS,EAAE,CAAC,CAAC;AAClG,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { getOutlookAccounts, sendOutlookEmail, replyOutlookEmail, sendAllDrafts, readInboxEmails, searchInboxByFilter, readSelectedEmail, readEmailBody, openOutlookEmail, listInboxFolders, moveOutlookEmails, listOutlookDrafts, deleteOutlookDrafts, deleteOutlookEmails, purgeDeletedItems, saveEmailAttachment, saveEmailAttachmentDetailed, saveEmailAttachments, cleanUndeliverableEmails, collectBouncedRecipients, readSentRecipientGroups, listOutlookSignatures, readOutlookSignatureHtml, readTemplateEmails, saveTemplateEmail, editEmailTemplate, } from './OutlookService';
|
|
1
|
+
export { getOutlookAccounts, sendOutlookEmail, replyOutlookEmail, sendAllDrafts, readInboxEmails, searchInboxByFilter, readSelectedEmail, readEmailBody, openOutlookEmail, listInboxFolders, moveOutlookEmails, listOutlookDrafts, deleteOutlookDrafts, sendDrafts, deleteOutlookEmails, purgeDeletedItems, saveEmailAttachment, saveEmailAttachmentDetailed, saveEmailAttachments, cleanUndeliverableEmails, collectBouncedRecipients, readSentRecipientGroups, listOutlookSignatures, readOutlookSignatureHtml, readTemplateEmails, saveTemplateEmail, editEmailTemplate, } from './OutlookService';
|
|
2
2
|
export { createOutlookBridge, capabilities, supports } from './OutlookService';
|
|
3
3
|
export type { OutlookBridgeInstance } from './OutlookService';
|
|
4
4
|
export { configure, getConfig } from './runtime';
|
|
@@ -6,6 +6,6 @@ export type { BridgeOptions, BridgeDebugEvent, ResolvedConfig } from './runtime'
|
|
|
6
6
|
export { OutlookError, UnsupportedPlatformError, NotImplementedError, AccountNotFoundError, NotFoundError, InvalidRequestError, ScriptError, TimeoutError, AbortedError, } from './errors';
|
|
7
7
|
export type { OutlookErrorCode } from './errors';
|
|
8
8
|
export { mailFolderRef, splitQuotedOriginal, WELL_KNOWN_FOLDERS } from './mail';
|
|
9
|
-
export type { OutlookBridge, BridgeCapability, CapabilityMap, SendEmailParams, ReplyEmailParams, ReplyEmailResult, DraftSendFailure, SendAllDraftsResult, OutlookDraft, ListDraftsResult, DeleteDraftsResult, DeleteMailOptions, DeleteMailOutcome, DeleteMailResult, PurgeDeletedItemsResult, UndeliverableEmail, CleanUndeliverableResult, SentRecipientGroup, InboxEmail, InboxSearchFilter, InboxSearchMatch, SelectedEmail, EmailBodyResult, MailFolderRef, InboxFolderInfo, MoveEmailsResult, SavedAttachment, TemplateEmail, TemplateFolderResult, SaveTemplateResult, } from './types';
|
|
9
|
+
export type { OutlookBridge, BridgeCapability, CapabilityMap, SendEmailParams, ReplyEmailParams, ReplyEmailResult, DraftSendFailure, SendAllDraftsResult, OutlookDraft, ListDraftsResult, DeleteDraftsResult, SendDraftsFailure, SendDraftsResult, DeleteMailOptions, DeleteMailOutcome, DeleteMailResult, PurgeDeletedItemsResult, UndeliverableEmail, CleanUndeliverableResult, SentRecipientGroup, InboxEmail, InboxSearchFilter, InboxSearchMatch, SelectedEmail, EmailBodyResult, MailFolderRef, InboxFolderInfo, MoveEmailsResult, SavedAttachment, TemplateEmail, TemplateFolderResult, SaveTemplateResult, } from './types';
|
|
10
10
|
export { findTemplateMarkers, replaceToken, removeTokenLine, findTokens, findUnfilledTokens, composeTemplateBody, } from './outlookTemplateSections';
|
|
11
11
|
export type { TemplateMarkers, ComposeOptions } from './outlookTemplateSections';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.composeTemplateBody = exports.findUnfilledTokens = exports.findTokens = exports.removeTokenLine = exports.replaceToken = exports.findTemplateMarkers = exports.WELL_KNOWN_FOLDERS = exports.splitQuotedOriginal = exports.mailFolderRef = exports.AbortedError = exports.TimeoutError = exports.ScriptError = exports.InvalidRequestError = exports.NotFoundError = exports.AccountNotFoundError = exports.NotImplementedError = exports.UnsupportedPlatformError = exports.OutlookError = exports.getConfig = exports.configure = exports.supports = exports.capabilities = exports.createOutlookBridge = exports.editEmailTemplate = exports.saveTemplateEmail = exports.readTemplateEmails = exports.readOutlookSignatureHtml = exports.listOutlookSignatures = exports.readSentRecipientGroups = exports.collectBouncedRecipients = exports.cleanUndeliverableEmails = exports.saveEmailAttachments = exports.saveEmailAttachmentDetailed = exports.saveEmailAttachment = exports.purgeDeletedItems = exports.deleteOutlookEmails = exports.deleteOutlookDrafts = exports.listOutlookDrafts = exports.moveOutlookEmails = exports.listInboxFolders = exports.openOutlookEmail = exports.readEmailBody = exports.readSelectedEmail = exports.searchInboxByFilter = exports.readInboxEmails = exports.sendAllDrafts = exports.replyOutlookEmail = exports.sendOutlookEmail = exports.getOutlookAccounts = void 0;
|
|
3
|
+
exports.composeTemplateBody = exports.findUnfilledTokens = exports.findTokens = exports.removeTokenLine = exports.replaceToken = exports.findTemplateMarkers = exports.WELL_KNOWN_FOLDERS = exports.splitQuotedOriginal = exports.mailFolderRef = exports.AbortedError = exports.TimeoutError = exports.ScriptError = exports.InvalidRequestError = exports.NotFoundError = exports.AccountNotFoundError = exports.NotImplementedError = exports.UnsupportedPlatformError = exports.OutlookError = exports.getConfig = exports.configure = exports.supports = exports.capabilities = exports.createOutlookBridge = exports.editEmailTemplate = exports.saveTemplateEmail = exports.readTemplateEmails = exports.readOutlookSignatureHtml = exports.listOutlookSignatures = exports.readSentRecipientGroups = exports.collectBouncedRecipients = exports.cleanUndeliverableEmails = exports.saveEmailAttachments = exports.saveEmailAttachmentDetailed = exports.saveEmailAttachment = exports.purgeDeletedItems = exports.deleteOutlookEmails = exports.sendDrafts = exports.deleteOutlookDrafts = exports.listOutlookDrafts = exports.moveOutlookEmails = exports.listInboxFolders = exports.openOutlookEmail = exports.readEmailBody = exports.readSelectedEmail = exports.searchInboxByFilter = exports.readInboxEmails = exports.sendAllDrafts = exports.replyOutlookEmail = exports.sendOutlookEmail = exports.getOutlookAccounts = void 0;
|
|
4
4
|
// Public API surface. Deliberately explicit (rather than `export *`) so the
|
|
5
5
|
// package only ever exposes what it means to support; `package.json`'s `exports`
|
|
6
6
|
// map closes the deep-import path that would otherwise reach around this.
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "listInboxFolders", { enumerable: true, get: func
|
|
|
18
18
|
Object.defineProperty(exports, "moveOutlookEmails", { enumerable: true, get: function () { return OutlookService_1.moveOutlookEmails; } });
|
|
19
19
|
Object.defineProperty(exports, "listOutlookDrafts", { enumerable: true, get: function () { return OutlookService_1.listOutlookDrafts; } });
|
|
20
20
|
Object.defineProperty(exports, "deleteOutlookDrafts", { enumerable: true, get: function () { return OutlookService_1.deleteOutlookDrafts; } });
|
|
21
|
+
Object.defineProperty(exports, "sendDrafts", { enumerable: true, get: function () { return OutlookService_1.sendDrafts; } });
|
|
21
22
|
Object.defineProperty(exports, "deleteOutlookEmails", { enumerable: true, get: function () { return OutlookService_1.deleteOutlookEmails; } });
|
|
22
23
|
Object.defineProperty(exports, "purgeDeletedItems", { enumerable: true, get: function () { return OutlookService_1.purgeDeletedItems; } });
|
|
23
24
|
Object.defineProperty(exports, "saveEmailAttachment", { enumerable: true, get: function () { return OutlookService_1.saveEmailAttachment; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,4EAA4E;AAC5E,iFAAiF;AACjF,0EAA0E;AAC1E,
|
|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ACnB,8GAAA,oBAAoB,OAAA;AACpB,uGAAA,aAAa,OAAA;AACb,6GAAA,mBAAmB,OAAA;AACnB,qGAAA,WAAW,OAAA;AACX,sGAAA,YAAY,OAAA;AACZ,sGAAA,YAAY,OAAA;AAIhB,4EAA4E;AAC5E,4DAA4D;AAC5D,+BAAgF;AAAvE,qGAAA,aAAa,OAAA;AAAE,2GAAA,mBAAmB,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AAqC/D,qEAOmC;AAN/B,8HAAA,mBAAmB,OAAA;AACnB,uHAAA,YAAY,OAAA;AACZ,0HAAA,eAAe,OAAA;AACf,qHAAA,UAAU,OAAA;AACV,6HAAA,kBAAkB,OAAA;AAClB,8HAAA,mBAAmB,OAAA"}
|
package/dist/mac/drafts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeleteDraftsResult, ListDraftsResult, SendAllDraftsResult } from '../types';
|
|
1
|
+
import type { DeleteDraftsResult, ListDraftsResult, SendAllDraftsResult, SendDraftsResult } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* List the mail drafts belonging to `emailAccount`, newest first.
|
|
4
4
|
*
|
|
@@ -25,3 +25,14 @@ export declare function sendAllDrafts(emailAccount: string): Promise<SendAllDraf
|
|
|
25
25
|
* general-purpose "delete any email by id" tool, which is not what it is for.
|
|
26
26
|
*/
|
|
27
27
|
export declare function deleteOutlookDrafts(emailAccount: string, entryIds: string[]): Promise<DeleteDraftsResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Send a chosen subset of `emailAccount`'s drafts by message id — e.g. after
|
|
30
|
+
* `listOutlookDrafts` and a user review pass — instead of `sendAllDrafts`'s
|
|
31
|
+
* account-wide sweep.
|
|
32
|
+
*
|
|
33
|
+
* Same ownership gate as `deleteOutlookDrafts`: every id must resolve to a
|
|
34
|
+
* message sitting in THIS account's Drafts folder before anything is sent. An
|
|
35
|
+
* id pointing at ordinary mail, or at another account's draft, is refused and
|
|
36
|
+
* reported rather than sent.
|
|
37
|
+
*/
|
|
38
|
+
export declare function sendDrafts(emailAccount: string, entryIds: string[]): Promise<SendDraftsResult>;
|
package/dist/mac/drafts.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.listOutlookDrafts = listOutlookDrafts;
|
|
4
4
|
exports.sendAllDrafts = sendAllDrafts;
|
|
5
5
|
exports.deleteOutlookDrafts = deleteOutlookDrafts;
|
|
6
|
+
exports.sendDrafts = sendDrafts;
|
|
6
7
|
// Drafts: which ones belong to an account, and sending, listing or deleting them.
|
|
7
8
|
//
|
|
8
9
|
// Where Windows has to scan two Drafts folders and prove each item's
|
|
@@ -211,4 +212,74 @@ end tell`;
|
|
|
211
212
|
],
|
|
212
213
|
};
|
|
213
214
|
}
|
|
215
|
+
/**
|
|
216
|
+
* Send a chosen subset of `emailAccount`'s drafts by message id — e.g. after
|
|
217
|
+
* `listOutlookDrafts` and a user review pass — instead of `sendAllDrafts`'s
|
|
218
|
+
* account-wide sweep.
|
|
219
|
+
*
|
|
220
|
+
* Same ownership gate as `deleteOutlookDrafts`: every id must resolve to a
|
|
221
|
+
* message sitting in THIS account's Drafts folder before anything is sent. An
|
|
222
|
+
* id pointing at ordinary mail, or at another account's draft, is refused and
|
|
223
|
+
* reported rather than sent.
|
|
224
|
+
*/
|
|
225
|
+
async function sendDrafts(emailAccount, entryIds) {
|
|
226
|
+
if (entryIds.length === 0)
|
|
227
|
+
return { sent: 0, failed: [] };
|
|
228
|
+
const { valid, invalid } = (0, scripts_1.partitionMessageIds)(entryIds);
|
|
229
|
+
if (valid.length === 0) {
|
|
230
|
+
return { sent: 0, failed: invalid.map(f => ({ entryId: f.entryId, subject: '', error: f.error })) };
|
|
231
|
+
}
|
|
232
|
+
const script = `tell application "Microsoft Outlook"
|
|
233
|
+
${(0, scripts_1.accountLookupSnippet)(emailAccount)}
|
|
234
|
+
set draftsFolder to drafts of targetAcct
|
|
235
|
+
set draftsName to (name of draftsFolder) as string
|
|
236
|
+
set draftIds to id of every message of draftsFolder
|
|
237
|
+
set sentCount to 0
|
|
238
|
+
set out to ""
|
|
239
|
+
repeat with theId in {${valid.join(', ')}}
|
|
240
|
+
set subj to ""
|
|
241
|
+
try
|
|
242
|
+
set theMsg to missing value
|
|
243
|
+
try
|
|
244
|
+
set theMsg to message id theId
|
|
245
|
+
end try
|
|
246
|
+
if theMsg is missing value then error "no such item in this account's Drafts folder"
|
|
247
|
+
try
|
|
248
|
+
set subj to (subject of theMsg) as string
|
|
249
|
+
end try
|
|
250
|
+
-- Prove it is in THIS account's Drafts before sending: the folder it
|
|
251
|
+
-- currently sits in, and the account it is bound to, must both match.
|
|
252
|
+
set inFolder to ""
|
|
253
|
+
try
|
|
254
|
+
set inFolder to (name of (folder of theMsg)) as string
|
|
255
|
+
end try
|
|
256
|
+
if inFolder is not draftsName then error "item is not in this account's Drafts folder - refusing to send"
|
|
257
|
+
if draftIds does not contain (id of theMsg) then error "item is not in this account's Drafts folder - refusing to send"
|
|
258
|
+
set boundTo to ""
|
|
259
|
+
try
|
|
260
|
+
set boundTo to (email address of (account of theMsg)) as string
|
|
261
|
+
end try
|
|
262
|
+
if boundTo is not "" and boundTo is not (email address of targetAcct) then
|
|
263
|
+
error "draft is not bound to this account - refusing to send"
|
|
264
|
+
end if
|
|
265
|
+
send theMsg
|
|
266
|
+
set sentCount to sentCount + 1
|
|
267
|
+
on error errText
|
|
268
|
+
set out to out & ${(0, run_1.asRow)(['(theId as string)', 'subj', 'errText'])}
|
|
269
|
+
end try
|
|
270
|
+
end repeat
|
|
271
|
+
return ${(0, run_1.asRow)(['(sentCount as string)'])} & out
|
|
272
|
+
end tell`;
|
|
273
|
+
const records = (0, run_1.splitRecords)(await (0, run_1.runOsaScript)(script, 300000));
|
|
274
|
+
return {
|
|
275
|
+
sent: (0, run_1.intField)((0, run_1.splitFields)(records[0] || ''), 0),
|
|
276
|
+
failed: [
|
|
277
|
+
...invalid.map(f => ({ entryId: f.entryId, subject: '', error: f.error })),
|
|
278
|
+
...records.slice(1).map(record => {
|
|
279
|
+
const parts = (0, run_1.splitFields)(record);
|
|
280
|
+
return { entryId: (0, run_1.field)(parts, 0), subject: (0, run_1.field)(parts, 1), error: (0, run_1.field)(parts, 2) };
|
|
281
|
+
}),
|
|
282
|
+
],
|
|
283
|
+
};
|
|
284
|
+
}
|
|
214
285
|
//# sourceMappingURL=drafts.js.map
|
package/dist/mac/drafts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.js","sourceRoot":"","sources":["../../src/mac/drafts.ts"],"names":[],"mappings":";;AAsBA,8CAsFC;AASD,sCAmCC;AAYD,kDAwDC;
|
|
1
|
+
{"version":3,"file":"drafts.js","sourceRoot":"","sources":["../../src/mac/drafts.ts"],"names":[],"mappings":";;AAsBA,8CAsFC;AASD,sCAmCC;AAYD,kDAwDC;AAYD,gCA8DC;AAtSD,kFAAkF;AAClF,EAAE;AACF,qEAAqE;AACrE,gFAAgF;AAChF,2EAA2E;AAC3E,6EAA6E;AAC7E,oDAAoD;AACpD,+BAAoG;AACpG,uCAAqF;AAGrF,uEAAuE;AACvE,SAAS,UAAU,CAAC,YAAoB;IACpC,OAAO,IAAA,uBAAa,EAAC,YAAY,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AACrD,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iBAAiB,CACnC,YAAoB,EACpB,KAAK,GAAG,GAAG,EACX,YAAY,GAAG,GAAG;IAElB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3C,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IACtD,MAAM,MAAM,GAAG;EACjB,IAAA,8BAAoB,EAAC,YAAY,CAAC;;;;;;;;;;;;;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,CAAC,EAAE;gBAC7B,MAAM,KAAK,GAAG,IAAA,iBAAW,EAAC,MAAM,CAAC,CAAC;gBAClC,OAAO,EAAE,OAAO,EAAE,IAAA,WAAK,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,IAAA,WAAK,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAA,WAAK,EAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC;YAC1F,CAAC,CAAC;SACL;KACJ,CAAC;AACN,CAAC"}
|
package/dist/mac/index.js
CHANGED
|
@@ -67,6 +67,7 @@ const bridge = {
|
|
|
67
67
|
moveOutlookEmails: folders_1.moveOutlookEmails,
|
|
68
68
|
listOutlookDrafts: drafts_1.listOutlookDrafts,
|
|
69
69
|
deleteOutlookDrafts: drafts_1.deleteOutlookDrafts,
|
|
70
|
+
sendDrafts: drafts_1.sendDrafts,
|
|
70
71
|
deleteOutlookEmails: cleanup_1.deleteOutlookEmails,
|
|
71
72
|
purgeDeletedItems: cleanup_1.purgeDeletedItems,
|
|
72
73
|
saveEmailAttachment: attachments_1.saveEmailAttachment,
|
package/dist/mac/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mac/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4EAA4E;AAC5E,EAAE;AACF,sEAAsE;AACtE,kFAAkF;AAClF,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,+EAA+E;AAC/E,+EAA+E;AAC/E,eAAe;AACf,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,qCAAqC;AACrC,gFAAgF;AAChF,mEAAmE;AACnE,iFAAiF;AACjF,2EAA2E;AAC3E,iEAAiE;AACjE,yCAAgD;AAChD,iCAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mac/index.ts"],"names":[],"mappings":";;;;;;;;;;;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,6BAAiB;IACjB,iBAAiB,EAAjB,6BAAiB;CACpB,CAAC;AAEO,wBAAM;AAEf,6EAA6E;AAC7E,+EAA+E;AAC/E,8EAA8E;AAC9E,oBAAoB;AACpB,6CAA2B;AAC3B,yCAAuB;AACvB,2CAAyB;AACzB,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B;AAC1B,4CAA0B;AAC1B,gDAA8B;AAC9B,+CAA6B;AAC7B,8CAA4B;AAE5B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,GAAgC,EAAE,CAAC;AAEtC,QAAA,YAAY,GAAkB,IAAA,4BAAa,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC"}
|
package/dist/runtime.js
CHANGED
|
@@ -26,7 +26,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
26
26
|
const envDebug = process.env.OUTLOOK_BRIDGE_DEBUG;
|
|
27
27
|
/** The process-wide defaults, as mutated by `configure()`. */
|
|
28
28
|
const globalConfig = {
|
|
29
|
-
timeoutMs:
|
|
29
|
+
timeoutMs: 120_000,
|
|
30
30
|
maxBufferBytes: 8 * 1024 * 1024,
|
|
31
31
|
tempDir: os_1.default.tmpdir(),
|
|
32
32
|
debug: !!envDebug && envDebug !== '0',
|
package/dist/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":";;;;;AAkFA,oCAQC;AASD,8BAEC;AAGD,8BAEC;AAGD,0CAEC;AAGD,gCAEC;AAGD,8BAWC;AAOD,4BAGC;AAUD,8CAEC;AAGD,wCAIC;AA/JD,wEAAwE;AACxE,iCAAiC;AACjC,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,+EAA+E;AAC/E,wEAAwE;AACxE,6CAAgD;AAChD,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AA+CxB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAA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C,MAAM,IAAI,CACzF,CAAC;AACN,CAAC;AAED;;;;GAIG;AACH,SAAgB,QAAQ,CAAC,IAAY,EAAE,SAAiB;IACpD,MAAM,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;IAC1E,OAAO,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,kBAAkB,IAAI,IAAI,MAAM,IAAI,SAAS,EAAE,CAAC,CAAC;AAC3F,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB;IAC7B,OAAO,YAAE,CAAC,WAAW,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,6BAA6B,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,sEAAsE;AACtE,SAAgB,cAAc,CAAC,OAAgB;IAC3C,IAAI,CAAC,OAAO;QAAE,OAAO,iBAAiB,EAAE,CAAC;IACzC,YAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -102,6 +102,17 @@ export interface DeleteDraftsResult {
|
|
|
102
102
|
error: string;
|
|
103
103
|
}[];
|
|
104
104
|
}
|
|
105
|
+
/** One draft that couldn't be sent in a selective send, identified by both id and
|
|
106
|
+
* subject — id for the caller to retry or reconcile, subject for a human report. */
|
|
107
|
+
export interface SendDraftsFailure {
|
|
108
|
+
entryId: string;
|
|
109
|
+
subject: string;
|
|
110
|
+
error: string;
|
|
111
|
+
}
|
|
112
|
+
export interface SendDraftsResult {
|
|
113
|
+
sent: number;
|
|
114
|
+
failed: SendDraftsFailure[];
|
|
115
|
+
}
|
|
105
116
|
/** What happened to one id in a deleteOutlookEmails call. */
|
|
106
117
|
export interface DeleteMailOutcome {
|
|
107
118
|
entryId: string;
|
|
@@ -328,6 +339,14 @@ export interface OutlookBridge {
|
|
|
328
339
|
moveOutlookEmails(emailAccount: string, entryIds: string[], folderName: string, createIfMissing?: boolean): Promise<MoveEmailsResult>;
|
|
329
340
|
listOutlookDrafts(emailAccount: string, limit?: number, previewChars?: number): Promise<ListDraftsResult>;
|
|
330
341
|
deleteOutlookDrafts(emailAccount: string, entryIds: string[]): Promise<DeleteDraftsResult>;
|
|
342
|
+
/**
|
|
343
|
+
* Send a chosen subset of an account's drafts by EntryID — e.g. after
|
|
344
|
+
* `listOutlookDrafts` and a user review pass — rather than the account-wide
|
|
345
|
+
* `sendAllDrafts`. Same "must be THIS account's draft" gate as
|
|
346
|
+
* `deleteOutlookDrafts`: an id pointing at ordinary mail, or at another
|
|
347
|
+
* account's draft, is refused and reported rather than sent.
|
|
348
|
+
*/
|
|
349
|
+
sendDrafts(emailAccount: string, entryIds: string[]): Promise<SendDraftsResult>;
|
|
331
350
|
deleteOutlookEmails(emailAccount: string, entryIds: string[], options?: DeleteMailOptions): Promise<DeleteMailResult>;
|
|
332
351
|
purgeDeletedItems(emailAccount: string, olderThanDays?: number, dryRun?: boolean): Promise<PurgeDeletedItemsResult>;
|
|
333
352
|
saveEmailAttachment(entryId: string, fileName: string, storeId?: string, destDir?: string): Promise<string>;
|
package/dist/windows/drafts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DeleteDraftsResult, ListDraftsResult, SendAllDraftsResult } from '../types';
|
|
1
|
+
import type { DeleteDraftsResult, ListDraftsResult, SendAllDraftsResult, SendDraftsResult } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Send the mail drafts that belong to `emailAccount`, wherever Outlook filed them.
|
|
4
4
|
* Which drafts those are is DRAFTS_SCAN_PS's rule, not this function's.
|
|
@@ -27,3 +27,14 @@ export declare function listOutlookDrafts(emailAccount: string, limit?: number,
|
|
|
27
27
|
* general-purpose "delete any email by id" tool, which is not what it is for.
|
|
28
28
|
*/
|
|
29
29
|
export declare function deleteOutlookDrafts(emailAccount: string, entryIds: string[]): Promise<DeleteDraftsResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Send a chosen subset of `emailAccount`'s drafts by EntryID — e.g. after
|
|
32
|
+
* `listOutlookDrafts` and a user review pass — instead of `sendAllDrafts`'s
|
|
33
|
+
* account-wide sweep.
|
|
34
|
+
*
|
|
35
|
+
* Same ownership gate as `deleteOutlookDrafts`: every id must resolve to a mail
|
|
36
|
+
* item sitting in one of THIS account's Drafts folders before anything is sent.
|
|
37
|
+
* An id pointing at ordinary inbox mail, or at another account's draft, is
|
|
38
|
+
* refused and reported rather than sent.
|
|
39
|
+
*/
|
|
40
|
+
export declare function sendDrafts(emailAccount: string, entryIds: string[]): Promise<SendDraftsResult>;
|
package/dist/windows/drafts.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sendAllDrafts = sendAllDrafts;
|
|
4
4
|
exports.listOutlookDrafts = listOutlookDrafts;
|
|
5
5
|
exports.deleteOutlookDrafts = deleteOutlookDrafts;
|
|
6
|
+
exports.sendDrafts = sendDrafts;
|
|
6
7
|
// Drafts: which ones belong to an account, and sending, listing or deleting them.
|
|
7
8
|
const run_1 = require("./run");
|
|
8
9
|
const scripts_1 = require("./scripts");
|
|
@@ -250,4 +251,63 @@ ConvertTo-Json @{ deleted = $deleted; failed = @($failed) } -Depth 3
|
|
|
250
251
|
}),
|
|
251
252
|
};
|
|
252
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Send a chosen subset of `emailAccount`'s drafts by EntryID — e.g. after
|
|
256
|
+
* `listOutlookDrafts` and a user review pass — instead of `sendAllDrafts`'s
|
|
257
|
+
* account-wide sweep.
|
|
258
|
+
*
|
|
259
|
+
* Same ownership gate as `deleteOutlookDrafts`: every id must resolve to a mail
|
|
260
|
+
* item sitting in one of THIS account's Drafts folders before anything is sent.
|
|
261
|
+
* An id pointing at ordinary inbox mail, or at another account's draft, is
|
|
262
|
+
* refused and reported rather than sent.
|
|
263
|
+
*/
|
|
264
|
+
async function sendDrafts(emailAccount, entryIds) {
|
|
265
|
+
(0, run_1.requireWindows)();
|
|
266
|
+
if (entryIds.length === 0)
|
|
267
|
+
return { sent: 0, failed: [] };
|
|
268
|
+
const script = `${draftsScript(emailAccount)}
|
|
269
|
+
# Index this account's Drafts folders by EntryID, so a resolved item can be PROVED
|
|
270
|
+
# to live in one of them before it is sent.
|
|
271
|
+
$draftFolderIds = @{}
|
|
272
|
+
foreach ($entry in $scan) { $draftFolderIds[$entry.folder.EntryID] = $entry.includeNull }
|
|
273
|
+
|
|
274
|
+
$sent = 0
|
|
275
|
+
$failed = @()
|
|
276
|
+
foreach ($id in @(${(0, run_1.psList)(entryIds)})) {
|
|
277
|
+
$subj = ''
|
|
278
|
+
try {
|
|
279
|
+
$it = $null
|
|
280
|
+
foreach ($entry in $scan) {
|
|
281
|
+
try {
|
|
282
|
+
$it = $ns.GetItemFromID($id, $entry.folder.StoreID)
|
|
283
|
+
if ($it -ne $null) { break }
|
|
284
|
+
} catch { $it = $null }
|
|
285
|
+
}
|
|
286
|
+
if ($it -eq $null) { throw "no such item in this account's Drafts folders" }
|
|
287
|
+
try { $subj = $it.Subject } catch {}
|
|
288
|
+
$parentId = ''
|
|
289
|
+
try { $parentId = $it.Parent.EntryID } catch {}
|
|
290
|
+
if (-not $draftFolderIds.ContainsKey($parentId)) {
|
|
291
|
+
throw "item is not in this account's Drafts folder - refusing to send"
|
|
292
|
+
}
|
|
293
|
+
if (-not (Test-DraftMatches $it $draftFolderIds[$parentId])) {
|
|
294
|
+
throw "draft is not bound to $target - refusing to send"
|
|
295
|
+
}
|
|
296
|
+
$it.Send()
|
|
297
|
+
$sent++
|
|
298
|
+
} catch {
|
|
299
|
+
$failed += [pscustomobject]@{ entryId = $id; subject = $subj; error = $_.Exception.Message }
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
[pscustomobject]@{ sent = $sent; failed = @($failed) } | ConvertTo-Json -Compress -Depth 4
|
|
303
|
+
`;
|
|
304
|
+
const parsed = (0, json_1.parseObject)(await (0, run_1.runPowerShell)(script, 300000));
|
|
305
|
+
return {
|
|
306
|
+
sent: (0, json_1.num)(parsed.sent),
|
|
307
|
+
failed: (0, json_1.toArray)(parsed.failed).map(f => {
|
|
308
|
+
const e = (0, json_1.record)(f);
|
|
309
|
+
return { entryId: (0, json_1.str)(e.entryId), subject: (0, json_1.str)(e.subject), error: (0, json_1.str)(e.error) };
|
|
310
|
+
}),
|
|
311
|
+
};
|
|
312
|
+
}
|
|
253
313
|
//# sourceMappingURL=drafts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.js","sourceRoot":"","sources":["../../src/windows/drafts.ts"],"names":[],"mappings":";;AAuEA,sCA0CC;AAWD,8CAyEC;AAWD,kDAgDC;
|
|
1
|
+
{"version":3,"file":"drafts.js","sourceRoot":"","sources":["../../src/windows/drafts.ts"],"names":[],"mappings":";;AAuEA,sCA0CC;AAWD,8CAyEC;AAWD,kDAgDC;AAYD,gCAkDC;AA9TD,kFAAkF;AAClF,+BAA8D;AAC9D,uCAA0C;AAC1C,yCAAiF;AAGjF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BtB,CAAC;AAEF,+EAA+E;AAC/E,SAAS,YAAY,CAAC,YAAoB;IACtC,OAAO,IAAA,uBAAa,EAAC,YAAY,CAAC,GAAG,cAAc,CAAC;AACxD,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,aAAa,CAAC,YAAoB;IACpD,IAAA,oBAAc,GAAE,CAAC;IACjB,MAAM,MAAM,GAAG,GAAG,YAAY,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;CAwB/C,CAAC;IACE,IAAI,CAAC;QACD,M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C,CAAC,CAAC;YACpB,OAAO,EAAE,OAAO,EAAE,IAAA,UAAG,EAAC,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,IAAA,UAAG,EAAC,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,IAAA,UAAG,EAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;QACrF,CAAC,CAAC;KACL,CAAC;AACN,CAAC"}
|
package/dist/windows/index.js
CHANGED
|
@@ -58,6 +58,7 @@ const bridge = {
|
|
|
58
58
|
moveOutlookEmails: folders_1.moveOutlookEmails,
|
|
59
59
|
listOutlookDrafts: drafts_1.listOutlookDrafts,
|
|
60
60
|
deleteOutlookDrafts: drafts_1.deleteOutlookDrafts,
|
|
61
|
+
sendDrafts: drafts_1.sendDrafts,
|
|
61
62
|
deleteOutlookEmails: cleanup_1.deleteOutlookEmails,
|
|
62
63
|
purgeDeletedItems: cleanup_1.purgeDeletedItems,
|
|
63
64
|
saveEmailAttachment: attachments_1.saveEmailAttachment,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/windows/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uEAAuE;AACvE,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAC9E,mCAAmC;AACnC,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,yCAAgD;AAChD,iCAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/windows/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uEAAuE;AACvE,EAAE;AACF,0EAA0E;AAC1E,8EAA8E;AAC9E,2EAA2E;AAC3E,8EAA8E;AAC9E,mCAAmC;AACnC,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,yCAAgD;AAChD,iCAA6D;AAC7D,qCAA6F;AAC7F,iCAAmH;AACnH,uC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,0GAAA,eAAe,OAAA;AAExB;;;GAGG;AACU,QAAA,YAAY,GAAkB,IAAA,4BAAa,EAAC,MAAM,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dawnlit/outlook-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Desktop Outlook automation for Node — read, send, reply, file, and template mail by driving the real Outlook client.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Dawnlit",
|