@zapier/microsoft-outlook-connector 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/LICENSE +93 -0
  2. package/NOTICE +8 -0
  3. package/NOTICE.md +8 -0
  4. package/README.md +145 -2
  5. package/SKILL.md +159 -0
  6. package/cli.js +71 -0
  7. package/cli.ts +5 -0
  8. package/connections.ts +69 -0
  9. package/dist/cli.js +4 -0
  10. package/dist/index.js +1823 -0
  11. package/index.ts +103 -0
  12. package/package.json +65 -4
  13. package/preflight.sh +157 -0
  14. package/references/microsoft-outlook-api-gotchas.md +210 -0
  15. package/scripts/copyMessage.ts +68 -0
  16. package/scripts/createContact.ts +39 -0
  17. package/scripts/createDraft.ts +71 -0
  18. package/scripts/createEvent.ts +61 -0
  19. package/scripts/createMailFolder.ts +68 -0
  20. package/scripts/createReplyDraft.ts +81 -0
  21. package/scripts/deleteContact.ts +47 -0
  22. package/scripts/deleteEvent.ts +61 -0
  23. package/scripts/deleteMessage.ts +57 -0
  24. package/scripts/forwardMessage.ts +75 -0
  25. package/scripts/getAttachment.ts +60 -0
  26. package/scripts/getContact.ts +44 -0
  27. package/scripts/getEvent.ts +63 -0
  28. package/scripts/getMe.ts +42 -0
  29. package/scripts/getMessage.ts +68 -0
  30. package/scripts/listAttachments.ts +94 -0
  31. package/scripts/listCalendarView.ts +99 -0
  32. package/scripts/listCalendars.ts +85 -0
  33. package/scripts/listCategories.ts +49 -0
  34. package/scripts/listContacts.ts +81 -0
  35. package/scripts/listEvents.ts +94 -0
  36. package/scripts/listMailFolders.ts +98 -0
  37. package/scripts/listMessages.ts +106 -0
  38. package/scripts/moveMessage.ts +68 -0
  39. package/scripts/replyToMessage.ts +73 -0
  40. package/scripts/sendDraft.ts +55 -0
  41. package/scripts/sendMail.ts +68 -0
  42. package/scripts/updateContact.ts +49 -0
  43. package/scripts/updateEvent.ts +69 -0
  44. package/scripts/updateMessage.ts +99 -0
  45. package/tsup.config.ts +63 -0
package/tsup.config.ts ADDED
@@ -0,0 +1,63 @@
1
+ /**
2
+ * tsup build config for connectors.
3
+ *
4
+ * Compiles index.ts (library entry, bundled) and cli.ts (CLI, bundled but
5
+ * with the connector's index module kept external).
6
+ *
7
+ * The cli.ts entry externalises ./index.ts → ./index.js via an esbuild plugin
8
+ * so that dist/cli.js imports the pre-built dist/index.js as a separate module
9
+ * rather than inlining scripts. Without this, each script's top-level
10
+ * `await handleIfScriptMain(import.meta, …)` ends up inside the single-file
11
+ * bundle; in Node 22.18+ import.meta.main is true for the bundle entry,
12
+ * causing every script to execute when the dispatch CLI starts instead of
13
+ * routing via runDispatchCli.
14
+ *
15
+ * Managed by @zapier/connectors-dev — do not edit; synced byte-for-byte
16
+ * across every connector.
17
+ */
18
+ import { defineConfig } from "tsup";
19
+
20
+ export default defineConfig([
21
+ {
22
+ entry: ["index.ts"],
23
+ format: ["esm"],
24
+ dts: false,
25
+ clean: true,
26
+ target: "es2022",
27
+ external: [
28
+ "@modelcontextprotocol/sdk",
29
+ "@zapier/zapier-sdk",
30
+ "zod",
31
+ "@zapier/connectors-sdk",
32
+ ],
33
+ },
34
+ {
35
+ entry: ["cli.ts"],
36
+ format: ["esm"],
37
+ dts: false,
38
+ clean: false,
39
+ target: "es2022",
40
+ external: [
41
+ "@modelcontextprotocol/sdk",
42
+ "@zapier/zapier-sdk",
43
+ "zod",
44
+ "@zapier/connectors-sdk",
45
+ ],
46
+ esbuildPlugins: [
47
+ {
48
+ name: "externalize-connector-index",
49
+ setup(build) {
50
+ // Resolve ./index.ts to the pre-built ./index.js and mark it external
51
+ // so scripts are not inlined into dist/cli.js. When dist/index.js is
52
+ // imported (not the entry), import.meta.main is false inside it and
53
+ // handleIfScriptMain's existing !meta.main guard suppresses per-script
54
+ // execution — no SDK changes required.
55
+ build.onResolve({ filter: /^\.\/index(\.ts)?$/ }, () => ({
56
+ path: "./index.js",
57
+ external: true,
58
+ }));
59
+ },
60
+ },
61
+ ],
62
+ },
63
+ ]);