@jbctechsolutions/mcp-office365 2.5.1 → 4.0.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 +66 -57
- package/dist/approval/hash.d.ts +8 -8
- package/dist/approval/token-manager.d.ts +37 -19
- package/dist/approval/token-manager.d.ts.map +1 -1
- package/dist/approval/token-manager.js +133 -37
- package/dist/approval/token-manager.js.map +1 -1
- package/dist/approval/types.d.ts +7 -3
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/cli.d.ts +21 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +100 -2
- package/dist/cli.js.map +1 -1
- package/dist/database/repository.d.ts +48 -48
- package/dist/database/repository.d.ts.map +1 -1
- package/dist/database/repository.js.map +1 -1
- package/dist/delta/mirror.d.ts +67 -0
- package/dist/delta/mirror.d.ts.map +1 -0
- package/dist/delta/mirror.js +183 -0
- package/dist/delta/mirror.js.map +1 -0
- package/dist/graph/auth/account-id.d.ts +19 -0
- package/dist/graph/auth/account-id.d.ts.map +1 -0
- package/dist/graph/auth/account-id.js +55 -0
- package/dist/graph/auth/account-id.js.map +1 -0
- package/dist/graph/auth/config.d.ts +1 -1
- package/dist/graph/auth/config.d.ts.map +1 -1
- package/dist/graph/auth/config.js +13 -1
- package/dist/graph/auth/config.js.map +1 -1
- package/dist/graph/auth/device-code-flow.d.ts +3 -1
- package/dist/graph/auth/device-code-flow.d.ts.map +1 -1
- package/dist/graph/auth/device-code-flow.js +42 -14
- package/dist/graph/auth/device-code-flow.js.map +1 -1
- package/dist/graph/auth/index.d.ts +1 -0
- package/dist/graph/auth/index.d.ts.map +1 -1
- package/dist/graph/auth/index.js +1 -0
- package/dist/graph/auth/index.js.map +1 -1
- package/dist/graph/auth/token-cache.js +2 -2
- package/dist/graph/auth/token-cache.js.map +1 -1
- package/dist/graph/client/graph-client.d.ts +141 -8
- package/dist/graph/client/graph-client.d.ts.map +1 -1
- package/dist/graph/client/graph-client.js +536 -48
- package/dist/graph/client/graph-client.js.map +1 -1
- package/dist/graph/client/immutable-id-middleware.d.ts +50 -0
- package/dist/graph/client/immutable-id-middleware.d.ts.map +1 -0
- package/dist/graph/client/immutable-id-middleware.js +137 -0
- package/dist/graph/client/immutable-id-middleware.js.map +1 -0
- package/dist/graph/content-readers.d.ts +0 -12
- package/dist/graph/content-readers.d.ts.map +1 -1
- package/dist/graph/content-readers.js +0 -21
- package/dist/graph/content-readers.js.map +1 -1
- package/dist/graph/index.d.ts +5 -6
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +5 -6
- package/dist/graph/index.js.map +1 -1
- package/dist/graph/mailbox-adapter.d.ts +15 -15
- package/dist/graph/mappers/contact-mapper.d.ts +4 -1
- package/dist/graph/mappers/contact-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/contact-mapper.js +7 -3
- package/dist/graph/mappers/contact-mapper.js.map +1 -1
- package/dist/graph/mappers/email-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/email-mapper.js +7 -4
- package/dist/graph/mappers/email-mapper.js.map +1 -1
- package/dist/graph/mappers/event-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/event-mapper.js +6 -3
- package/dist/graph/mappers/event-mapper.js.map +1 -1
- package/dist/graph/mappers/folder-mapper.d.ts +0 -4
- package/dist/graph/mappers/folder-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/folder-mapper.js +9 -19
- package/dist/graph/mappers/folder-mapper.js.map +1 -1
- package/dist/graph/mappers/index.d.ts +2 -2
- package/dist/graph/mappers/index.d.ts.map +1 -1
- package/dist/graph/mappers/index.js +2 -2
- package/dist/graph/mappers/index.js.map +1 -1
- package/dist/graph/mappers/task-mapper.d.ts +4 -2
- package/dist/graph/mappers/task-mapper.d.ts.map +1 -1
- package/dist/graph/mappers/task-mapper.js +7 -5
- package/dist/graph/mappers/task-mapper.js.map +1 -1
- package/dist/graph/mappers/utils.d.ts +0 -10
- package/dist/graph/mappers/utils.d.ts.map +1 -1
- package/dist/graph/mappers/utils.js +0 -19
- package/dist/graph/mappers/utils.js.map +1 -1
- package/dist/graph/repository.d.ts +409 -276
- package/dist/graph/repository.d.ts.map +1 -1
- package/dist/graph/repository.js +772 -1082
- package/dist/graph/repository.js.map +1 -1
- package/dist/ids/mint.d.ts +31 -0
- package/dist/ids/mint.d.ts.map +1 -0
- package/dist/ids/mint.js +36 -0
- package/dist/ids/mint.js.map +1 -0
- package/dist/ids/next-action.d.ts +29 -0
- package/dist/ids/next-action.d.ts.map +1 -0
- package/dist/ids/next-action.js +58 -0
- package/dist/ids/next-action.js.map +1 -0
- package/dist/ids/resolver.d.ts +31 -0
- package/dist/ids/resolver.d.ts.map +1 -0
- package/dist/ids/resolver.js +52 -0
- package/dist/ids/resolver.js.map +1 -0
- package/dist/ids/schema.d.ts +91 -0
- package/dist/ids/schema.d.ts.map +1 -0
- package/dist/ids/schema.js +131 -0
- package/dist/ids/schema.js.map +1 -0
- package/dist/ids/token.d.ts +62 -0
- package/dist/ids/token.d.ts.map +1 -0
- package/dist/ids/token.js +225 -0
- package/dist/ids/token.js.map +1 -0
- package/dist/index.d.ts +10 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +255 -5925
- package/dist/index.js.map +1 -1
- package/dist/parsers/index.d.ts +0 -1
- package/dist/parsers/index.d.ts.map +1 -1
- package/dist/parsers/index.js +0 -1
- package/dist/parsers/index.js.map +1 -1
- package/dist/registry/all-tools.d.ts +14 -0
- package/dist/registry/all-tools.d.ts.map +1 -0
- package/dist/registry/all-tools.js +68 -0
- package/dist/registry/all-tools.js.map +1 -0
- package/dist/registry/context.d.ts +19 -0
- package/dist/registry/context.d.ts.map +1 -0
- package/dist/registry/context.js +20 -0
- package/dist/registry/context.js.map +1 -0
- package/dist/registry/define-tool.d.ts +15 -0
- package/dist/registry/define-tool.d.ts.map +1 -0
- package/dist/registry/define-tool.js +8 -0
- package/dist/registry/define-tool.js.map +1 -0
- package/dist/registry/elicit-links.d.ts +35 -0
- package/dist/registry/elicit-links.d.ts.map +1 -0
- package/dist/registry/elicit-links.js +102 -0
- package/dist/registry/elicit-links.js.map +1 -0
- package/dist/registry/elicitor.d.ts +24 -0
- package/dist/registry/elicitor.d.ts.map +1 -0
- package/dist/registry/elicitor.js +51 -0
- package/dist/registry/elicitor.js.map +1 -0
- package/dist/registry/index.d.ts +13 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +8 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/registry.d.ts +73 -0
- package/dist/registry/registry.d.ts.map +1 -0
- package/dist/registry/registry.js +221 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/registry/types.d.ts +146 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +6 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/search/compiler.d.ts +49 -0
- package/dist/search/compiler.d.ts.map +1 -0
- package/dist/search/compiler.js +168 -0
- package/dist/search/compiler.js.map +1 -0
- package/dist/signature.js +2 -2
- package/dist/signature.js.map +1 -1
- package/dist/state/delta-store.d.ts +85 -0
- package/dist/state/delta-store.d.ts.map +1 -0
- package/dist/state/delta-store.js +124 -0
- package/dist/state/delta-store.js.map +1 -0
- package/dist/state/migrate.d.ts +23 -0
- package/dist/state/migrate.d.ts.map +1 -0
- package/dist/state/migrate.js +81 -0
- package/dist/state/migrate.js.map +1 -0
- package/dist/state/schema.d.ts +26 -0
- package/dist/state/schema.d.ts.map +1 -0
- package/dist/state/schema.js +77 -0
- package/dist/state/schema.js.map +1 -0
- package/dist/state/store.d.ts +155 -0
- package/dist/state/store.d.ts.map +1 -0
- package/dist/state/store.js +321 -0
- package/dist/state/store.js.map +1 -0
- package/dist/tools/calendar-graph.d.ts +41 -0
- package/dist/tools/calendar-graph.d.ts.map +1 -0
- package/dist/tools/calendar-graph.js +299 -0
- package/dist/tools/calendar-graph.js.map +1 -0
- package/dist/tools/calendar-permissions.d.ts +17 -7
- package/dist/tools/calendar-permissions.d.ts.map +1 -1
- package/dist/tools/calendar-permissions.js +60 -4
- package/dist/tools/calendar-permissions.js.map +1 -1
- package/dist/tools/calendar.d.ts +133 -82
- package/dist/tools/calendar.d.ts.map +1 -1
- package/dist/tools/calendar.js +249 -136
- package/dist/tools/calendar.js.map +1 -1
- package/dist/tools/categories.d.ts +14 -4
- package/dist/tools/categories.d.ts.map +1 -1
- package/dist/tools/categories.js +59 -2
- package/dist/tools/categories.js.map +1 -1
- package/dist/tools/checklist-items.d.ts +19 -9
- package/dist/tools/checklist-items.d.ts.map +1 -1
- package/dist/tools/checklist-items.js +71 -5
- package/dist/tools/checklist-items.js.map +1 -1
- package/dist/tools/contact-folders.d.ts +50 -0
- package/dist/tools/contact-folders.d.ts.map +1 -0
- package/dist/tools/contact-folders.js +136 -0
- package/dist/tools/contact-folders.js.map +1 -0
- package/dist/tools/contacts-graph.d.ts +45 -0
- package/dist/tools/contacts-graph.d.ts.map +1 -0
- package/dist/tools/contacts-graph.js +174 -0
- package/dist/tools/contacts-graph.js.map +1 -0
- package/dist/tools/contacts.d.ts +61 -30
- package/dist/tools/contacts.d.ts.map +1 -1
- package/dist/tools/contacts.js +150 -93
- package/dist/tools/contacts.js.map +1 -1
- package/dist/tools/excel.d.ts +20 -10
- package/dist/tools/excel.d.ts.map +1 -1
- package/dist/tools/excel.js +82 -6
- package/dist/tools/excel.js.map +1 -1
- package/dist/tools/focused-overrides.d.ts +14 -4
- package/dist/tools/focused-overrides.d.ts.map +1 -1
- package/dist/tools/focused-overrides.js +59 -2
- package/dist/tools/focused-overrides.js.map +1 -1
- package/dist/tools/index.d.ts +4 -5
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -6
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/linked-resources.d.ts +17 -7
- package/dist/tools/linked-resources.d.ts.map +1 -1
- package/dist/tools/linked-resources.js +60 -4
- package/dist/tools/linked-resources.js.map +1 -1
- package/dist/tools/mail-graph.d.ts +38 -0
- package/dist/tools/mail-graph.d.ts.map +1 -0
- package/dist/tools/mail-graph.js +187 -0
- package/dist/tools/mail-graph.js.map +1 -0
- package/dist/tools/mail-rules.d.ts +20 -8
- package/dist/tools/mail-rules.d.ts.map +1 -1
- package/dist/tools/mail-rules.js +63 -7
- package/dist/tools/mail-rules.js.map +1 -1
- package/dist/tools/mail-send.d.ts +39 -27
- package/dist/tools/mail-send.d.ts.map +1 -1
- package/dist/tools/mail-send.js +249 -24
- package/dist/tools/mail-send.js.map +1 -1
- package/dist/tools/mail.d.ts +91 -68
- package/dist/tools/mail.d.ts.map +1 -1
- package/dist/tools/mail.js +232 -243
- package/dist/tools/mail.js.map +1 -1
- package/dist/tools/mailbox-organization.d.ts +51 -34
- package/dist/tools/mailbox-organization.d.ts.map +1 -1
- package/dist/tools/mailbox-organization.js +318 -35
- package/dist/tools/mailbox-organization.js.map +1 -1
- package/dist/tools/mailbox-settings.d.ts +59 -0
- package/dist/tools/mailbox-settings.d.ts.map +1 -0
- package/dist/tools/mailbox-settings.js +136 -0
- package/dist/tools/mailbox-settings.js.map +1 -0
- package/dist/tools/meetings.d.ts +24 -14
- package/dist/tools/meetings.d.ts.map +1 -1
- package/dist/tools/meetings.js +82 -6
- package/dist/tools/meetings.js.map +1 -1
- package/dist/tools/onedrive.d.ts +26 -16
- package/dist/tools/onedrive.d.ts.map +1 -1
- package/dist/tools/onedrive.js +140 -11
- package/dist/tools/onedrive.js.map +1 -1
- package/dist/tools/onenote.d.ts +63 -0
- package/dist/tools/onenote.d.ts.map +1 -0
- package/dist/tools/onenote.js +221 -0
- package/dist/tools/onenote.js.map +1 -0
- package/dist/tools/people.d.ts +10 -0
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +94 -0
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/planner-visualization.d.ts +15 -5
- package/dist/tools/planner-visualization.d.ts.map +1 -1
- package/dist/tools/planner-visualization.js +58 -4
- package/dist/tools/planner-visualization.js.map +1 -1
- package/dist/tools/planner.d.ts +69 -39
- package/dist/tools/planner.d.ts.map +1 -1
- package/dist/tools/planner.js +231 -23
- package/dist/tools/planner.js.map +1 -1
- package/dist/tools/scheduling.d.ts +12 -0
- package/dist/tools/scheduling.d.ts.map +1 -1
- package/dist/tools/scheduling.js +38 -0
- package/dist/tools/scheduling.js.map +1 -1
- package/dist/tools/shared-mailbox.d.ts +164 -0
- package/dist/tools/shared-mailbox.d.ts.map +1 -0
- package/dist/tools/shared-mailbox.js +318 -0
- package/dist/tools/shared-mailbox.js.map +1 -0
- package/dist/tools/sharepoint-lists.d.ts +131 -0
- package/dist/tools/sharepoint-lists.d.ts.map +1 -0
- package/dist/tools/sharepoint-lists.js +246 -0
- package/dist/tools/sharepoint-lists.js.map +1 -0
- package/dist/tools/sharepoint.d.ts +24 -14
- package/dist/tools/sharepoint.d.ts.map +1 -1
- package/dist/tools/sharepoint.js +85 -9
- package/dist/tools/sharepoint.js.map +1 -1
- package/dist/tools/task-attachments.d.ts +17 -7
- package/dist/tools/task-attachments.d.ts.map +1 -1
- package/dist/tools/task-attachments.js +60 -4
- package/dist/tools/task-attachments.js.map +1 -1
- package/dist/tools/task-lists.d.ts +56 -0
- package/dist/tools/task-lists.d.ts.map +1 -0
- package/dist/tools/task-lists.js +155 -0
- package/dist/tools/task-lists.js.map +1 -0
- package/dist/tools/tasks-graph.d.ts +49 -0
- package/dist/tools/tasks-graph.d.ts.map +1 -0
- package/dist/tools/tasks-graph.js +193 -0
- package/dist/tools/tasks-graph.js.map +1 -0
- package/dist/tools/tasks.d.ts +121 -29
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +136 -84
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/teams.d.ts +57 -46
- package/dist/tools/teams.d.ts.map +1 -1
- package/dist/tools/teams.js +288 -26
- package/dist/tools/teams.js.map +1 -1
- package/dist/tools/what-changed.d.ts +48 -0
- package/dist/tools/what-changed.d.ts.map +1 -0
- package/dist/tools/what-changed.js +149 -0
- package/dist/tools/what-changed.js.map +1 -0
- package/dist/types/calendar.d.ts +1 -1
- package/dist/types/calendar.d.ts.map +1 -1
- package/dist/types/calendar.js.map +1 -1
- package/dist/types/contacts.d.ts +1 -1
- package/dist/types/contacts.d.ts.map +1 -1
- package/dist/types/contacts.js.map +1 -1
- package/dist/types/mail.d.ts +1 -1
- package/dist/types/mail.d.ts.map +1 -1
- package/dist/types/mail.js.map +1 -1
- package/dist/utils/errors.d.ts +110 -38
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +239 -56
- package/dist/utils/errors.js.map +1 -1
- package/dist/visualization/types.d.ts +4 -4
- package/package.json +2 -3
- package/dist/applescript/account-repository.d.ts +0 -30
- package/dist/applescript/account-repository.d.ts.map +0 -1
- package/dist/applescript/account-repository.js +0 -38
- package/dist/applescript/account-repository.js.map +0 -1
- package/dist/applescript/account-scripts.d.ts +0 -21
- package/dist/applescript/account-scripts.d.ts.map +0 -1
- package/dist/applescript/account-scripts.js +0 -180
- package/dist/applescript/account-scripts.js.map +0 -1
- package/dist/applescript/calendar-manager.d.ts +0 -44
- package/dist/applescript/calendar-manager.d.ts.map +0 -1
- package/dist/applescript/calendar-manager.js +0 -92
- package/dist/applescript/calendar-manager.js.map +0 -1
- package/dist/applescript/calendar-writer.d.ts +0 -36
- package/dist/applescript/calendar-writer.d.ts.map +0 -1
- package/dist/applescript/calendar-writer.js +0 -94
- package/dist/applescript/calendar-writer.js.map +0 -1
- package/dist/applescript/content-readers.d.ts +0 -114
- package/dist/applescript/content-readers.d.ts.map +0 -1
- package/dist/applescript/content-readers.js +0 -328
- package/dist/applescript/content-readers.js.map +0 -1
- package/dist/applescript/executor.d.ts +0 -60
- package/dist/applescript/executor.d.ts.map +0 -1
- package/dist/applescript/executor.js +0 -173
- package/dist/applescript/executor.js.map +0 -1
- package/dist/applescript/index.d.ts +0 -20
- package/dist/applescript/index.d.ts.map +0 -1
- package/dist/applescript/index.js +0 -29
- package/dist/applescript/index.js.map +0 -1
- package/dist/applescript/mail-sender.d.ts +0 -38
- package/dist/applescript/mail-sender.d.ts.map +0 -1
- package/dist/applescript/mail-sender.js +0 -67
- package/dist/applescript/mail-sender.js.map +0 -1
- package/dist/applescript/parser.d.ts +0 -235
- package/dist/applescript/parser.d.ts.map +0 -1
- package/dist/applescript/parser.js +0 -496
- package/dist/applescript/parser.js.map +0 -1
- package/dist/applescript/repository.d.ts +0 -64
- package/dist/applescript/repository.d.ts.map +0 -1
- package/dist/applescript/repository.js +0 -444
- package/dist/applescript/repository.js.map +0 -1
- package/dist/applescript/scripts.d.ts +0 -265
- package/dist/applescript/scripts.d.ts.map +0 -1
- package/dist/applescript/scripts.js +0 -1483
- package/dist/applescript/scripts.js.map +0 -1
- package/dist/parsers/olk15.d.ts +0 -87
- package/dist/parsers/olk15.d.ts.map +0 -1
- package/dist/parsers/olk15.js +0 -368
- package/dist/parsers/olk15.js.map +0 -1
- package/dist/tools/notes.d.ts +0 -74
- package/dist/tools/notes.d.ts.map +0 -1
- package/dist/tools/notes.js +0 -136
- package/dist/tools/notes.js.map +0 -1
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026 JBC Tech Solutions, LLC
|
|
3
|
-
* Licensed under the MIT License. See LICENSE file in the project root.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* AppleScript template strings for Outlook account operations.
|
|
7
|
-
*
|
|
8
|
-
* Outputs data in delimiter-based format for reliable parsing.
|
|
9
|
-
*/
|
|
10
|
-
import { DELIMITERS } from './scripts.js';
|
|
11
|
-
// =============================================================================
|
|
12
|
-
// Account Scripts
|
|
13
|
-
// =============================================================================
|
|
14
|
-
/**
|
|
15
|
-
* Lists all accounts in Outlook (Exchange, IMAP, POP).
|
|
16
|
-
* Returns: id, name, email address, type for each account
|
|
17
|
-
*/
|
|
18
|
-
export const LIST_ACCOUNTS = `
|
|
19
|
-
tell application "Microsoft Outlook"
|
|
20
|
-
set output to ""
|
|
21
|
-
|
|
22
|
-
-- Get Exchange accounts
|
|
23
|
-
try
|
|
24
|
-
set exchangeAccounts to every exchange account
|
|
25
|
-
repeat with acc in exchangeAccounts
|
|
26
|
-
try
|
|
27
|
-
set accId to id of acc
|
|
28
|
-
set accName to name of acc
|
|
29
|
-
set accEmail to email address of acc
|
|
30
|
-
set accType to "exchange"
|
|
31
|
-
set output to output & "${DELIMITERS.RECORD}id${DELIMITERS.EQUALS}" & accId & "${DELIMITERS.FIELD}name${DELIMITERS.EQUALS}" & accName & "${DELIMITERS.FIELD}email${DELIMITERS.EQUALS}" & accEmail & "${DELIMITERS.FIELD}type${DELIMITERS.EQUALS}" & accType
|
|
32
|
-
end try
|
|
33
|
-
end repeat
|
|
34
|
-
end try
|
|
35
|
-
|
|
36
|
-
-- Get IMAP accounts
|
|
37
|
-
try
|
|
38
|
-
set imapAccounts to every imap account
|
|
39
|
-
repeat with acc in imapAccounts
|
|
40
|
-
try
|
|
41
|
-
set accId to id of acc
|
|
42
|
-
set accName to name of acc
|
|
43
|
-
set accEmail to email address of acc
|
|
44
|
-
set accType to "imap"
|
|
45
|
-
set output to output & "${DELIMITERS.RECORD}id${DELIMITERS.EQUALS}" & accId & "${DELIMITERS.FIELD}name${DELIMITERS.EQUALS}" & accName & "${DELIMITERS.FIELD}email${DELIMITERS.EQUALS}" & accEmail & "${DELIMITERS.FIELD}type${DELIMITERS.EQUALS}" & accType
|
|
46
|
-
end try
|
|
47
|
-
end repeat
|
|
48
|
-
end try
|
|
49
|
-
|
|
50
|
-
-- Get POP accounts
|
|
51
|
-
try
|
|
52
|
-
set popAccounts to every pop account
|
|
53
|
-
repeat with acc in popAccounts
|
|
54
|
-
try
|
|
55
|
-
set accId to id of acc
|
|
56
|
-
set accName to name of acc
|
|
57
|
-
set accEmail to email address of acc
|
|
58
|
-
set accType to "pop"
|
|
59
|
-
set output to output & "${DELIMITERS.RECORD}id${DELIMITERS.EQUALS}" & accId & "${DELIMITERS.FIELD}name${DELIMITERS.EQUALS}" & accName & "${DELIMITERS.FIELD}email${DELIMITERS.EQUALS}" & accEmail & "${DELIMITERS.FIELD}type${DELIMITERS.EQUALS}" & accType
|
|
60
|
-
end try
|
|
61
|
-
end repeat
|
|
62
|
-
end try
|
|
63
|
-
|
|
64
|
-
return output
|
|
65
|
-
end tell
|
|
66
|
-
`;
|
|
67
|
-
/**
|
|
68
|
-
* Gets the default account in Outlook.
|
|
69
|
-
* Returns: id of the default account, or first account if no default is set
|
|
70
|
-
*/
|
|
71
|
-
export const GET_DEFAULT_ACCOUNT = `
|
|
72
|
-
tell application "Microsoft Outlook"
|
|
73
|
-
try
|
|
74
|
-
-- Try to get the default account
|
|
75
|
-
set defaultAcc to default account
|
|
76
|
-
set accId to id of defaultAcc
|
|
77
|
-
return "id${DELIMITERS.EQUALS}" & accId
|
|
78
|
-
on error
|
|
79
|
-
-- Fallback: return first available account (try exchange, then imap, then pop)
|
|
80
|
-
try
|
|
81
|
-
set firstAcc to first exchange account
|
|
82
|
-
set accId to id of firstAcc
|
|
83
|
-
return "id${DELIMITERS.EQUALS}" & accId
|
|
84
|
-
on error
|
|
85
|
-
try
|
|
86
|
-
set firstAcc to first imap account
|
|
87
|
-
set accId to id of firstAcc
|
|
88
|
-
return "id${DELIMITERS.EQUALS}" & accId
|
|
89
|
-
on error
|
|
90
|
-
try
|
|
91
|
-
set firstAcc to first pop account
|
|
92
|
-
set accId to id of firstAcc
|
|
93
|
-
return "id${DELIMITERS.EQUALS}" & accId
|
|
94
|
-
on error
|
|
95
|
-
return "error${DELIMITERS.EQUALS}No accounts found"
|
|
96
|
-
end try
|
|
97
|
-
end try
|
|
98
|
-
end try
|
|
99
|
-
end try
|
|
100
|
-
end tell
|
|
101
|
-
`;
|
|
102
|
-
/**
|
|
103
|
-
* Lists mail folders for specific accounts (all types: Exchange, IMAP, POP).
|
|
104
|
-
*
|
|
105
|
-
* @param accountIds - Array of account IDs to query
|
|
106
|
-
*/
|
|
107
|
-
export function listMailFoldersByAccounts(accountIds) {
|
|
108
|
-
const accountFilter = accountIds.map(id => `id ${id}`).join(' or id ');
|
|
109
|
-
return `
|
|
110
|
-
tell application "Microsoft Outlook"
|
|
111
|
-
set output to ""
|
|
112
|
-
|
|
113
|
-
-- Get folders from Exchange accounts
|
|
114
|
-
try
|
|
115
|
-
set targetAccounts to (every exchange account whose ${accountFilter})
|
|
116
|
-
repeat with acc in targetAccounts
|
|
117
|
-
set accId to id of acc
|
|
118
|
-
set allFolders to mail folders of acc
|
|
119
|
-
repeat with f in allFolders
|
|
120
|
-
try
|
|
121
|
-
set fId to id of f
|
|
122
|
-
set fName to name of f
|
|
123
|
-
set uCount to unread count of f
|
|
124
|
-
set mCount to 0
|
|
125
|
-
try
|
|
126
|
-
set mCount to count of messages of f
|
|
127
|
-
end try
|
|
128
|
-
set output to output & "${DELIMITERS.RECORD}id${DELIMITERS.EQUALS}" & fId & "${DELIMITERS.FIELD}name${DELIMITERS.EQUALS}" & fName & "${DELIMITERS.FIELD}unreadCount${DELIMITERS.EQUALS}" & uCount & "${DELIMITERS.FIELD}messageCount${DELIMITERS.EQUALS}" & mCount & "${DELIMITERS.FIELD}accountId${DELIMITERS.EQUALS}" & accId
|
|
129
|
-
end try
|
|
130
|
-
end repeat
|
|
131
|
-
end repeat
|
|
132
|
-
end try
|
|
133
|
-
|
|
134
|
-
-- Get folders from IMAP accounts
|
|
135
|
-
try
|
|
136
|
-
set targetAccounts to (every imap account whose ${accountFilter})
|
|
137
|
-
repeat with acc in targetAccounts
|
|
138
|
-
set accId to id of acc
|
|
139
|
-
set allFolders to mail folders of acc
|
|
140
|
-
repeat with f in allFolders
|
|
141
|
-
try
|
|
142
|
-
set fId to id of f
|
|
143
|
-
set fName to name of f
|
|
144
|
-
set uCount to unread count of f
|
|
145
|
-
set mCount to 0
|
|
146
|
-
try
|
|
147
|
-
set mCount to count of messages of f
|
|
148
|
-
end try
|
|
149
|
-
set output to output & "${DELIMITERS.RECORD}id${DELIMITERS.EQUALS}" & fId & "${DELIMITERS.FIELD}name${DELIMITERS.EQUALS}" & fName & "${DELIMITERS.FIELD}unreadCount${DELIMITERS.EQUALS}" & uCount & "${DELIMITERS.FIELD}messageCount${DELIMITERS.EQUALS}" & mCount & "${DELIMITERS.FIELD}accountId${DELIMITERS.EQUALS}" & accId
|
|
150
|
-
end try
|
|
151
|
-
end repeat
|
|
152
|
-
end repeat
|
|
153
|
-
end try
|
|
154
|
-
|
|
155
|
-
-- Get folders from POP accounts
|
|
156
|
-
try
|
|
157
|
-
set targetAccounts to (every pop account whose ${accountFilter})
|
|
158
|
-
repeat with acc in targetAccounts
|
|
159
|
-
set accId to id of acc
|
|
160
|
-
set allFolders to mail folders of acc
|
|
161
|
-
repeat with f in allFolders
|
|
162
|
-
try
|
|
163
|
-
set fId to id of f
|
|
164
|
-
set fName to name of f
|
|
165
|
-
set uCount to unread count of f
|
|
166
|
-
set mCount to 0
|
|
167
|
-
try
|
|
168
|
-
set mCount to count of messages of f
|
|
169
|
-
end try
|
|
170
|
-
set output to output & "${DELIMITERS.RECORD}id${DELIMITERS.EQUALS}" & fId & "${DELIMITERS.FIELD}name${DELIMITERS.EQUALS}" & fName & "${DELIMITERS.FIELD}unreadCount${DELIMITERS.EQUALS}" & uCount & "${DELIMITERS.FIELD}messageCount${DELIMITERS.EQUALS}" & mCount & "${DELIMITERS.FIELD}accountId${DELIMITERS.EQUALS}" & accId
|
|
171
|
-
end try
|
|
172
|
-
end repeat
|
|
173
|
-
end repeat
|
|
174
|
-
end try
|
|
175
|
-
|
|
176
|
-
return output
|
|
177
|
-
end tell
|
|
178
|
-
`;
|
|
179
|
-
}
|
|
180
|
-
//# sourceMappingURL=account-scripts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"account-scripts.js","sourceRoot":"","sources":["../../src/applescript/account-scripts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;A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,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,cAAc,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,MAAM,gBAAgB,UAAU,CAAC,KAAK,cAAc,UAAU,CAAC,MAAM,iBAAiB,UAAU,CAAC,KAAK,eAAe,UAAU,CAAC,MAAM,iBAAiB,UAAU,CAAC,KAAK,YAAY,UAAU,CAAC,MAAM;;;;;;;;sDAQzQ,aAAa;;;;;;;;;;;;;oCAa/B,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,cAAc,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,MAAM,gBAAgB,UAAU,CAAC,KAAK,cAAc,UAAU,CAAC,MAAM,iBAAiB,UAAU,CAAC,KAAK,eAAe,UAAU,CAAC,MAAM,iBAAiB,UAAU,CAAC,KAAK,YAAY,UAAU,CAAC,MAAM;;;;;;;;qDAQ1Q,aAAa;;;;;;;;;;;;;oCAa9B,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,cAAc,UAAU,CAAC,KAAK,OAAO,UAAU,CAAC,MAAM,gBAAgB,UAAU,CAAC,KAAK,cAAc,UAAU,CAAC,MAAM,iBAAiB,UAAU,CAAC,KAAK,eAAe,UAAU,CAAC,MAAM,iBAAiB,UAAU,CAAC,KAAK,YAAY,UAAU,CAAC,MAAM;;;;;;;;CAQ9T,CAAC;AACF,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026 JBC Tech Solutions, LLC
|
|
3
|
-
* Licensed under the MIT License. See LICENSE file in the project root.
|
|
4
|
-
*/
|
|
5
|
-
import { type RespondToEventResult } from './parser.js';
|
|
6
|
-
export type ResponseType = 'accept' | 'decline' | 'tentative';
|
|
7
|
-
export type ApplyToScope = 'this_instance' | 'all_in_series';
|
|
8
|
-
export interface ICalendarManager {
|
|
9
|
-
respondToEvent(eventId: number, response: ResponseType, sendResponse: boolean, comment?: string): RespondToEventResult;
|
|
10
|
-
deleteEvent(eventId: number, applyTo: ApplyToScope): void;
|
|
11
|
-
updateEvent(eventId: number, updates: EventUpdates, applyTo: ApplyToScope): UpdatedEvent;
|
|
12
|
-
}
|
|
13
|
-
export interface EventUpdates {
|
|
14
|
-
readonly title?: string;
|
|
15
|
-
readonly startDate?: string;
|
|
16
|
-
readonly endDate?: string;
|
|
17
|
-
readonly location?: string;
|
|
18
|
-
readonly description?: string;
|
|
19
|
-
readonly isAllDay?: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface UpdatedEvent {
|
|
22
|
-
readonly id: number;
|
|
23
|
-
readonly updatedFields: readonly string[];
|
|
24
|
-
}
|
|
25
|
-
export declare class AppleScriptCalendarManager implements ICalendarManager {
|
|
26
|
-
/**
|
|
27
|
-
* Responds to an event invitation (accept, decline, or tentative).
|
|
28
|
-
*/
|
|
29
|
-
respondToEvent(eventId: number, response: ResponseType, sendResponse: boolean, comment?: string): RespondToEventResult;
|
|
30
|
-
/**
|
|
31
|
-
* Deletes an event (single instance or entire recurring series).
|
|
32
|
-
*/
|
|
33
|
-
deleteEvent(eventId: number, applyTo: ApplyToScope): void;
|
|
34
|
-
/**
|
|
35
|
-
* Updates an event (single instance or entire recurring series).
|
|
36
|
-
* All fields in updates are optional - only specified fields will be updated.
|
|
37
|
-
*/
|
|
38
|
-
updateEvent(eventId: number, updates: EventUpdates, applyTo: ApplyToScope): UpdatedEvent;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Creates a new calendar manager instance.
|
|
42
|
-
*/
|
|
43
|
-
export declare function createCalendarManager(): ICalendarManager;
|
|
44
|
-
//# sourceMappingURL=calendar-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-manager.d.ts","sourceRoot":"","sources":["../../src/applescript/calendar-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EAA6E,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAOnI,MAAM,MAAM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MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,GAAG,YAAY;CAiCzF;AAMD;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,gBAAgB,CAExD"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026 JBC Tech Solutions, LLC
|
|
3
|
-
* Licensed under the MIT License. See LICENSE file in the project root.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Calendar management operations using AppleScript.
|
|
7
|
-
*
|
|
8
|
-
* Provides high-level calendar operations including RSVP, deletion, and updates.
|
|
9
|
-
*/
|
|
10
|
-
import { executeAppleScriptOrThrow } from './executor.js';
|
|
11
|
-
import * as scripts from './scripts.js';
|
|
12
|
-
import { parseRespondToEventResult, parseDeleteEventResult, parseUpdateEventResult } from './parser.js';
|
|
13
|
-
import { AppleScriptError } from '../utils/errors.js';
|
|
14
|
-
// =============================================================================
|
|
15
|
-
// Implementation
|
|
16
|
-
// =============================================================================
|
|
17
|
-
export class AppleScriptCalendarManager {
|
|
18
|
-
/**
|
|
19
|
-
* Responds to an event invitation (accept, decline, or tentative).
|
|
20
|
-
*/
|
|
21
|
-
respondToEvent(eventId, response, sendResponse, comment) {
|
|
22
|
-
const params = comment != null
|
|
23
|
-
? { eventId, response, sendResponse, comment }
|
|
24
|
-
: { eventId, response, sendResponse };
|
|
25
|
-
const script = scripts.respondToEvent(params);
|
|
26
|
-
const output = executeAppleScriptOrThrow(script);
|
|
27
|
-
const result = parseRespondToEventResult(output);
|
|
28
|
-
if (result == null) {
|
|
29
|
-
throw new AppleScriptError('Failed to parse RSVP response');
|
|
30
|
-
}
|
|
31
|
-
if (!result.success) {
|
|
32
|
-
throw new AppleScriptError(result.error ?? 'RSVP operation failed');
|
|
33
|
-
}
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Deletes an event (single instance or entire recurring series).
|
|
38
|
-
*/
|
|
39
|
-
deleteEvent(eventId, applyTo) {
|
|
40
|
-
const script = scripts.deleteEvent({ eventId, applyTo });
|
|
41
|
-
const output = executeAppleScriptOrThrow(script);
|
|
42
|
-
const result = parseDeleteEventResult(output);
|
|
43
|
-
if (result == null) {
|
|
44
|
-
throw new AppleScriptError('Failed to parse delete response');
|
|
45
|
-
}
|
|
46
|
-
if (!result.success) {
|
|
47
|
-
throw new AppleScriptError(result.error ?? 'Delete operation failed');
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Updates an event (single instance or entire recurring series).
|
|
52
|
-
* All fields in updates are optional - only specified fields will be updated.
|
|
53
|
-
*/
|
|
54
|
-
updateEvent(eventId, updates, applyTo) {
|
|
55
|
-
const scriptUpdates = {
|
|
56
|
-
...(updates.title != null && { title: updates.title }),
|
|
57
|
-
...(updates.location != null && { location: updates.location }),
|
|
58
|
-
...(updates.description != null && { description: updates.description }),
|
|
59
|
-
...(updates.startDate != null && { startDate: updates.startDate }),
|
|
60
|
-
...(updates.endDate != null && { endDate: updates.endDate }),
|
|
61
|
-
...(updates.isAllDay != null && { isAllDay: updates.isAllDay }),
|
|
62
|
-
};
|
|
63
|
-
const scriptParams = {
|
|
64
|
-
eventId,
|
|
65
|
-
applyTo,
|
|
66
|
-
updates: scriptUpdates,
|
|
67
|
-
};
|
|
68
|
-
const script = scripts.updateEvent(scriptParams);
|
|
69
|
-
const output = executeAppleScriptOrThrow(script);
|
|
70
|
-
const result = parseUpdateEventResult(output);
|
|
71
|
-
if (result == null) {
|
|
72
|
-
throw new AppleScriptError('Failed to parse update response');
|
|
73
|
-
}
|
|
74
|
-
if (!result.success) {
|
|
75
|
-
throw new AppleScriptError(result.error ?? 'Update operation failed');
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
id: result.id,
|
|
79
|
-
updatedFields: result.updatedFields ?? [],
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
// =============================================================================
|
|
84
|
-
// Factory
|
|
85
|
-
// =============================================================================
|
|
86
|
-
/**
|
|
87
|
-
* Creates a new calendar manager instance.
|
|
88
|
-
*/
|
|
89
|
-
export function createCalendarManager() {
|
|
90
|
-
return new AppleScriptCalendarManager();
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=calendar-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-manager.js","sourceRoot":"","sources":["../../src/applescript/calendar-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,sBAAsB,EAA6B,MAAM,aAAa,CAAC;AACnI,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA6BtD,gFAAgF;AAChF,iBAAiB;AACjB,gFAAgF;AAEhF,MAAM,OAAO,0BAA0B;IACrC;;OAEG;IACH,cAAc,CAAC,OAAe,EAAE,QAAsB,EAAE,YAAqB,EAAE,OAAgB;QAC7F,MAAM,MAAM,GAAiC,OAAO,IAAI,IAAI;YAC1D,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE;YAC9C,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;QAEjD,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,gBAAgB,CAAC,+BAA+B,CAAC,CAAC;QAC9D,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,OAAO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AAO,EAAE,CAAC;YAC5D,GAAG,CAAC,OAAO,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC;SAChE,CAAC;QAEF,MAAM,YAAY,GAA8B;YAC9C,OAAO;YACP,OAAO;YACP,OAAO,EAAE,aAAa;SACvB,CAAC;QAEF,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAE9C,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,gBAAgB,CAAC,iCAAiC,CAAC,CAAC;QAChE,CAAC;QAED,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,gBAAgB,CAAC,MAAM,CAAC,KAAK,IAAI,yBAAyB,CAAC,CAAC;QACxE,CAAC;QAED,OAAO;YACL,EAAE,EAAE,MAAM,CAAC,EAAG;YACd,aAAa,EAAE,MAAM,CAAC,aAAa,IAAI,EAAE;SAC1C,CAAC;IACJ,CAAC;CACF;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,IAAI,0BAA0B,EAAE,CAAC;AAC1C,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026 JBC Tech Solutions, LLC
|
|
3
|
-
* Licensed under the MIT License. See LICENSE file in the project root.
|
|
4
|
-
*/
|
|
5
|
-
export interface RecurrenceConfig {
|
|
6
|
-
readonly frequency: 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
7
|
-
readonly interval: number;
|
|
8
|
-
readonly daysOfWeek?: readonly string[];
|
|
9
|
-
readonly dayOfMonth?: number;
|
|
10
|
-
readonly weekOfMonth?: string;
|
|
11
|
-
readonly dayOfWeekMonthly?: string;
|
|
12
|
-
readonly endDate?: string;
|
|
13
|
-
readonly endAfterCount?: number;
|
|
14
|
-
}
|
|
15
|
-
export interface CreateEventParams {
|
|
16
|
-
readonly title: string;
|
|
17
|
-
readonly startDate: string;
|
|
18
|
-
readonly endDate: string;
|
|
19
|
-
readonly calendarId?: number;
|
|
20
|
-
readonly location?: string;
|
|
21
|
-
readonly description?: string;
|
|
22
|
-
readonly isAllDay?: boolean;
|
|
23
|
-
readonly recurrence?: RecurrenceConfig;
|
|
24
|
-
}
|
|
25
|
-
export interface CreatedEvent {
|
|
26
|
-
readonly id: number;
|
|
27
|
-
readonly calendarId: number | null;
|
|
28
|
-
}
|
|
29
|
-
export interface ICalendarWriter {
|
|
30
|
-
createEvent(params: CreateEventParams): CreatedEvent;
|
|
31
|
-
}
|
|
32
|
-
export declare class AppleScriptCalendarWriter implements ICalendarWriter {
|
|
33
|
-
createEvent(params: CreateEventParams): CreatedEvent;
|
|
34
|
-
}
|
|
35
|
-
export declare function createCalendarWriter(): ICalendarWriter;
|
|
36
|
-
//# sourceMappingURL=calendar-writer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-writer.d.ts","sourceRoot":"","sources":["../../src/applescript/calendar-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CACxC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,YAAY,CAAC;CACtD;AAgCD,qBAAa,yBAA0B,YAAW,eAAe;IAC/D,WAAW,CAAC,MAAM,EAAE,iBAAiB,GAAG,YAAY;CAkDrD;AAED,wBAAgB,oBAAoB,IAAI,eAAe,CAEtD"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026 JBC Tech Solutions, LLC
|
|
3
|
-
* Licensed under the MIT License. See LICENSE file in the project root.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Calendar write operations using AppleScript.
|
|
7
|
-
*
|
|
8
|
-
* Follows the IAccountRepository pattern: a separate interface for
|
|
9
|
-
* AppleScript-only capabilities, keeping IRepository read-only.
|
|
10
|
-
*/
|
|
11
|
-
import { executeAppleScriptOrThrow } from './executor.js';
|
|
12
|
-
import * as scripts from './scripts.js';
|
|
13
|
-
import { parseCreateEventResult } from './parser.js';
|
|
14
|
-
// =============================================================================
|
|
15
|
-
// Date Conversion
|
|
16
|
-
// =============================================================================
|
|
17
|
-
/**
|
|
18
|
-
* Parses an ISO 8601 date string into individual UTC components.
|
|
19
|
-
* Uses UTC methods so that a Z-suffixed ISO string is interpreted
|
|
20
|
-
* consistently regardless of the host machine's local timezone.
|
|
21
|
-
*/
|
|
22
|
-
function isoToDateComponents(isoString) {
|
|
23
|
-
const date = new Date(isoString);
|
|
24
|
-
return {
|
|
25
|
-
year: date.getUTCFullYear(),
|
|
26
|
-
month: date.getUTCMonth() + 1, // JS months are 0-indexed
|
|
27
|
-
day: date.getUTCDate(),
|
|
28
|
-
hours: date.getUTCHours(),
|
|
29
|
-
minutes: date.getUTCMinutes(),
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
// =============================================================================
|
|
33
|
-
// Implementation
|
|
34
|
-
// =============================================================================
|
|
35
|
-
export class AppleScriptCalendarWriter {
|
|
36
|
-
createEvent(params) {
|
|
37
|
-
const start = isoToDateComponents(params.startDate);
|
|
38
|
-
const end = isoToDateComponents(params.endDate);
|
|
39
|
-
const scriptParams = {
|
|
40
|
-
title: params.title,
|
|
41
|
-
startYear: start.year,
|
|
42
|
-
startMonth: start.month,
|
|
43
|
-
startDay: start.day,
|
|
44
|
-
startHours: start.hours,
|
|
45
|
-
startMinutes: start.minutes,
|
|
46
|
-
endYear: end.year,
|
|
47
|
-
endMonth: end.month,
|
|
48
|
-
endDay: end.day,
|
|
49
|
-
endHours: end.hours,
|
|
50
|
-
endMinutes: end.minutes,
|
|
51
|
-
};
|
|
52
|
-
if (params.calendarId != null)
|
|
53
|
-
scriptParams.calendarId = params.calendarId;
|
|
54
|
-
if (params.location != null)
|
|
55
|
-
scriptParams.location = params.location;
|
|
56
|
-
if (params.description != null)
|
|
57
|
-
scriptParams.description = params.description;
|
|
58
|
-
if (params.isAllDay != null)
|
|
59
|
-
scriptParams.isAllDay = params.isAllDay;
|
|
60
|
-
if (params.recurrence != null) {
|
|
61
|
-
const rec = params.recurrence;
|
|
62
|
-
const recurrenceScript = {
|
|
63
|
-
frequency: rec.frequency,
|
|
64
|
-
interval: rec.interval,
|
|
65
|
-
};
|
|
66
|
-
// Use mutable alias to conditionally set optional properties
|
|
67
|
-
const mut = recurrenceScript;
|
|
68
|
-
if (rec.daysOfWeek != null)
|
|
69
|
-
mut.daysOfWeek = rec.daysOfWeek;
|
|
70
|
-
if (rec.dayOfMonth != null)
|
|
71
|
-
mut.dayOfMonth = rec.dayOfMonth;
|
|
72
|
-
if (rec.weekOfMonth != null)
|
|
73
|
-
mut.weekOfMonth = rec.weekOfMonth;
|
|
74
|
-
if (rec.dayOfWeekMonthly != null)
|
|
75
|
-
mut.dayOfWeekMonthly = rec.dayOfWeekMonthly;
|
|
76
|
-
if (rec.endAfterCount != null)
|
|
77
|
-
mut.endAfterCount = rec.endAfterCount;
|
|
78
|
-
if (rec.endDate != null)
|
|
79
|
-
mut.endDate = isoToDateComponents(rec.endDate);
|
|
80
|
-
scriptParams.recurrence = recurrenceScript;
|
|
81
|
-
}
|
|
82
|
-
const script = scripts.createEvent(scriptParams);
|
|
83
|
-
const output = executeAppleScriptOrThrow(script);
|
|
84
|
-
const result = parseCreateEventResult(output);
|
|
85
|
-
if (result == null) {
|
|
86
|
-
throw new Error('Failed to parse create event result');
|
|
87
|
-
}
|
|
88
|
-
return result;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
export function createCalendarWriter() {
|
|
92
|
-
return new AppleScriptCalendarWriter();
|
|
93
|
-
}
|
|
94
|
-
//# sourceMappingURL=calendar-writer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar-writer.js","sourceRoot":"","sources":["../../src/applescript/calendar-writer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC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AAO,CAAC,CAAC;YACxE,YAAY,CAAC,UAAU,GAAG,gBAAgB,CAAC;QAC7C,CAAC;QAED,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAEjD,MAAM,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;QAE9C,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAED,MAAM,UAAU,oBAAoB;IAClC,OAAO,IAAI,yBAAyB,EAAE,CAAC;AACzC,CAAC"}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2026 JBC Tech Solutions, LLC
|
|
3
|
-
* Licensed under the MIT License. See LICENSE file in the project root.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* AppleScript-based content readers.
|
|
7
|
-
*
|
|
8
|
-
* Implements content reader interfaces for fetching detailed content
|
|
9
|
-
* directly from Outlook via AppleScript.
|
|
10
|
-
*
|
|
11
|
-
* Since AppleScript doesn't use file paths like SQLite does, these
|
|
12
|
-
* content readers extract IDs from special path formats and fetch
|
|
13
|
-
* content via AppleScript.
|
|
14
|
-
*/
|
|
15
|
-
import type { IContentReader } from '../tools/mail.js';
|
|
16
|
-
import type { IEventContentReader, EventDetails } from '../tools/calendar.js';
|
|
17
|
-
import type { IContactContentReader, ContactDetails } from '../tools/contacts.js';
|
|
18
|
-
import type { ITaskContentReader, TaskDetails } from '../tools/tasks.js';
|
|
19
|
-
import type { INoteContentReader, NoteDetails } from '../tools/notes.js';
|
|
20
|
-
import type { AttachmentInfo } from '../types/mail.js';
|
|
21
|
-
import type { SaveAttachmentResult } from './parser.js';
|
|
22
|
-
/**
|
|
23
|
-
* Prefix for AppleScript email content paths.
|
|
24
|
-
* Format: "applescript-email:123" where 123 is the message ID.
|
|
25
|
-
*/
|
|
26
|
-
export declare const EMAIL_PATH_PREFIX = "applescript-email:";
|
|
27
|
-
/**
|
|
28
|
-
* Prefix for AppleScript event content paths.
|
|
29
|
-
* Format: "applescript-event:123" where 123 is the event ID.
|
|
30
|
-
*/
|
|
31
|
-
export declare const EVENT_PATH_PREFIX = "applescript-event:";
|
|
32
|
-
/**
|
|
33
|
-
* Prefix for AppleScript contact content paths.
|
|
34
|
-
* Format: "applescript-contact:123" where 123 is the contact ID.
|
|
35
|
-
*/
|
|
36
|
-
export declare const CONTACT_PATH_PREFIX = "applescript-contact:";
|
|
37
|
-
/**
|
|
38
|
-
* Prefix for AppleScript task content paths.
|
|
39
|
-
* Format: "applescript-task:123" where 123 is the task ID.
|
|
40
|
-
*/
|
|
41
|
-
export declare const TASK_PATH_PREFIX = "applescript-task:";
|
|
42
|
-
/**
|
|
43
|
-
* Prefix for AppleScript note content paths.
|
|
44
|
-
* Format: "applescript-note:123" where 123 is the note ID.
|
|
45
|
-
*/
|
|
46
|
-
export declare const NOTE_PATH_PREFIX = "applescript-note:";
|
|
47
|
-
/**
|
|
48
|
-
* Creates an AppleScript path from an entity ID.
|
|
49
|
-
*/
|
|
50
|
-
export declare function createEmailPath(id: number): string;
|
|
51
|
-
export declare function createEventPath(id: number): string;
|
|
52
|
-
export declare function createContactPath(id: number): string;
|
|
53
|
-
export declare function createTaskPath(id: number): string;
|
|
54
|
-
export declare function createNotePath(id: number): string;
|
|
55
|
-
/**
|
|
56
|
-
* AppleScript-based email content reader.
|
|
57
|
-
*/
|
|
58
|
-
export declare class AppleScriptEmailContentReader implements IContentReader {
|
|
59
|
-
readEmailBody(dataFilePath: string | null): string | null;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* AppleScript-based event content reader.
|
|
63
|
-
*/
|
|
64
|
-
export declare class AppleScriptEventContentReader implements IEventContentReader {
|
|
65
|
-
readEventDetails(dataFilePath: string | null): EventDetails | null;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* AppleScript-based contact content reader.
|
|
69
|
-
*/
|
|
70
|
-
export declare class AppleScriptContactContentReader implements IContactContentReader {
|
|
71
|
-
readContactDetails(dataFilePath: string | null): ContactDetails | null;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* AppleScript-based task content reader.
|
|
75
|
-
*/
|
|
76
|
-
export declare class AppleScriptTaskContentReader implements ITaskContentReader {
|
|
77
|
-
readTaskDetails(dataFilePath: string | null): TaskDetails | null;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* AppleScript-based note content reader.
|
|
81
|
-
*/
|
|
82
|
-
export declare class AppleScriptNoteContentReader implements INoteContentReader {
|
|
83
|
-
readNoteDetails(dataFilePath: string | null): NoteDetails | null;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Interface for reading attachment metadata and saving attachments.
|
|
87
|
-
*/
|
|
88
|
-
export interface IAttachmentReader {
|
|
89
|
-
listAttachments(emailId: number): AttachmentInfo[];
|
|
90
|
-
saveAttachment(emailId: number, attachmentIndex: number, savePath: string): SaveAttachmentResult;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* AppleScript-based attachment reader.
|
|
94
|
-
*/
|
|
95
|
-
export declare class AppleScriptAttachmentReader implements IAttachmentReader {
|
|
96
|
-
listAttachments(emailId: number): AttachmentInfo[];
|
|
97
|
-
saveAttachment(emailId: number, attachmentIndex: number, savePath: string): SaveAttachmentResult;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* All AppleScript content readers bundled together.
|
|
101
|
-
*/
|
|
102
|
-
export interface AppleScriptContentReaders {
|
|
103
|
-
readonly email: IContentReader;
|
|
104
|
-
readonly event: IEventContentReader;
|
|
105
|
-
readonly contact: IContactContentReader;
|
|
106
|
-
readonly task: ITaskContentReader;
|
|
107
|
-
readonly note: INoteContentReader;
|
|
108
|
-
readonly attachment: IAttachmentReader;
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* Creates all AppleScript content readers.
|
|
112
|
-
*/
|
|
113
|
-
export declare function createAppleScriptContentReaders(): AppleScriptContentReaders;
|
|
114
|
-
//# sourceMappingURL=content-readers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-readers.d.ts","sourceRoot":"","sources":["../../src/applescript/content-readers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAUxD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,yBAAyB,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAEpD;;;GAGG;AACH,eAAO,MAAM,gBAAgB,sBAAsB,CAAC;AAkBpD;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,M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