@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.
Files changed (369) hide show
  1. package/README.md +66 -57
  2. package/dist/approval/hash.d.ts +8 -8
  3. package/dist/approval/token-manager.d.ts +37 -19
  4. package/dist/approval/token-manager.d.ts.map +1 -1
  5. package/dist/approval/token-manager.js +133 -37
  6. package/dist/approval/token-manager.js.map +1 -1
  7. package/dist/approval/types.d.ts +7 -3
  8. package/dist/approval/types.d.ts.map +1 -1
  9. package/dist/cli.d.ts +21 -0
  10. package/dist/cli.d.ts.map +1 -1
  11. package/dist/cli.js +100 -2
  12. package/dist/cli.js.map +1 -1
  13. package/dist/database/repository.d.ts +48 -48
  14. package/dist/database/repository.d.ts.map +1 -1
  15. package/dist/database/repository.js.map +1 -1
  16. package/dist/delta/mirror.d.ts +67 -0
  17. package/dist/delta/mirror.d.ts.map +1 -0
  18. package/dist/delta/mirror.js +183 -0
  19. package/dist/delta/mirror.js.map +1 -0
  20. package/dist/graph/auth/account-id.d.ts +19 -0
  21. package/dist/graph/auth/account-id.d.ts.map +1 -0
  22. package/dist/graph/auth/account-id.js +55 -0
  23. package/dist/graph/auth/account-id.js.map +1 -0
  24. package/dist/graph/auth/config.d.ts +1 -1
  25. package/dist/graph/auth/config.d.ts.map +1 -1
  26. package/dist/graph/auth/config.js +13 -1
  27. package/dist/graph/auth/config.js.map +1 -1
  28. package/dist/graph/auth/device-code-flow.d.ts +3 -1
  29. package/dist/graph/auth/device-code-flow.d.ts.map +1 -1
  30. package/dist/graph/auth/device-code-flow.js +42 -14
  31. package/dist/graph/auth/device-code-flow.js.map +1 -1
  32. package/dist/graph/auth/index.d.ts +1 -0
  33. package/dist/graph/auth/index.d.ts.map +1 -1
  34. package/dist/graph/auth/index.js +1 -0
  35. package/dist/graph/auth/index.js.map +1 -1
  36. package/dist/graph/auth/token-cache.js +2 -2
  37. package/dist/graph/auth/token-cache.js.map +1 -1
  38. package/dist/graph/client/graph-client.d.ts +141 -8
  39. package/dist/graph/client/graph-client.d.ts.map +1 -1
  40. package/dist/graph/client/graph-client.js +536 -48
  41. package/dist/graph/client/graph-client.js.map +1 -1
  42. package/dist/graph/client/immutable-id-middleware.d.ts +50 -0
  43. package/dist/graph/client/immutable-id-middleware.d.ts.map +1 -0
  44. package/dist/graph/client/immutable-id-middleware.js +137 -0
  45. package/dist/graph/client/immutable-id-middleware.js.map +1 -0
  46. package/dist/graph/content-readers.d.ts +0 -12
  47. package/dist/graph/content-readers.d.ts.map +1 -1
  48. package/dist/graph/content-readers.js +0 -21
  49. package/dist/graph/content-readers.js.map +1 -1
  50. package/dist/graph/index.d.ts +5 -6
  51. package/dist/graph/index.d.ts.map +1 -1
  52. package/dist/graph/index.js +5 -6
  53. package/dist/graph/index.js.map +1 -1
  54. package/dist/graph/mailbox-adapter.d.ts +15 -15
  55. package/dist/graph/mappers/contact-mapper.d.ts +4 -1
  56. package/dist/graph/mappers/contact-mapper.d.ts.map +1 -1
  57. package/dist/graph/mappers/contact-mapper.js +7 -3
  58. package/dist/graph/mappers/contact-mapper.js.map +1 -1
  59. package/dist/graph/mappers/email-mapper.d.ts.map +1 -1
  60. package/dist/graph/mappers/email-mapper.js +7 -4
  61. package/dist/graph/mappers/email-mapper.js.map +1 -1
  62. package/dist/graph/mappers/event-mapper.d.ts.map +1 -1
  63. package/dist/graph/mappers/event-mapper.js +6 -3
  64. package/dist/graph/mappers/event-mapper.js.map +1 -1
  65. package/dist/graph/mappers/folder-mapper.d.ts +0 -4
  66. package/dist/graph/mappers/folder-mapper.d.ts.map +1 -1
  67. package/dist/graph/mappers/folder-mapper.js +9 -19
  68. package/dist/graph/mappers/folder-mapper.js.map +1 -1
  69. package/dist/graph/mappers/index.d.ts +2 -2
  70. package/dist/graph/mappers/index.d.ts.map +1 -1
  71. package/dist/graph/mappers/index.js +2 -2
  72. package/dist/graph/mappers/index.js.map +1 -1
  73. package/dist/graph/mappers/task-mapper.d.ts +4 -2
  74. package/dist/graph/mappers/task-mapper.d.ts.map +1 -1
  75. package/dist/graph/mappers/task-mapper.js +7 -5
  76. package/dist/graph/mappers/task-mapper.js.map +1 -1
  77. package/dist/graph/mappers/utils.d.ts +0 -10
  78. package/dist/graph/mappers/utils.d.ts.map +1 -1
  79. package/dist/graph/mappers/utils.js +0 -19
  80. package/dist/graph/mappers/utils.js.map +1 -1
  81. package/dist/graph/repository.d.ts +409 -276
  82. package/dist/graph/repository.d.ts.map +1 -1
  83. package/dist/graph/repository.js +772 -1082
  84. package/dist/graph/repository.js.map +1 -1
  85. package/dist/ids/mint.d.ts +31 -0
  86. package/dist/ids/mint.d.ts.map +1 -0
  87. package/dist/ids/mint.js +36 -0
  88. package/dist/ids/mint.js.map +1 -0
  89. package/dist/ids/next-action.d.ts +29 -0
  90. package/dist/ids/next-action.d.ts.map +1 -0
  91. package/dist/ids/next-action.js +58 -0
  92. package/dist/ids/next-action.js.map +1 -0
  93. package/dist/ids/resolver.d.ts +31 -0
  94. package/dist/ids/resolver.d.ts.map +1 -0
  95. package/dist/ids/resolver.js +52 -0
  96. package/dist/ids/resolver.js.map +1 -0
  97. package/dist/ids/schema.d.ts +91 -0
  98. package/dist/ids/schema.d.ts.map +1 -0
  99. package/dist/ids/schema.js +131 -0
  100. package/dist/ids/schema.js.map +1 -0
  101. package/dist/ids/token.d.ts +62 -0
  102. package/dist/ids/token.d.ts.map +1 -0
  103. package/dist/ids/token.js +225 -0
  104. package/dist/ids/token.js.map +1 -0
  105. package/dist/index.d.ts +10 -6
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +255 -5925
  108. package/dist/index.js.map +1 -1
  109. package/dist/parsers/index.d.ts +0 -1
  110. package/dist/parsers/index.d.ts.map +1 -1
  111. package/dist/parsers/index.js +0 -1
  112. package/dist/parsers/index.js.map +1 -1
  113. package/dist/registry/all-tools.d.ts +14 -0
  114. package/dist/registry/all-tools.d.ts.map +1 -0
  115. package/dist/registry/all-tools.js +68 -0
  116. package/dist/registry/all-tools.js.map +1 -0
  117. package/dist/registry/context.d.ts +19 -0
  118. package/dist/registry/context.d.ts.map +1 -0
  119. package/dist/registry/context.js +20 -0
  120. package/dist/registry/context.js.map +1 -0
  121. package/dist/registry/define-tool.d.ts +15 -0
  122. package/dist/registry/define-tool.d.ts.map +1 -0
  123. package/dist/registry/define-tool.js +8 -0
  124. package/dist/registry/define-tool.js.map +1 -0
  125. package/dist/registry/elicit-links.d.ts +35 -0
  126. package/dist/registry/elicit-links.d.ts.map +1 -0
  127. package/dist/registry/elicit-links.js +102 -0
  128. package/dist/registry/elicit-links.js.map +1 -0
  129. package/dist/registry/elicitor.d.ts +24 -0
  130. package/dist/registry/elicitor.d.ts.map +1 -0
  131. package/dist/registry/elicitor.js +51 -0
  132. package/dist/registry/elicitor.js.map +1 -0
  133. package/dist/registry/index.d.ts +13 -0
  134. package/dist/registry/index.d.ts.map +1 -0
  135. package/dist/registry/index.js +8 -0
  136. package/dist/registry/index.js.map +1 -0
  137. package/dist/registry/registry.d.ts +73 -0
  138. package/dist/registry/registry.d.ts.map +1 -0
  139. package/dist/registry/registry.js +221 -0
  140. package/dist/registry/registry.js.map +1 -0
  141. package/dist/registry/types.d.ts +146 -0
  142. package/dist/registry/types.d.ts.map +1 -0
  143. package/dist/registry/types.js +6 -0
  144. package/dist/registry/types.js.map +1 -0
  145. package/dist/search/compiler.d.ts +49 -0
  146. package/dist/search/compiler.d.ts.map +1 -0
  147. package/dist/search/compiler.js +168 -0
  148. package/dist/search/compiler.js.map +1 -0
  149. package/dist/signature.js +2 -2
  150. package/dist/signature.js.map +1 -1
  151. package/dist/state/delta-store.d.ts +85 -0
  152. package/dist/state/delta-store.d.ts.map +1 -0
  153. package/dist/state/delta-store.js +124 -0
  154. package/dist/state/delta-store.js.map +1 -0
  155. package/dist/state/migrate.d.ts +23 -0
  156. package/dist/state/migrate.d.ts.map +1 -0
  157. package/dist/state/migrate.js +81 -0
  158. package/dist/state/migrate.js.map +1 -0
  159. package/dist/state/schema.d.ts +26 -0
  160. package/dist/state/schema.d.ts.map +1 -0
  161. package/dist/state/schema.js +77 -0
  162. package/dist/state/schema.js.map +1 -0
  163. package/dist/state/store.d.ts +155 -0
  164. package/dist/state/store.d.ts.map +1 -0
  165. package/dist/state/store.js +321 -0
  166. package/dist/state/store.js.map +1 -0
  167. package/dist/tools/calendar-graph.d.ts +41 -0
  168. package/dist/tools/calendar-graph.d.ts.map +1 -0
  169. package/dist/tools/calendar-graph.js +299 -0
  170. package/dist/tools/calendar-graph.js.map +1 -0
  171. package/dist/tools/calendar-permissions.d.ts +17 -7
  172. package/dist/tools/calendar-permissions.d.ts.map +1 -1
  173. package/dist/tools/calendar-permissions.js +60 -4
  174. package/dist/tools/calendar-permissions.js.map +1 -1
  175. package/dist/tools/calendar.d.ts +133 -82
  176. package/dist/tools/calendar.d.ts.map +1 -1
  177. package/dist/tools/calendar.js +249 -136
  178. package/dist/tools/calendar.js.map +1 -1
  179. package/dist/tools/categories.d.ts +14 -4
  180. package/dist/tools/categories.d.ts.map +1 -1
  181. package/dist/tools/categories.js +59 -2
  182. package/dist/tools/categories.js.map +1 -1
  183. package/dist/tools/checklist-items.d.ts +19 -9
  184. package/dist/tools/checklist-items.d.ts.map +1 -1
  185. package/dist/tools/checklist-items.js +71 -5
  186. package/dist/tools/checklist-items.js.map +1 -1
  187. package/dist/tools/contact-folders.d.ts +50 -0
  188. package/dist/tools/contact-folders.d.ts.map +1 -0
  189. package/dist/tools/contact-folders.js +136 -0
  190. package/dist/tools/contact-folders.js.map +1 -0
  191. package/dist/tools/contacts-graph.d.ts +45 -0
  192. package/dist/tools/contacts-graph.d.ts.map +1 -0
  193. package/dist/tools/contacts-graph.js +174 -0
  194. package/dist/tools/contacts-graph.js.map +1 -0
  195. package/dist/tools/contacts.d.ts +61 -30
  196. package/dist/tools/contacts.d.ts.map +1 -1
  197. package/dist/tools/contacts.js +150 -93
  198. package/dist/tools/contacts.js.map +1 -1
  199. package/dist/tools/excel.d.ts +20 -10
  200. package/dist/tools/excel.d.ts.map +1 -1
  201. package/dist/tools/excel.js +82 -6
  202. package/dist/tools/excel.js.map +1 -1
  203. package/dist/tools/focused-overrides.d.ts +14 -4
  204. package/dist/tools/focused-overrides.d.ts.map +1 -1
  205. package/dist/tools/focused-overrides.js +59 -2
  206. package/dist/tools/focused-overrides.js.map +1 -1
  207. package/dist/tools/index.d.ts +4 -5
  208. package/dist/tools/index.d.ts.map +1 -1
  209. package/dist/tools/index.js +4 -6
  210. package/dist/tools/index.js.map +1 -1
  211. package/dist/tools/linked-resources.d.ts +17 -7
  212. package/dist/tools/linked-resources.d.ts.map +1 -1
  213. package/dist/tools/linked-resources.js +60 -4
  214. package/dist/tools/linked-resources.js.map +1 -1
  215. package/dist/tools/mail-graph.d.ts +38 -0
  216. package/dist/tools/mail-graph.d.ts.map +1 -0
  217. package/dist/tools/mail-graph.js +187 -0
  218. package/dist/tools/mail-graph.js.map +1 -0
  219. package/dist/tools/mail-rules.d.ts +20 -8
  220. package/dist/tools/mail-rules.d.ts.map +1 -1
  221. package/dist/tools/mail-rules.js +63 -7
  222. package/dist/tools/mail-rules.js.map +1 -1
  223. package/dist/tools/mail-send.d.ts +39 -27
  224. package/dist/tools/mail-send.d.ts.map +1 -1
  225. package/dist/tools/mail-send.js +249 -24
  226. package/dist/tools/mail-send.js.map +1 -1
  227. package/dist/tools/mail.d.ts +91 -68
  228. package/dist/tools/mail.d.ts.map +1 -1
  229. package/dist/tools/mail.js +232 -243
  230. package/dist/tools/mail.js.map +1 -1
  231. package/dist/tools/mailbox-organization.d.ts +51 -34
  232. package/dist/tools/mailbox-organization.d.ts.map +1 -1
  233. package/dist/tools/mailbox-organization.js +318 -35
  234. package/dist/tools/mailbox-organization.js.map +1 -1
  235. package/dist/tools/mailbox-settings.d.ts +59 -0
  236. package/dist/tools/mailbox-settings.d.ts.map +1 -0
  237. package/dist/tools/mailbox-settings.js +136 -0
  238. package/dist/tools/mailbox-settings.js.map +1 -0
  239. package/dist/tools/meetings.d.ts +24 -14
  240. package/dist/tools/meetings.d.ts.map +1 -1
  241. package/dist/tools/meetings.js +82 -6
  242. package/dist/tools/meetings.js.map +1 -1
  243. package/dist/tools/onedrive.d.ts +26 -16
  244. package/dist/tools/onedrive.d.ts.map +1 -1
  245. package/dist/tools/onedrive.js +140 -11
  246. package/dist/tools/onedrive.js.map +1 -1
  247. package/dist/tools/onenote.d.ts +63 -0
  248. package/dist/tools/onenote.d.ts.map +1 -0
  249. package/dist/tools/onenote.js +221 -0
  250. package/dist/tools/onenote.js.map +1 -0
  251. package/dist/tools/people.d.ts +10 -0
  252. package/dist/tools/people.d.ts.map +1 -1
  253. package/dist/tools/people.js +94 -0
  254. package/dist/tools/people.js.map +1 -1
  255. package/dist/tools/planner-visualization.d.ts +15 -5
  256. package/dist/tools/planner-visualization.d.ts.map +1 -1
  257. package/dist/tools/planner-visualization.js +58 -4
  258. package/dist/tools/planner-visualization.js.map +1 -1
  259. package/dist/tools/planner.d.ts +69 -39
  260. package/dist/tools/planner.d.ts.map +1 -1
  261. package/dist/tools/planner.js +231 -23
  262. package/dist/tools/planner.js.map +1 -1
  263. package/dist/tools/scheduling.d.ts +12 -0
  264. package/dist/tools/scheduling.d.ts.map +1 -1
  265. package/dist/tools/scheduling.js +38 -0
  266. package/dist/tools/scheduling.js.map +1 -1
  267. package/dist/tools/shared-mailbox.d.ts +164 -0
  268. package/dist/tools/shared-mailbox.d.ts.map +1 -0
  269. package/dist/tools/shared-mailbox.js +318 -0
  270. package/dist/tools/shared-mailbox.js.map +1 -0
  271. package/dist/tools/sharepoint-lists.d.ts +131 -0
  272. package/dist/tools/sharepoint-lists.d.ts.map +1 -0
  273. package/dist/tools/sharepoint-lists.js +246 -0
  274. package/dist/tools/sharepoint-lists.js.map +1 -0
  275. package/dist/tools/sharepoint.d.ts +24 -14
  276. package/dist/tools/sharepoint.d.ts.map +1 -1
  277. package/dist/tools/sharepoint.js +85 -9
  278. package/dist/tools/sharepoint.js.map +1 -1
  279. package/dist/tools/task-attachments.d.ts +17 -7
  280. package/dist/tools/task-attachments.d.ts.map +1 -1
  281. package/dist/tools/task-attachments.js +60 -4
  282. package/dist/tools/task-attachments.js.map +1 -1
  283. package/dist/tools/task-lists.d.ts +56 -0
  284. package/dist/tools/task-lists.d.ts.map +1 -0
  285. package/dist/tools/task-lists.js +155 -0
  286. package/dist/tools/task-lists.js.map +1 -0
  287. package/dist/tools/tasks-graph.d.ts +49 -0
  288. package/dist/tools/tasks-graph.d.ts.map +1 -0
  289. package/dist/tools/tasks-graph.js +193 -0
  290. package/dist/tools/tasks-graph.js.map +1 -0
  291. package/dist/tools/tasks.d.ts +121 -29
  292. package/dist/tools/tasks.d.ts.map +1 -1
  293. package/dist/tools/tasks.js +136 -84
  294. package/dist/tools/tasks.js.map +1 -1
  295. package/dist/tools/teams.d.ts +57 -46
  296. package/dist/tools/teams.d.ts.map +1 -1
  297. package/dist/tools/teams.js +288 -26
  298. package/dist/tools/teams.js.map +1 -1
  299. package/dist/tools/what-changed.d.ts +48 -0
  300. package/dist/tools/what-changed.d.ts.map +1 -0
  301. package/dist/tools/what-changed.js +149 -0
  302. package/dist/tools/what-changed.js.map +1 -0
  303. package/dist/types/calendar.d.ts +1 -1
  304. package/dist/types/calendar.d.ts.map +1 -1
  305. package/dist/types/calendar.js.map +1 -1
  306. package/dist/types/contacts.d.ts +1 -1
  307. package/dist/types/contacts.d.ts.map +1 -1
  308. package/dist/types/contacts.js.map +1 -1
  309. package/dist/types/mail.d.ts +1 -1
  310. package/dist/types/mail.d.ts.map +1 -1
  311. package/dist/types/mail.js.map +1 -1
  312. package/dist/utils/errors.d.ts +110 -38
  313. package/dist/utils/errors.d.ts.map +1 -1
  314. package/dist/utils/errors.js +239 -56
  315. package/dist/utils/errors.js.map +1 -1
  316. package/dist/visualization/types.d.ts +4 -4
  317. package/package.json +2 -3
  318. package/dist/applescript/account-repository.d.ts +0 -30
  319. package/dist/applescript/account-repository.d.ts.map +0 -1
  320. package/dist/applescript/account-repository.js +0 -38
  321. package/dist/applescript/account-repository.js.map +0 -1
  322. package/dist/applescript/account-scripts.d.ts +0 -21
  323. package/dist/applescript/account-scripts.d.ts.map +0 -1
  324. package/dist/applescript/account-scripts.js +0 -180
  325. package/dist/applescript/account-scripts.js.map +0 -1
  326. package/dist/applescript/calendar-manager.d.ts +0 -44
  327. package/dist/applescript/calendar-manager.d.ts.map +0 -1
  328. package/dist/applescript/calendar-manager.js +0 -92
  329. package/dist/applescript/calendar-manager.js.map +0 -1
  330. package/dist/applescript/calendar-writer.d.ts +0 -36
  331. package/dist/applescript/calendar-writer.d.ts.map +0 -1
  332. package/dist/applescript/calendar-writer.js +0 -94
  333. package/dist/applescript/calendar-writer.js.map +0 -1
  334. package/dist/applescript/content-readers.d.ts +0 -114
  335. package/dist/applescript/content-readers.d.ts.map +0 -1
  336. package/dist/applescript/content-readers.js +0 -328
  337. package/dist/applescript/content-readers.js.map +0 -1
  338. package/dist/applescript/executor.d.ts +0 -60
  339. package/dist/applescript/executor.d.ts.map +0 -1
  340. package/dist/applescript/executor.js +0 -173
  341. package/dist/applescript/executor.js.map +0 -1
  342. package/dist/applescript/index.d.ts +0 -20
  343. package/dist/applescript/index.d.ts.map +0 -1
  344. package/dist/applescript/index.js +0 -29
  345. package/dist/applescript/index.js.map +0 -1
  346. package/dist/applescript/mail-sender.d.ts +0 -38
  347. package/dist/applescript/mail-sender.d.ts.map +0 -1
  348. package/dist/applescript/mail-sender.js +0 -67
  349. package/dist/applescript/mail-sender.js.map +0 -1
  350. package/dist/applescript/parser.d.ts +0 -235
  351. package/dist/applescript/parser.d.ts.map +0 -1
  352. package/dist/applescript/parser.js +0 -496
  353. package/dist/applescript/parser.js.map +0 -1
  354. package/dist/applescript/repository.d.ts +0 -64
  355. package/dist/applescript/repository.d.ts.map +0 -1
  356. package/dist/applescript/repository.js +0 -444
  357. package/dist/applescript/repository.js.map +0 -1
  358. package/dist/applescript/scripts.d.ts +0 -265
  359. package/dist/applescript/scripts.d.ts.map +0 -1
  360. package/dist/applescript/scripts.js +0 -1483
  361. package/dist/applescript/scripts.js.map +0 -1
  362. package/dist/parsers/olk15.d.ts +0 -87
  363. package/dist/parsers/olk15.d.ts.map +0 -1
  364. package/dist/parsers/olk15.js +0 -368
  365. package/dist/parsers/olk15.js.map +0 -1
  366. package/dist/tools/notes.d.ts +0 -74
  367. package/dist/tools/notes.d.ts.map +0 -1
  368. package/dist/tools/notes.js +0 -136
  369. package/dist/tools/notes.js.map +0 -1
@@ -1,328 +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 { executeAppleScript, executeAppleScriptOrThrow } from './executor.js';
6
- import { AppleScriptError } from '../utils/errors.js';
7
- import * as scripts from './scripts.js';
8
- import * as parser from './parser.js';
9
- // =============================================================================
10
- // Path Format Constants
11
- // =============================================================================
12
- /**
13
- * Prefix for AppleScript email content paths.
14
- * Format: "applescript-email:123" where 123 is the message ID.
15
- */
16
- export const EMAIL_PATH_PREFIX = 'applescript-email:';
17
- /**
18
- * Prefix for AppleScript event content paths.
19
- * Format: "applescript-event:123" where 123 is the event ID.
20
- */
21
- export const EVENT_PATH_PREFIX = 'applescript-event:';
22
- /**
23
- * Prefix for AppleScript contact content paths.
24
- * Format: "applescript-contact:123" where 123 is the contact ID.
25
- */
26
- export const CONTACT_PATH_PREFIX = 'applescript-contact:';
27
- /**
28
- * Prefix for AppleScript task content paths.
29
- * Format: "applescript-task:123" where 123 is the task ID.
30
- */
31
- export const TASK_PATH_PREFIX = 'applescript-task:';
32
- /**
33
- * Prefix for AppleScript note content paths.
34
- * Format: "applescript-note:123" where 123 is the note ID.
35
- */
36
- export const NOTE_PATH_PREFIX = 'applescript-note:';
37
- // =============================================================================
38
- // Utility Functions
39
- // =============================================================================
40
- /**
41
- * Extracts the ID from an AppleScript path.
42
- */
43
- function extractId(path, prefix) {
44
- if (path == null || !path.startsWith(prefix)) {
45
- return null;
46
- }
47
- const idStr = path.substring(prefix.length);
48
- const id = parseInt(idStr, 10);
49
- return isNaN(id) ? null : id;
50
- }
51
- /**
52
- * Creates an AppleScript path from an entity ID.
53
- */
54
- export function createEmailPath(id) {
55
- return `${EMAIL_PATH_PREFIX}${id}`;
56
- }
57
- export function createEventPath(id) {
58
- return `${EVENT_PATH_PREFIX}${id}`;
59
- }
60
- export function createContactPath(id) {
61
- return `${CONTACT_PATH_PREFIX}${id}`;
62
- }
63
- export function createTaskPath(id) {
64
- return `${TASK_PATH_PREFIX}${id}`;
65
- }
66
- export function createNotePath(id) {
67
- return `${NOTE_PATH_PREFIX}${id}`;
68
- }
69
- // =============================================================================
70
- // Email Content Reader
71
- // =============================================================================
72
- /**
73
- * AppleScript-based email content reader.
74
- */
75
- export class AppleScriptEmailContentReader {
76
- readEmailBody(dataFilePath) {
77
- const id = extractId(dataFilePath, EMAIL_PATH_PREFIX);
78
- if (id == null) {
79
- return null;
80
- }
81
- try {
82
- const script = scripts.getMessage(id);
83
- const result = executeAppleScript(script);
84
- if (!result.success) {
85
- return null;
86
- }
87
- const email = parser.parseEmail(result.output);
88
- if (email == null) {
89
- return null;
90
- }
91
- // Return HTML content if available, otherwise plain text
92
- return email.htmlContent ?? email.plainContent;
93
- }
94
- catch {
95
- return null;
96
- }
97
- }
98
- }
99
- // =============================================================================
100
- // Event Content Reader
101
- // =============================================================================
102
- /**
103
- * AppleScript-based event content reader.
104
- */
105
- export class AppleScriptEventContentReader {
106
- readEventDetails(dataFilePath) {
107
- const id = extractId(dataFilePath, EVENT_PATH_PREFIX);
108
- if (id == null) {
109
- return null;
110
- }
111
- try {
112
- const script = scripts.getEvent(id);
113
- const result = executeAppleScript(script);
114
- if (!result.success) {
115
- return null;
116
- }
117
- const event = parser.parseEvent(result.output);
118
- if (event == null) {
119
- return null;
120
- }
121
- return {
122
- title: event.subject,
123
- location: event.location,
124
- description: event.htmlContent ?? event.plainContent,
125
- organizer: event.organizer,
126
- attendees: event.attendees.map((a) => ({
127
- email: a.email,
128
- name: a.name,
129
- status: 'unknown',
130
- })),
131
- };
132
- }
133
- catch {
134
- return null;
135
- }
136
- }
137
- }
138
- // =============================================================================
139
- // Contact Content Reader
140
- // =============================================================================
141
- /**
142
- * AppleScript-based contact content reader.
143
- */
144
- export class AppleScriptContactContentReader {
145
- readContactDetails(dataFilePath) {
146
- const id = extractId(dataFilePath, CONTACT_PATH_PREFIX);
147
- if (id == null) {
148
- return null;
149
- }
150
- try {
151
- const script = scripts.getContact(id);
152
- const result = executeAppleScript(script);
153
- if (!result.success) {
154
- return null;
155
- }
156
- const contact = parser.parseContact(result.output);
157
- if (contact == null) {
158
- return null;
159
- }
160
- // Build emails array
161
- const emails = contact.emails.map((e) => ({
162
- type: 'work',
163
- address: e,
164
- }));
165
- // Build phones array
166
- const phones = [];
167
- if (contact.homePhone != null) {
168
- phones.push({ type: 'home', number: contact.homePhone });
169
- }
170
- if (contact.workPhone != null) {
171
- phones.push({ type: 'work', number: contact.workPhone });
172
- }
173
- if (contact.mobilePhone != null) {
174
- phones.push({ type: 'mobile', number: contact.mobilePhone });
175
- }
176
- // Build addresses array
177
- const addresses = [];
178
- if (contact.homeStreet != null ||
179
- contact.homeCity != null ||
180
- contact.homeState != null ||
181
- contact.homeZip != null ||
182
- contact.homeCountry != null) {
183
- addresses.push({
184
- type: 'home',
185
- street: contact.homeStreet,
186
- city: contact.homeCity,
187
- state: contact.homeState,
188
- postalCode: contact.homeZip,
189
- country: contact.homeCountry,
190
- });
191
- }
192
- return {
193
- firstName: contact.firstName,
194
- lastName: contact.lastName,
195
- middleName: contact.middleName,
196
- nickname: contact.nickname,
197
- company: contact.company,
198
- jobTitle: contact.jobTitle,
199
- department: contact.department,
200
- emails,
201
- phones,
202
- addresses,
203
- notes: contact.notes,
204
- };
205
- }
206
- catch {
207
- return null;
208
- }
209
- }
210
- }
211
- // =============================================================================
212
- // Task Content Reader
213
- // =============================================================================
214
- /**
215
- * AppleScript-based task content reader.
216
- */
217
- export class AppleScriptTaskContentReader {
218
- readTaskDetails(dataFilePath) {
219
- const id = extractId(dataFilePath, TASK_PATH_PREFIX);
220
- if (id == null) {
221
- return null;
222
- }
223
- try {
224
- const script = scripts.getTask(id);
225
- const result = executeAppleScript(script);
226
- if (!result.success) {
227
- return null;
228
- }
229
- const task = parser.parseTask(result.output);
230
- if (task == null) {
231
- return null;
232
- }
233
- return {
234
- body: task.htmlContent ?? task.plainContent,
235
- completedDate: task.completedDate,
236
- reminderDate: null,
237
- categories: [],
238
- };
239
- }
240
- catch {
241
- return null;
242
- }
243
- }
244
- }
245
- // =============================================================================
246
- // Note Content Reader
247
- // =============================================================================
248
- /**
249
- * AppleScript-based note content reader.
250
- */
251
- export class AppleScriptNoteContentReader {
252
- readNoteDetails(dataFilePath) {
253
- const id = extractId(dataFilePath, NOTE_PATH_PREFIX);
254
- if (id == null) {
255
- return null;
256
- }
257
- try {
258
- const script = scripts.getNote(id);
259
- const result = executeAppleScript(script);
260
- if (!result.success) {
261
- return null;
262
- }
263
- const note = parser.parseNote(result.output);
264
- if (note == null) {
265
- return null;
266
- }
267
- const body = note.htmlContent ?? note.plainContent ?? '';
268
- const preview = body.substring(0, 200);
269
- return {
270
- title: note.name,
271
- body,
272
- preview,
273
- createdDate: note.createdDate,
274
- categories: [],
275
- };
276
- }
277
- catch {
278
- return null;
279
- }
280
- }
281
- }
282
- /**
283
- * AppleScript-based attachment reader.
284
- */
285
- export class AppleScriptAttachmentReader {
286
- listAttachments(emailId) {
287
- try {
288
- const script = scripts.listAttachments(emailId);
289
- const result = executeAppleScript(script);
290
- if (!result.success) {
291
- return [];
292
- }
293
- const rows = parser.parseAttachments(result.output);
294
- return rows.map((r) => ({
295
- index: r.index,
296
- name: r.name,
297
- size: r.fileSize,
298
- contentType: r.contentType,
299
- }));
300
- }
301
- catch {
302
- return [];
303
- }
304
- }
305
- saveAttachment(emailId, attachmentIndex, savePath) {
306
- const script = scripts.saveAttachment(emailId, attachmentIndex, savePath);
307
- const output = executeAppleScriptOrThrow(script);
308
- const result = parser.parseSaveAttachmentResult(output);
309
- if (result == null) {
310
- throw new AppleScriptError('Failed to parse save attachment response');
311
- }
312
- return result;
313
- }
314
- }
315
- /**
316
- * Creates all AppleScript content readers.
317
- */
318
- export function createAppleScriptContentReaders() {
319
- return {
320
- email: new AppleScriptEmailContentReader(),
321
- event: new AppleScriptEventContentReader(),
322
- contact: new AppleScriptContactContentReader(),
323
- task: new AppleScriptTaskContentReader(),
324
- note: new AppleScriptNoteContentReader(),
325
- attachment: new AppleScriptAttachmentReader(),
326
- };
327
- }
328
- //# sourceMappingURL=content-readers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"content-readers.js","sourceRoot":"","sources":["../../src/applescript/content-readers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AAEtC,gFAAgF;AAChF,wBAAwB;AACxB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC;AAE1D;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAEpD,gFAAgF;AAChF,oBAAoB;AACpB,gFAAgF;AAEhF;;GAEG;AACH,SAAS,SAAS,CAAC,IAAmB,EAAE,MAAc;IACpD,IAAI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gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACpD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACtB,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,IAAI,EAAE,CAAC,CAAC,QAAQ;gBAChB,WAAW,EAAE,CAAC,CAAC,WAAW;aAC3B,CAAC,CAAC,CAAC;QACN,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IAED,cAAc,CAAC,OAAe,EAAE,eAAuB,EAAE,QAAgB;QACvE,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,CAAC,CAAC;QAC1E,MAAM,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,MAAM,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;QAExD,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,gBAAgB,CAAC,0CAA0C,CAAC,CAAC;QACzE,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAkBD;;GAEG;AACH,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,KAAK,EAAE,IAAI,6BAA6B,EAAE;QAC1C,KAAK,EAAE,IAAI,6BAA6B,EAAE;QAC1C,OAAO,EAAE,IAAI,+BAA+B,EAAE;QAC9C,IAAI,EAAE,IAAI,4BAA4B,EAAE;QACxC,IAAI,EAAE,IAAI,4BAA4B,EAAE;QACxC,UAAU,EAAE,IAAI,2BAA2B,EAAE;KAC9C,CAAC;AACJ,CAAC"}
@@ -1,60 +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
- * Result of an AppleScript execution.
7
- */
8
- export interface AppleScriptResult {
9
- readonly success: boolean;
10
- readonly output: string;
11
- readonly error?: string;
12
- }
13
- /**
14
- * Options for AppleScript execution.
15
- */
16
- export interface ExecuteOptions {
17
- readonly timeoutMs?: number;
18
- }
19
- /**
20
- * Escapes a string for safe inclusion in AppleScript.
21
- * Handles quotes and backslashes.
22
- */
23
- export declare function escapeForAppleScript(value: string): string;
24
- /**
25
- * Executes an AppleScript and returns the result.
26
- *
27
- * @param script - The AppleScript code to execute
28
- * @param options - Execution options
29
- * @returns The result of execution
30
- */
31
- export declare function executeAppleScript(script: string, options?: ExecuteOptions): AppleScriptResult;
32
- /**
33
- * Executes an AppleScript and throws on failure.
34
- *
35
- * @param script - The AppleScript code to execute
36
- * @param options - Execution options
37
- * @returns The output string
38
- * @throws Error if execution fails
39
- */
40
- export declare function executeAppleScriptOrThrow(script: string, options?: ExecuteOptions): string;
41
- /**
42
- * Checks if Microsoft Outlook is currently running.
43
- */
44
- export declare function isOutlookRunning(): boolean;
45
- /**
46
- * Launches Microsoft Outlook if not already running.
47
- */
48
- export declare function launchOutlook(): boolean;
49
- /**
50
- * Gets the version of Microsoft Outlook.
51
- */
52
- export declare function getOutlookVersion(): string | null;
53
- /**
54
- * Error thrown when AppleScript execution fails.
55
- */
56
- export declare class AppleScriptExecutionError extends Error {
57
- readonly errorType: 'not_running' | 'permission_denied' | 'timeout' | 'unknown';
58
- constructor(message: string, errorType: 'not_running' | 'permission_denied' | 'timeout' | 'unknown');
59
- }
60
- //# sourceMappingURL=executor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/applescript/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkCH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AA0BD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAI1D;AAMD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,iBAAiB,CAmClG;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,MAAM,CAO9F;AAMD;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAU1C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAUvC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CASjD;AAMD;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,SAAS,EAAE,aAAa,GAAG,mBAAmB,GAAG,SAAS,GAAG,SAAS,CAAC;gBAEpE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,mBAAmB,GAAG,SAAS,GAAG,SAAS;CAKpG"}
@@ -1,173 +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 execution utilities.
7
- *
8
- * Provides functions to execute AppleScript commands via osascript
9
- * and handle errors, timeouts, and permission issues.
10
- */
11
- import { execSync } from 'node:child_process';
12
- // =============================================================================
13
- // Constants
14
- // =============================================================================
15
- /**
16
- * Default timeout for AppleScript execution in milliseconds.
17
- */
18
- const DEFAULT_TIMEOUT_MS = 30000;
19
- /**
20
- * Error messages for common AppleScript failures.
21
- */
22
- const ERROR_PATTERNS = {
23
- notRunning: /not running|application isn't running/i,
24
- permissionDenied: /not authorized|permission denied|assistive access/i,
25
- timeout: /timed out|timeout/i,
26
- handlerFailed: /AppleEvent handler failed/i,
27
- };
28
- // =============================================================================
29
- // Error Detection
30
- // =============================================================================
31
- /**
32
- * Determines the type of error from an error message.
33
- */
34
- function categorizeError(errorMessage) {
35
- if (ERROR_PATTERNS.notRunning.test(errorMessage)) {
36
- return 'not_running';
37
- }
38
- if (ERROR_PATTERNS.permissionDenied.test(errorMessage)) {
39
- return 'permission_denied';
40
- }
41
- if (ERROR_PATTERNS.timeout.test(errorMessage)) {
42
- return 'timeout';
43
- }
44
- return 'unknown';
45
- }
46
- // =============================================================================
47
- // Script Escaping
48
- // =============================================================================
49
- /**
50
- * Escapes a string for safe inclusion in AppleScript.
51
- * Handles quotes and backslashes.
52
- */
53
- export function escapeForAppleScript(value) {
54
- return value
55
- .replace(/\\/g, '\\\\')
56
- .replace(/"/g, '\\"');
57
- }
58
- // =============================================================================
59
- // Execution Functions
60
- // =============================================================================
61
- /**
62
- * Executes an AppleScript and returns the result.
63
- *
64
- * @param script - The AppleScript code to execute
65
- * @param options - Execution options
66
- * @returns The result of execution
67
- */
68
- export function executeAppleScript(script, options = {}) {
69
- const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
70
- const execOptions = {
71
- encoding: 'utf8',
72
- timeout: timeoutMs,
73
- maxBuffer: 50 * 1024 * 1024, // 50MB for large results
74
- stdio: ['pipe', 'pipe', 'pipe'],
75
- };
76
- try {
77
- // Execute via osascript
78
- const output = execSync(`osascript -e '${script.replace(/'/g, "'\"'\"'")}'`, execOptions);
79
- return {
80
- success: true,
81
- output: output.trim(),
82
- };
83
- }
84
- catch (error) {
85
- const errorMessage = error instanceof Error ? error.message : String(error);
86
- const stderr = error?.stderr;
87
- let stderrText = '';
88
- if (stderr instanceof Buffer) {
89
- stderrText = stderr.toString('utf8');
90
- }
91
- else if (typeof stderr === 'string') {
92
- stderrText = stderr;
93
- }
94
- const fullError = `${errorMessage}\n${stderrText}`.trim();
95
- return {
96
- success: false,
97
- output: '',
98
- error: fullError,
99
- };
100
- }
101
- }
102
- /**
103
- * Executes an AppleScript and throws on failure.
104
- *
105
- * @param script - The AppleScript code to execute
106
- * @param options - Execution options
107
- * @returns The output string
108
- * @throws Error if execution fails
109
- */
110
- export function executeAppleScriptOrThrow(script, options = {}) {
111
- const result = executeAppleScript(script, options);
112
- if (!result.success) {
113
- const errorType = categorizeError(result.error ?? '');
114
- throw new AppleScriptExecutionError(result.error ?? 'Unknown error', errorType);
115
- }
116
- return result.output;
117
- }
118
- // =============================================================================
119
- // Outlook-Specific Functions
120
- // =============================================================================
121
- /**
122
- * Checks if Microsoft Outlook is currently running.
123
- */
124
- export function isOutlookRunning() {
125
- const script = `
126
- tell application "System Events"
127
- set isRunning to (name of processes) contains "Microsoft Outlook"
128
- return isRunning
129
- end tell
130
- `;
131
- const result = executeAppleScript(script);
132
- return result.success && result.output.toLowerCase() === 'true';
133
- }
134
- /**
135
- * Launches Microsoft Outlook if not already running.
136
- */
137
- export function launchOutlook() {
138
- const script = `
139
- tell application "Microsoft Outlook"
140
- launch
141
- end tell
142
- return "launched"
143
- `;
144
- const result = executeAppleScript(script, { timeoutMs: 10000 });
145
- return result.success;
146
- }
147
- /**
148
- * Gets the version of Microsoft Outlook.
149
- */
150
- export function getOutlookVersion() {
151
- const script = `
152
- tell application "Microsoft Outlook"
153
- return version
154
- end tell
155
- `;
156
- const result = executeAppleScript(script);
157
- return result.success ? result.output : null;
158
- }
159
- // =============================================================================
160
- // Error Classes
161
- // =============================================================================
162
- /**
163
- * Error thrown when AppleScript execution fails.
164
- */
165
- export class AppleScriptExecutionError extends Error {
166
- errorType;
167
- constructor(message, errorType) {
168
- super(message);
169
- this.name = 'AppleScriptExecutionError';
170
- this.errorType = errorType;
171
- }
172
- }
173
- //# sourceMappingURL=executor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/applescript/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;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AG,SAAS,CAAC;IAC7B,CAAC;CACF"}
@@ -1,20 +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 module for Outlook integration.
7
- *
8
- * Provides AppleScript-based access to Microsoft Outlook for Mac,
9
- * enabling support for both classic and new Outlook versions.
10
- */
11
- export { executeAppleScript, executeAppleScriptOrThrow, escapeForAppleScript, isOutlookRunning, launchOutlook, getOutlookVersion, AppleScriptExecutionError, type AppleScriptResult, type ExecuteOptions, } from './executor.js';
12
- export { DELIMITERS } from './scripts.js';
13
- export { parseFolders, parseEmails, parseEmail, parseCalendars, parseEvents, parseEvent, parseContacts, parseContact, parseTasks, parseTask, parseNotes, parseNote, parseCount, parseAccounts, parseDefaultAccountId, parseFoldersWithAccount, parseRespondToEventResult, parseDeleteEventResult, parseUpdateEventResult, parseSendEmailResult, parseAttachments, parseSaveAttachmentResult, type AppleScriptFolderRow, type AppleScriptEmailRow, type AppleScriptCalendarRow, type AppleScriptEventRow, type AppleScriptContactRow, type AppleScriptTaskRow, type AppleScriptNoteRow, type AppleScriptAccountRow, type AppleScriptFolderWithAccountRow, type AppleScriptAttachmentRow, type RespondToEventResult, type DeleteEventResult, type UpdateEventResult, type SendEmailResult, type SaveAttachmentResult, } from './parser.js';
14
- export { AppleScriptRepository, createAppleScriptRepository, } from './repository.js';
15
- export { AccountRepository, createAccountRepository, type IAccountRepository, } from './account-repository.js';
16
- export { AppleScriptCalendarWriter, createCalendarWriter, type ICalendarWriter, type CreateEventParams as CalendarWriterCreateEventParams, type CreatedEvent, type RecurrenceConfig, } from './calendar-writer.js';
17
- export { AppleScriptCalendarManager, createCalendarManager, type ICalendarManager, type ResponseType, type ApplyToScope, type EventUpdates, type UpdatedEvent, } from './calendar-manager.js';
18
- export { AppleScriptEmailContentReader, AppleScriptEventContentReader, AppleScriptContactContentReader, AppleScriptTaskContentReader, AppleScriptNoteContentReader, AppleScriptAttachmentReader, createAppleScriptContentReaders, createEmailPath, createEventPath, createContactPath, createTaskPath, createNotePath, EMAIL_PATH_PREFIX, EVENT_PATH_PREFIX, CONTACT_PATH_PREFIX, TASK_PATH_PREFIX, NOTE_PATH_PREFIX, type AppleScriptContentReaders, type IAttachmentReader, } from './content-readers.js';
19
- export { AppleScriptMailSender, createMailSender, type IMailSender, type SendEmailParams as MailSenderSendEmailParams, type SentEmail, type Attachment, type InlineImage, } from './mail-sender.js';
20
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/applescript/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAGH,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,UAAU,EACV,aAAa,EACb,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GAC1B,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,IAAI,+BAA+B,EACzD,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B,EAC/B,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,EAC3B,+BAA+B,EAC/B,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,GACvB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,eAAe,IAAI,yBAAyB,EACjD,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,WAAW,GACjB,MAAM,kBAAkB,CAAC"}
@@ -1,29 +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 module for Outlook integration.
7
- *
8
- * Provides AppleScript-based access to Microsoft Outlook for Mac,
9
- * enabling support for both classic and new Outlook versions.
10
- */
11
- // Executor
12
- export { executeAppleScript, executeAppleScriptOrThrow, escapeForAppleScript, isOutlookRunning, launchOutlook, getOutlookVersion, AppleScriptExecutionError, } from './executor.js';
13
- // Scripts
14
- export { DELIMITERS } from './scripts.js';
15
- // Parser
16
- export { parseFolders, parseEmails, parseEmail, parseCalendars, parseEvents, parseEvent, parseContacts, parseContact, parseTasks, parseTask, parseNotes, parseNote, parseCount, parseAccounts, parseDefaultAccountId, parseFoldersWithAccount, parseRespondToEventResult, parseDeleteEventResult, parseUpdateEventResult, parseSendEmailResult, parseAttachments, parseSaveAttachmentResult, } from './parser.js';
17
- // Repository
18
- export { AppleScriptRepository, createAppleScriptRepository, } from './repository.js';
19
- // Account Repository
20
- export { AccountRepository, createAccountRepository, } from './account-repository.js';
21
- // Calendar Writer
22
- export { AppleScriptCalendarWriter, createCalendarWriter, } from './calendar-writer.js';
23
- // Calendar Manager
24
- export { AppleScriptCalendarManager, createCalendarManager, } from './calendar-manager.js';
25
- // Content Readers
26
- export { AppleScriptEmailContentReader, AppleScriptEventContentReader, AppleScriptContactContentReader, AppleScriptTaskContentReader, AppleScriptNoteContentReader, AppleScriptAttachmentReader, createAppleScriptContentReaders, createEmailPath, createEventPath, createContactPath, createTaskPath, createNotePath, EMAIL_PATH_PREFIX, EVENT_PATH_PREFIX, CONTACT_PATH_PREFIX, TASK_PATH_PREFIX, NOTE_PATH_PREFIX, } from './content-readers.js';
27
- // Mail Sender
28
- export { AppleScriptMailSender, createMailSender, } from './mail-sender.js';
29
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/applescript/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,WAAW;AACX,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,yBAAyB,GAG1B,MAAM,eAAe,CAAC;AAEvB,UAAU;AACV,OAAO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