ask-marcel-office-cli 1.0.0 → 1.4.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 (39) hide show
  1. package/README.md +119 -394
  2. package/dist/cli.js +4183 -1772
  3. package/dist/commands.json +309 -104
  4. package/dist/domain/iso-datetime.d.ts +30 -0
  5. package/dist/index.js +3780 -1712
  6. package/dist/infra/auth.d.ts +30 -0
  7. package/dist/infra/browser-auth.d.ts +75 -10
  8. package/dist/infra/graph-client.d.ts +38 -0
  9. package/dist/infra/network-error.d.ts +9 -0
  10. package/dist/presenter/error-hints.d.ts +41 -0
  11. package/dist/presenter/output.d.ts +2 -1
  12. package/dist/use-cases/commands/build-command.d.ts +30 -8
  13. package/dist/use-cases/commands/command-types.d.ts +12 -1
  14. package/dist/use-cases/commands/convert-mail-to-markdown.d.ts +4 -0
  15. package/dist/use-cases/commands/docs-render.d.ts +4 -2
  16. package/dist/use-cases/commands/docs.d.ts +44 -1
  17. package/dist/use-cases/commands/{download-drive-item-version-as-markdown.d.ts → download-drive-item-version.d.ts} +5 -0
  18. package/dist/use-cases/commands/fetch-raw-bytes.d.ts +1 -1
  19. package/dist/use-cases/commands/find-chats-with-user.d.ts +10 -0
  20. package/dist/use-cases/commands/get-chat.d.ts +1 -5
  21. package/dist/use-cases/commands/get-excel-used-range.d.ts +7 -2
  22. package/dist/use-cases/commands/get-teams-chat-message.d.ts +9 -0
  23. package/dist/use-cases/commands/iso-datetime-schema.d.ts +21 -0
  24. package/dist/use-cases/commands/link-shape.d.ts +13 -0
  25. package/dist/use-cases/commands/list-calendar-view-delta.d.ts +2 -2
  26. package/dist/use-cases/commands/list-teams-chat-history.d.ts +16 -0
  27. package/dist/use-cases/commands/list-teams-chat-messages.d.ts +8 -0
  28. package/dist/use-cases/commands/list-teams-chats-with-messages.d.ts +9 -0
  29. package/dist/use-cases/commands/resolve-calendar-link.d.ts +8 -0
  30. package/dist/use-cases/commands/resolve-drive-share-link.d.ts +8 -0
  31. package/dist/use-cases/commands/resolve-mail-link.d.ts +8 -0
  32. package/dist/use-cases/commands/resolve-teams-link.d.ts +8 -0
  33. package/dist/use-cases/commands/version-id.d.ts +7 -6
  34. package/docs/COMMANDS.md +243 -0
  35. package/docs/USAGE.md +249 -0
  36. package/docs/commands.json +309 -104
  37. package/package.json +3 -1
  38. package/dist/use-cases/commands/download-drive-item-version-as-pdf.d.ts +0 -12
  39. package/dist/use-cases/commands/download-drive-item-version-content.d.ts +0 -12
@@ -0,0 +1,30 @@
1
+ import type { Result } from './result.js';
2
+ /**
3
+ * Branded ISO-8601 UTC datetime string ("2026-04-01T00:00:00Z"). Constructed
4
+ * only via `parseIsoDateTime` (or the unsafe escape hatch); every Graph URL
5
+ * built from a calendar-window parameter accepts this type so an unvalidated
6
+ * `string` can't slip through.
7
+ *
8
+ * Audit Hervé-session §C: the previous calendar commands accepted any
9
+ * `z.string().min(1)`, so the LLM had to compute "last week" → ISO by hand.
10
+ * `parseIsoDateTime` turns "7d" / "monday" / "today" / "2026-04-01" / a strict
11
+ * ISO timestamp into the canonical ISO form, so the URL builders stay
12
+ * unchanged.
13
+ */
14
+ export type IsoDateTime = string & {
15
+ readonly __brand: 'IsoDateTime';
16
+ };
17
+ export declare const isoDateTimeUnsafe: (raw: string) => IsoDateTime;
18
+ export type DateParseError = {
19
+ readonly type: 'invalid_format';
20
+ readonly input: string;
21
+ readonly hint: string;
22
+ };
23
+ /**
24
+ * Parse a free-form date input into the canonical `2026-04-01T00:00:00Z`
25
+ * shape (`IsoDateTime`). Returns `err(invalid_format)` with a multi-line
26
+ * hint listing every accepted shape — surfaces directly through the CLI's
27
+ * validation envelope so an LLM gets all the alternatives without an extra
28
+ * round-trip. See `HINT` above for the full list.
29
+ */
30
+ export declare const parseIsoDateTime: (rawInput: string, now?: Date) => Result<IsoDateTime, DateParseError>;