ask-marcel-office-cli 1.0.0 → 1.5.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/CHANGELOG.md +65 -0
- package/README.md +153 -384
- package/dist/cli.js +13222 -94112
- package/dist/commands.json +1500 -135
- package/dist/composition/build-deps.d.ts +13 -0
- package/dist/composition/cli.d.ts +8 -0
- package/dist/domain/iso-datetime.d.ts +30 -0
- package/dist/domain/utilities/archive-status.d.ts +18 -0
- package/dist/domain/utilities/site-url-classifier.d.ts +15 -0
- package/dist/index.js +10912 -92275
- package/dist/infra/auth.d.ts +56 -3
- package/dist/infra/browser-auth.d.ts +100 -10
- package/dist/infra/graph-client.d.ts +40 -0
- package/dist/infra/legacy-doc-extractor.d.ts +14 -0
- package/dist/infra/msg-reader-adapter.d.ts +83 -0
- package/dist/infra/network-error.d.ts +9 -0
- package/dist/infra/ooxml-media-extractor.d.ts +27 -0
- package/dist/infra/ooxml-zip-adapter.d.ts +28 -0
- package/dist/infra/pdf-image-extractor.d.ts +18 -0
- package/dist/infra/pdf-text-extractor.d.ts +41 -0
- package/dist/infra/png-encode.d.ts +15 -0
- package/dist/infra/sheetjs-adapter.d.ts +1 -1
- package/dist/infra/system-browser-auth.d.ts +35 -0
- package/dist/infra/system-browser-loader.d.ts +3 -0
- package/dist/infra/token-callback-server.d.ts +31 -0
- package/dist/infra/zip-reader.d.ts +32 -0
- package/dist/presenter/error-hints.d.ts +41 -0
- package/dist/presenter/output.d.ts +2 -1
- package/dist/use-cases/commands/build-command.d.ts +30 -8
- package/dist/use-cases/commands/command-types.d.ts +53 -1
- package/dist/use-cases/commands/convert-calendar-event-attachment-to-markdown.d.ts +15 -0
- package/dist/use-cases/commands/{download-drive-item-version-as-pdf.d.ts → convert-calendar-event-attachment-to-pdf.d.ts} +2 -3
- package/dist/use-cases/commands/convert-drive-item-zip.d.ts +26 -0
- package/dist/use-cases/commands/convert-local-file.d.ts +37 -0
- package/dist/use-cases/commands/convert-mail-attachment-to-markdown.d.ts +7 -1
- package/dist/use-cases/commands/convert-mail-attachment-to-pdf.d.ts +2 -1
- package/dist/use-cases/commands/convert-mail-attachment-zip.d.ts +24 -0
- package/dist/use-cases/commands/convert-mail-to-markdown.d.ts +8 -0
- package/dist/use-cases/commands/create-mail-draft.d.ts +22 -0
- package/dist/use-cases/commands/doc-to-markdown.d.ts +14 -0
- package/dist/use-cases/commands/docs-render.d.ts +7 -2
- package/dist/use-cases/commands/docs.d.ts +44 -1
- package/dist/use-cases/commands/docx-comment-anchors.d.ts +22 -0
- package/dist/use-cases/commands/docx-metadata-to-markdown.d.ts +3 -0
- package/dist/use-cases/commands/docx-metadata.d.ts +69 -0
- package/dist/use-cases/commands/docx-to-markdown.d.ts +8 -3
- package/dist/use-cases/commands/download-drive-item-as-markdown.d.ts +9 -0
- package/dist/use-cases/commands/download-drive-item-version.d.ts +21 -0
- package/dist/use-cases/commands/{download-drive-item-version-as-markdown.d.ts → extract-drive-item-images.d.ts} +0 -1
- package/dist/use-cases/commands/extract-local-file-images.d.ts +21 -0
- package/dist/use-cases/commands/{download-drive-item-version-content.d.ts → extract-mail-attachment-images.d.ts} +2 -3
- package/dist/use-cases/commands/extract-sharepoint-links-in-documents.d.ts +33 -0
- package/dist/use-cases/commands/extract-sharepoint-links-in-mail.d.ts +1 -8
- package/dist/use-cases/commands/fetch-raw-bytes.d.ts +2 -1
- package/dist/use-cases/commands/file-counts.d.ts +7 -0
- package/dist/use-cases/commands/filter-archived-sites.d.ts +17 -0
- package/dist/use-cases/commands/find-chats-with-user.d.ts +10 -0
- package/dist/use-cases/commands/first-sentence.d.ts +12 -0
- package/dist/use-cases/commands/get-chat.d.ts +1 -5
- package/dist/use-cases/commands/get-excel-chart-image.d.ts +20 -0
- package/dist/use-cases/commands/get-excel-used-range.d.ts +7 -2
- package/dist/use-cases/commands/get-onenote-page-as-markdown.d.ts +8 -0
- package/dist/use-cases/commands/get-teams-chat-message.d.ts +9 -0
- package/dist/use-cases/commands/get-todo-task.d.ts +9 -2
- package/dist/use-cases/commands/image-extraction.d.ts +10 -0
- package/dist/use-cases/commands/iso-datetime-schema.d.ts +21 -0
- package/dist/use-cases/commands/link-shape.d.ts +13 -0
- package/dist/use-cases/commands/list-accessible-drives.d.ts +14 -0
- package/dist/use-cases/commands/list-calendar-event-attachments.d.ts +14 -0
- package/dist/use-cases/commands/list-calendar-view-delta.d.ts +2 -2
- package/dist/use-cases/commands/list-teams-chat-history.d.ts +16 -0
- package/dist/use-cases/commands/list-teams-chat-messages.d.ts +8 -0
- package/dist/use-cases/commands/list-teams-chats-with-messages.d.ts +9 -0
- package/dist/use-cases/commands/mail-quote-stripper.d.ts +25 -0
- package/dist/use-cases/commands/markdown-dispatch.d.ts +29 -0
- package/dist/use-cases/commands/markdown-pipeline.d.ts +6 -2
- package/dist/use-cases/commands/media-files.d.ts +20 -0
- package/dist/use-cases/commands/msg-to-markdown.d.ts +28 -0
- package/dist/use-cases/commands/odf-content-to-markdown.d.ts +5 -0
- package/dist/use-cases/commands/odf-metadata-to-markdown.d.ts +3 -0
- package/dist/use-cases/commands/odf-metadata.d.ts +26 -0
- package/dist/use-cases/commands/odf-to-markdown.d.ts +17 -0
- package/dist/use-cases/commands/office-extensions.d.ts +13 -0
- package/dist/use-cases/commands/office-to-markdown.d.ts +6 -2
- package/dist/use-cases/commands/onenote-metadata.d.ts +21 -0
- package/dist/use-cases/commands/onenote-resource-embedder.d.ts +3 -0
- package/dist/use-cases/commands/ooxml-metadata-to-markdown.d.ts +16 -0
- package/dist/use-cases/commands/ooxml-metadata.d.ts +23 -0
- package/dist/use-cases/commands/ooxml-xml-walker.d.ts +36 -0
- package/dist/use-cases/commands/option-descriptions.d.ts +5 -0
- package/dist/use-cases/commands/output-path.d.ts +23 -0
- package/dist/use-cases/commands/pdf-to-markdown.d.ts +19 -0
- package/dist/use-cases/commands/pptx-comments.d.ts +24 -0
- package/dist/use-cases/commands/pptx-metadata-to-markdown.d.ts +3 -0
- package/dist/use-cases/commands/pptx-metadata.d.ts +33 -0
- package/dist/use-cases/commands/pptx-slides.d.ts +17 -0
- package/dist/use-cases/commands/pptx-to-markdown.d.ts +7 -0
- package/dist/use-cases/commands/read-mail-attachment.d.ts +15 -0
- package/dist/use-cases/commands/resolve-calendar-link.d.ts +8 -0
- package/dist/use-cases/commands/resolve-drive-share-link.d.ts +8 -0
- package/dist/use-cases/commands/resolve-mail-link.d.ts +8 -0
- package/dist/use-cases/commands/resolve-teams-link.d.ts +8 -0
- package/dist/use-cases/commands/search-all-accessible-sites.d.ts +12 -0
- package/dist/use-cases/commands/search-index-total.d.ts +3 -0
- package/dist/use-cases/commands/search-sharepoint-sites-by-name.d.ts +3 -2
- package/dist/use-cases/commands/sharepoint-link-extractor.d.ts +17 -12
- package/dist/use-cases/commands/text-passthrough.d.ts +15 -2
- package/dist/use-cases/commands/todo-parse-uri-rewrite.d.ts +7 -0
- package/dist/use-cases/commands/update-mail-draft.d.ts +22 -0
- package/dist/use-cases/commands/version-id.d.ts +7 -6
- package/dist/use-cases/commands/xlsx-comments.d.ts +29 -0
- package/dist/use-cases/commands/xlsx-metadata-to-markdown.d.ts +3 -0
- package/dist/use-cases/commands/xlsx-metadata.d.ts +39 -0
- package/dist/use-cases/commands/xlsx-to-markdown.d.ts +9 -2
- package/dist/use-cases/commands/zip-archive-to-markdown.d.ts +30 -0
- package/dist/use-cases/ports/filesystem.d.ts +10 -0
- package/docs/COMMANDS.md +259 -0
- package/docs/USAGE.md +266 -0
- package/docs/commands.json +1500 -135
- package/package.json +16 -8
- /package/dist/use-cases/commands/{download-onedrive-file-content.d.ts → download-drive-item-content.d.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
4
|
+
import type { CommandMeta } from './command-types.js';
|
|
5
|
+
declare const schema: z.ZodObject<{
|
|
6
|
+
driveId: z.ZodString;
|
|
7
|
+
itemId: z.ZodString;
|
|
8
|
+
versionId: z.ZodString;
|
|
9
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
10
|
+
markdown: "markdown";
|
|
11
|
+
pdf: "pdf";
|
|
12
|
+
original: "original";
|
|
13
|
+
}>>;
|
|
14
|
+
includeMetadata: z.ZodOptional<z.ZodEnum<{
|
|
15
|
+
true: "true";
|
|
16
|
+
false: "false";
|
|
17
|
+
}>>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
20
|
+
declare const meta: CommandMeta;
|
|
21
|
+
export { execute, meta, schema };
|
|
@@ -5,7 +5,6 @@ import type { CommandMeta } from './command-types.js';
|
|
|
5
5
|
declare const schema: z.ZodObject<{
|
|
6
6
|
driveId: z.ZodString;
|
|
7
7
|
itemId: z.ZodString;
|
|
8
|
-
versionId: z.ZodString;
|
|
9
8
|
}, z.core.$strip>;
|
|
10
9
|
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
11
10
|
declare const meta: CommandMeta;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
4
|
+
import type { FileSystem } from '../ports/filesystem.js';
|
|
5
|
+
import type { CommandMeta } from './command-types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Extract embedded images from a file ON DISK — the local sibling of
|
|
8
|
+
* `extract-drive-item-images`, sharing its `extractImagesFromBytes` dispatch
|
|
9
|
+
* (OOXML media parts / unpdf page walk). It completes two flows the drive
|
|
10
|
+
* command cannot reach: a Graph-rendered PDF saved with the global
|
|
11
|
+
* output-path flag (the legacy-.ppt route), and Office files unpacked from a
|
|
12
|
+
* local archive. Like `convert-local-file`, it never touches Graph and is
|
|
13
|
+
* executed via `executeLocal(fs, params)`.
|
|
14
|
+
*/
|
|
15
|
+
declare const schema: z.ZodObject<{
|
|
16
|
+
path: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const executeLocal: (fs: FileSystem, params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
19
|
+
declare const execute: (_graph: GraphClient, _params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
20
|
+
declare const meta: CommandMeta;
|
|
21
|
+
export { execute, executeLocal, meta, schema };
|
|
@@ -3,9 +3,8 @@ import type { Result } from '../../domain/result.js';
|
|
|
3
3
|
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
4
4
|
import type { CommandMeta } from './command-types.js';
|
|
5
5
|
declare const schema: z.ZodObject<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
versionId: z.ZodString;
|
|
6
|
+
messageId: z.ZodString;
|
|
7
|
+
attachmentId: z.ZodString;
|
|
9
8
|
}, z.core.$strip>;
|
|
10
9
|
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
11
10
|
declare const meta: CommandMeta;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
4
|
+
import type { CommandMeta } from './command-types.js';
|
|
5
|
+
import type { ResolvedLink } from './sharepoint-link-extractor.js';
|
|
6
|
+
/**
|
|
7
|
+
* The document-side sibling of `extract-sharepoint-links-in-mail`: pulls a
|
|
8
|
+
* docx/xlsx/pptx from a OneDrive / SharePoint item and finds every
|
|
9
|
+
* `*.sharepoint.com` URL embedded in it, resolving each to its driveItem so an
|
|
10
|
+
* agent can follow references out of a document the same way it follows them
|
|
11
|
+
* out of an email. Read-only — no conversion happens here.
|
|
12
|
+
*
|
|
13
|
+
* In OOXML, external hyperlinks live in the `_rels/*.rels` parts as
|
|
14
|
+
* `<Relationship Target="…" TargetMode="External"/>`. `extractExternalRels`
|
|
15
|
+
* (shared with the metadata extractors) already surfaces exactly those, so this
|
|
16
|
+
* command is pure composition: fetch bytes → open the package → collect external
|
|
17
|
+
* targets → keep the SharePoint ones → resolve via `/shares/{token}/driveItem`.
|
|
18
|
+
*/
|
|
19
|
+
declare const schema: z.ZodObject<{
|
|
20
|
+
driveId: z.ZodString;
|
|
21
|
+
itemId: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
type DocumentLinkSummary = {
|
|
24
|
+
readonly driveId: string;
|
|
25
|
+
readonly itemId: string;
|
|
26
|
+
readonly links: ReadonlyArray<ResolvedLink>;
|
|
27
|
+
readonly truncated: boolean;
|
|
28
|
+
readonly skippedCount: number;
|
|
29
|
+
};
|
|
30
|
+
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<DocumentLinkSummary, GraphError>>;
|
|
31
|
+
declare const meta: CommandMeta;
|
|
32
|
+
export { execute, meta, schema };
|
|
33
|
+
export type { DocumentLinkSummary };
|
|
@@ -2,14 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import type { Result } from '../../domain/result.js';
|
|
3
3
|
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
4
4
|
import type { CommandMeta } from './command-types.js';
|
|
5
|
-
type ResolvedLink
|
|
6
|
-
readonly url: string;
|
|
7
|
-
readonly driveId?: string;
|
|
8
|
-
readonly itemId?: string;
|
|
9
|
-
readonly name?: string;
|
|
10
|
-
readonly webUrl?: string;
|
|
11
|
-
readonly error?: string;
|
|
12
|
-
};
|
|
5
|
+
import type { ResolvedLink } from './sharepoint-link-extractor.js';
|
|
13
6
|
type LinkExtractionSummary = {
|
|
14
7
|
readonly messageId: string;
|
|
15
8
|
readonly subject?: string;
|
|
@@ -34,6 +34,7 @@ export type InlineBinary = {
|
|
|
34
34
|
readonly size: number;
|
|
35
35
|
readonly base64: string;
|
|
36
36
|
};
|
|
37
|
+
export declare const base64ToBytes: (b64: string) => Uint8Array;
|
|
37
38
|
export declare const fetchRawBytes: (graph: GraphClient, contentPath: string, opts?: FetchOptions) => Promise<Result<Uint8Array, GraphError>>;
|
|
38
39
|
export declare const inlineBinary: (graph: GraphClient, contentPath: string, opts?: FetchOptions) => Promise<Result<InlineBinary, GraphError>>;
|
|
39
40
|
/**
|
|
@@ -44,7 +45,7 @@ export declare const inlineBinary: (graph: GraphClient, contentPath: string, opt
|
|
|
44
45
|
* reference-attachment edge cases) Graph silently falls back to returning
|
|
45
46
|
* the raw source bytes — same envelope shape, but contentType is the
|
|
46
47
|
* source MIME (or `application/octet-stream`). The audit (round-5 #2)
|
|
47
|
-
* caught this happening on `download-drive-item-version
|
|
48
|
+
* caught this happening on `download-drive-item-version --format pdf` for v79
|
|
48
49
|
* of a pptx: the response said `contentType: "application/octet-stream"`
|
|
49
50
|
* with the exact source byte size, and an LLM that saved it as `.pdf`
|
|
50
51
|
* would have had a corrupt file.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GraphClient } from '../../infra/graph-client.js';
|
|
2
|
+
type FileCountOptions = {
|
|
3
|
+
readonly max?: number;
|
|
4
|
+
readonly chunk?: number;
|
|
5
|
+
};
|
|
6
|
+
declare const addEstimatedFileCounts: (graph: GraphClient, entries: ReadonlyArray<unknown>, webUrlOf: (entry: unknown) => string | undefined, options?: FileCountOptions) => Promise<ReadonlyArray<unknown>>;
|
|
7
|
+
export { addEstimatedFileCounts };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GraphClient } from '../../infra/graph-client.js';
|
|
2
|
+
declare const ARCHIVE_PROBE_MAX = 250;
|
|
3
|
+
type FilterOptions = {
|
|
4
|
+
readonly probeMax?: number;
|
|
5
|
+
readonly chunkSize?: number;
|
|
6
|
+
};
|
|
7
|
+
type FilterResult = {
|
|
8
|
+
readonly value: ReadonlyArray<unknown>;
|
|
9
|
+
readonly archivedExcluded: number;
|
|
10
|
+
readonly nonNavigableExcluded: number;
|
|
11
|
+
readonly notFoundExcluded: number;
|
|
12
|
+
readonly probeErrors: number;
|
|
13
|
+
readonly probeTruncated: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const filterOutArchivedSites: (graph: GraphClient, sites: ReadonlyArray<unknown>, options?: FilterOptions) => Promise<FilterResult>;
|
|
16
|
+
export { ARCHIVE_PROBE_MAX, filterOutArchivedSites };
|
|
17
|
+
export type { FilterResult };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
maxPages: z.ZodOptional<z.ZodString>;
|
|
6
|
+
pageSize: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
declare const execute: Command['execute'];
|
|
9
|
+
declare const meta: CommandMeta;
|
|
10
|
+
export { execute, meta, schema };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compact a multi-sentence summary to its first sentence — everything up to the
|
|
3
|
+
* first `. ` (period-space) or the first newline, whichever comes first. Returns
|
|
4
|
+
* the full text untouched when no sensible cut-point exists, so the result is
|
|
5
|
+
* never less readable than the original. Keeps the trailing period when cutting
|
|
6
|
+
* on `. ` so the line ends naturally.
|
|
7
|
+
*
|
|
8
|
+
* Shared by the top-level `--help` subcommand listing (composition) and the
|
|
9
|
+
* `help-json --terse` discovery projection (use-cases) so both compact the same
|
|
10
|
+
* way — the terse manifest in particular must stay token-cheap per category.
|
|
11
|
+
*/
|
|
12
|
+
export declare const firstSentence: (full: string) => string;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
import type { CommandMeta } from './command-types.js';
|
|
3
|
-
declare const schema:
|
|
4
|
-
chatId: z.ZodString;
|
|
5
|
-
}, z.core.$strip>;
|
|
6
|
-
declare const execute: import("./command-types.js").CommandExecute;
|
|
2
|
+
declare const execute: import("./command-types.js").CommandExecute, schema: import("./command-types.js").CommandSchema;
|
|
7
3
|
declare const meta: CommandMeta;
|
|
8
4
|
export { execute, meta, schema };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
4
|
+
import type { CommandMeta } from './command-types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Renders an Excel chart to a PNG via Graph's chart `Image()` function. Unlike
|
|
7
|
+
* the rest of the conversion surface, this endpoint returns the bytes as a
|
|
8
|
+
* base64 string in the JSON `value` field (NOT a 302 redirect), so a plain
|
|
9
|
+
* `graph.get` is enough. `width=0,height=0` = the chart's natural size;
|
|
10
|
+
* `fittingMode='Fit'` preserves aspect ratio.
|
|
11
|
+
*/
|
|
12
|
+
declare const schema: z.ZodObject<{
|
|
13
|
+
driveId: z.ZodString;
|
|
14
|
+
itemId: z.ZodString;
|
|
15
|
+
worksheetId: z.ZodString;
|
|
16
|
+
chartId: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
19
|
+
declare const meta: CommandMeta;
|
|
20
|
+
export { execute, meta, schema };
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { CommandMeta } from './command-types.js';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
3
|
declare const schema: z.ZodObject<{
|
|
4
4
|
driveId: z.ZodString;
|
|
5
5
|
itemId: z.ZodString;
|
|
6
6
|
worksheetId: z.ZodString;
|
|
7
|
+
full: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
true: "true";
|
|
9
|
+
false: "false";
|
|
10
|
+
}>>;
|
|
11
|
+
maxCells: z.ZodOptional<z.ZodString>;
|
|
7
12
|
}, z.core.$strip>;
|
|
8
|
-
declare const execute:
|
|
13
|
+
declare const execute: Command['execute'];
|
|
9
14
|
declare const meta: CommandMeta;
|
|
10
15
|
export { execute, meta, schema };
|
|
@@ -4,6 +4,14 @@ import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
|
4
4
|
import type { CommandMeta } from './command-types.js';
|
|
5
5
|
declare const schema: z.ZodObject<{
|
|
6
6
|
onenotePageId: z.ZodString;
|
|
7
|
+
inlineImages: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
true: "true";
|
|
9
|
+
false: "false";
|
|
10
|
+
}>>;
|
|
11
|
+
includeMetadata: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
true: "true";
|
|
13
|
+
false: "false";
|
|
14
|
+
}>>;
|
|
7
15
|
}, z.core.$strip>;
|
|
8
16
|
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
9
17
|
declare const meta: CommandMeta;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
chatId: z.ZodString;
|
|
5
|
+
messageId: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
declare const execute: Command['execute'];
|
|
8
|
+
declare const meta: CommandMeta;
|
|
9
|
+
export { execute, meta, schema };
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
todoTaskListId: z.ZodString;
|
|
5
|
+
todoTaskId: z.ZodString;
|
|
6
|
+
select: z.ZodOptional<z.ZodString>;
|
|
7
|
+
expand: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
declare const execute: Command['execute'];
|
|
3
10
|
declare const meta: CommandMeta;
|
|
4
11
|
export { execute, meta, schema };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Result } from '../../domain/result.js';
|
|
2
|
+
import type { GraphError } from '../../infra/graph-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* Shared by extract-drive-item-images and extract-mail-attachment-images: pick the
|
|
5
|
+
* extractor for the file's extension and run it, or return a 415 whose tail
|
|
6
|
+
* (`fetchHint`) names the caller's raw-bytes route. Both commands fetch / decode the
|
|
7
|
+
* bytes first, then hand them here, so the dispatch + media envelope live in one place.
|
|
8
|
+
*/
|
|
9
|
+
declare const extractImagesFromBytes: (bytes: Uint8Array, name: string, fetchHint: string) => Promise<Result<unknown, GraphError>>;
|
|
10
|
+
export { extractImagesFromBytes };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Reusable Zod field for an ISO-8601 UTC datetime parameter that ALSO accepts
|
|
4
|
+
* the relative-date vocabulary defined in `src/domain/iso-datetime.ts`
|
|
5
|
+
* (`7d`, `1w`, `today`, `monday`, `start-of-month`, etc.). Calendar commands
|
|
6
|
+
* compose this into their schemas in place of `z.string().min(1)`; the
|
|
7
|
+
* URL-builder sees the already-resolved canonical ISO form.
|
|
8
|
+
*
|
|
9
|
+
* Audit Jane-session §C: removes the manual ISO arithmetic an LLM had to do
|
|
10
|
+
* to ask "what changed this week" against `list-calendar-view`. Type
|
|
11
|
+
* inference is left to Zod so the calendar commands' shape signatures stay
|
|
12
|
+
* compatible with `buildListCommand`'s `ZodRawShape` constraint.
|
|
13
|
+
*/
|
|
14
|
+
export declare const isoDateTimeField: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../domain/iso-datetime.js").IsoDateTime, string>>;
|
|
15
|
+
/**
|
|
16
|
+
* Standard `--start-date-time` / `--end-date-time` description used by every
|
|
17
|
+
* calendar-view command. Mentions both the strict ISO form Graph expects and
|
|
18
|
+
* the relative vocabulary the CLI also accepts, so the LLM sees both options
|
|
19
|
+
* in `--help`.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RELATIVE_DATE_DESCRIPTION = "ISO 8601 UTC (e.g. `2026-04-01T00:00:00Z` or `2026-04-01`) OR a relative shape: `7d` / `1w` / `2h` / `30m` (past), `+7d` (future), `today` / `yesterday` / `tomorrow` / `now`, `monday`-`sunday` (most recent), `last-<weekday>` / `next-<weekday>`, `start-of-week|month|year`, `end-of-week|month|year`. Relative forms resolve at request time relative to the CLI process clock (UTC).";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type SiblingResolver = 'mail' | 'calendar' | 'teams' | 'drive-share';
|
|
2
|
+
/**
|
|
3
|
+
* Classify a Zod-validated URL string by which sibling resolver it
|
|
4
|
+
* belongs to. Returns `null` when the URL matches none of the known
|
|
5
|
+
* resolver families (caller falls through to its own "unknown URL"
|
|
6
|
+
* rejection message).
|
|
7
|
+
*
|
|
8
|
+
* Precondition: `raw` has been validated through `z.url()`. Calling
|
|
9
|
+
* with an unvalidated string is a programmer error — `new URL(raw)`
|
|
10
|
+
* will throw and the atelier rule forbids try/catch outside infra.
|
|
11
|
+
*/
|
|
12
|
+
export declare const detectSiblingResolver: (raw: string) => SiblingResolver | null;
|
|
13
|
+
export type { SiblingResolver };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Result } from '../../domain/result.js';
|
|
3
|
+
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
4
|
+
import type { CommandMeta } from './command-types.js';
|
|
5
|
+
declare const schema: z.ZodObject<{
|
|
6
|
+
maxGroups: z.ZodOptional<z.ZodString>;
|
|
7
|
+
countFiles: z.ZodOptional<z.ZodEnum<{
|
|
8
|
+
true: "true";
|
|
9
|
+
false: "false";
|
|
10
|
+
}>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const execute: (graph: GraphClient, params: Record<string, string>) => Promise<Result<unknown, GraphError>>;
|
|
13
|
+
declare const meta: CommandMeta;
|
|
14
|
+
export { execute, meta, schema };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
eventId: z.ZodString;
|
|
5
|
+
top: z.ZodOptional<z.ZodString>;
|
|
6
|
+
skip: z.ZodOptional<z.ZodString>;
|
|
7
|
+
select: z.ZodOptional<z.ZodString>;
|
|
8
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
9
|
+
orderby: z.ZodOptional<z.ZodString>;
|
|
10
|
+
expand: z.ZodOptional<z.ZodString>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
declare const execute: Command['execute'];
|
|
13
|
+
declare const meta: CommandMeta;
|
|
14
|
+
export { execute, meta, schema };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { Command, CommandMeta } from './command-types.js';
|
|
3
3
|
declare const schema: z.ZodObject<{
|
|
4
|
-
startDateTime: z.ZodString
|
|
5
|
-
endDateTime: z.ZodString
|
|
4
|
+
startDateTime: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../domain/iso-datetime.js").IsoDateTime, string>>;
|
|
5
|
+
endDateTime: z.ZodPipe<z.ZodString, z.ZodTransform<import("../../domain/iso-datetime.js").IsoDateTime, string>>;
|
|
6
6
|
top: z.ZodOptional<z.ZodString>;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
8
|
declare const execute: Command['execute'];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
chatId: z.ZodString;
|
|
5
|
+
syncState: z.ZodOptional<z.ZodURL>;
|
|
6
|
+
pageSize: z.ZodOptional<z.ZodString>;
|
|
7
|
+
maxPages: z.ZodOptional<z.ZodString>;
|
|
8
|
+
full: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
true: "true";
|
|
10
|
+
false: "false";
|
|
11
|
+
}>>;
|
|
12
|
+
maxContentChars: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
declare const execute: Command['execute'];
|
|
15
|
+
declare const meta: CommandMeta;
|
|
16
|
+
export { execute, meta, schema };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
chatId: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
declare const execute: Command['execute'];
|
|
7
|
+
declare const meta: CommandMeta;
|
|
8
|
+
export { execute, meta, schema };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { Command, CommandMeta } from './command-types.js';
|
|
3
|
+
declare const schema: z.ZodObject<{
|
|
4
|
+
pageSize: z.ZodOptional<z.ZodString>;
|
|
5
|
+
continuationToken: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
declare const execute: Command['execute'];
|
|
8
|
+
declare const meta: CommandMeta;
|
|
9
|
+
export { execute, meta, schema };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Strips quoted reply chains / forwarded-message blocks from an Outlook or
|
|
3
|
+
* Gmail HTML email body so long threads don't duplicate quoted content into the
|
|
4
|
+
* model's context. Conservative: truncates the body at the EARLIEST well-known
|
|
5
|
+
* reply/forward boundary marker and replaces the tail with a single visible
|
|
6
|
+
* placeholder — nothing is removed silently, and `--keep-quoted true` on
|
|
7
|
+
* `convert-mail-to-markdown` restores the full body. Pure string transform.
|
|
8
|
+
*
|
|
9
|
+
* Only structural, vendor-specific markers are matched (never a bare
|
|
10
|
+
* `<blockquote>`, which legitimate content uses too):
|
|
11
|
+
* - Outlook desktop / OWA reply+forward header block: `<div id="divRplyFwdMsg">`
|
|
12
|
+
* - Outlook "type above this line" boundary: `<div id="appendonsend">`
|
|
13
|
+
* - Outlook mobile reference container: `<div id="mail-editor-reference-message-container">`
|
|
14
|
+
* - Outlook classic separator: `<hr id="stopSpelling">`
|
|
15
|
+
* - Gmail quote container: `<div class="gmail_quote">` / `<blockquote class="gmail_quote">`
|
|
16
|
+
*/
|
|
17
|
+
declare const stripQuotedReplies: (html: string) => {
|
|
18
|
+
readonly html: string;
|
|
19
|
+
readonly stripped: boolean;
|
|
20
|
+
};
|
|
21
|
+
declare const stripQuotedPlainText: (text: string) => {
|
|
22
|
+
readonly text: string;
|
|
23
|
+
readonly stripped: boolean;
|
|
24
|
+
};
|
|
25
|
+
export { stripQuotedPlainText, stripQuotedReplies };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Result } from '../../domain/result.js';
|
|
2
|
+
import type { GraphError } from '../../infra/graph-client.js';
|
|
3
|
+
declare const IMAGE_EXTENSIONS: ReadonlySet<string>;
|
|
4
|
+
type ConversionHints = {
|
|
5
|
+
readonly pdfNoText: string;
|
|
6
|
+
readonly legacyPpt: string;
|
|
7
|
+
readonly image: (ext: string) => string;
|
|
8
|
+
readonly generic: (ext: string) => string;
|
|
9
|
+
};
|
|
10
|
+
type BytesToMarkdownOptions = {
|
|
11
|
+
readonly includeMetadata?: boolean;
|
|
12
|
+
readonly maxCells?: number;
|
|
13
|
+
readonly inlineImages?: boolean;
|
|
14
|
+
readonly depth?: number;
|
|
15
|
+
};
|
|
16
|
+
declare const NESTED_HINTS: ConversionHints;
|
|
17
|
+
/**
|
|
18
|
+
* The single extension→converter dispatch for every markdown command, operating on
|
|
19
|
+
* bytes already in hand: download-drive-item-as-markdown fetches them, convert-mail
|
|
20
|
+
* decodes the attachment, convert-drive-item-zip unpacks the entry. Loop/Fluid/
|
|
21
|
+
* Whiteboard (`?format=html`) need a Graph round-trip and are handled by the drive
|
|
22
|
+
* caller BEFORE this — they never reach here. An Outlook `.msg` is rendered to markdown
|
|
23
|
+
* (headers + body) with each of its own attachments recursed through this dispatch.
|
|
24
|
+
* `hints` carry the caller-specific messages; a non-text result is an `err` the caller
|
|
25
|
+
* surfaces (a 415, or a zip note).
|
|
26
|
+
*/
|
|
27
|
+
declare const bytesToMarkdown: (bytes: Uint8Array, filename: string, opts: BytesToMarkdownOptions, hints: ConversionHints) => Promise<Result<unknown, GraphError>>;
|
|
28
|
+
export { bytesToMarkdown, IMAGE_EXTENSIONS, NESTED_HINTS };
|
|
29
|
+
export type { BytesToMarkdownOptions, ConversionHints };
|
|
@@ -18,6 +18,10 @@ type MarkdownEnvelope = {
|
|
|
18
18
|
readonly size: number;
|
|
19
19
|
readonly text: string;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type ConvertOptions = {
|
|
22
|
+
readonly inlineAttachments?: ReadonlyArray<InlineAttachment>;
|
|
23
|
+
readonly htmlTransform?: (html: string) => Promise<string>;
|
|
24
|
+
};
|
|
25
|
+
declare const convertToMarkdown: (graph: GraphClient, contentPath: string, options?: ConvertOptions) => Promise<Result<MarkdownEnvelope, GraphError>>;
|
|
22
26
|
export { convertToMarkdown };
|
|
23
|
-
export type { MarkdownEnvelope };
|
|
27
|
+
export type { ConvertOptions, MarkdownEnvelope };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { MediaPart } from '../../infra/ooxml-media-extractor.js';
|
|
2
|
+
/**
|
|
3
|
+
* Shapes the raw media parts from the extractor into the inline response
|
|
4
|
+
* envelope `{ count, media: [{ path, contentType, sizeBytes, base64 }] }`.
|
|
5
|
+
* The global `--output-dir` flag recognises this shape and writes each image
|
|
6
|
+
* to disk (see `persistMediaIfRequested`); without it, the base64 rides back
|
|
7
|
+
* in the envelope. Shared by every image-extraction command.
|
|
8
|
+
*/
|
|
9
|
+
type MediaEnvelope = {
|
|
10
|
+
readonly count: number;
|
|
11
|
+
readonly media: ReadonlyArray<{
|
|
12
|
+
readonly path: string;
|
|
13
|
+
readonly contentType: string;
|
|
14
|
+
readonly sizeBytes: number;
|
|
15
|
+
readonly base64: string;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
declare const buildMediaResponse: (parts: ReadonlyArray<MediaPart>) => MediaEnvelope;
|
|
19
|
+
export { buildMediaResponse };
|
|
20
|
+
export type { MediaEnvelope };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Result } from '../../domain/result.js';
|
|
2
|
+
import type { GraphError } from '../../infra/graph-client.js';
|
|
3
|
+
import type { ParsedMsg } from '../../infra/msg-reader-adapter.js';
|
|
4
|
+
/**
|
|
5
|
+
* Render an Outlook `.msg` file to markdown: an H1 subject, a From/To/Cc/Bcc/Date
|
|
6
|
+
* header block, the message body (the plain-text body when present, else the HTML
|
|
7
|
+
* body run through turndown), and an `## Attachments` section where each attachment
|
|
8
|
+
* is converted recursively through the SAME dispatch the zip command uses — so a
|
|
9
|
+
* `.docx`/`.pdf`/`.csv` attached to an email becomes markdown inline, exactly as the
|
|
10
|
+
* user asked ("maybe same way as zip"). Unconvertible attachments (images, binaries)
|
|
11
|
+
* are listed with the dispatch's note instead of failing the whole message.
|
|
12
|
+
*
|
|
13
|
+
* `recurse` is the attachment converter injected by `markdown-dispatch` (its own
|
|
14
|
+
* `bytesToMarkdown`, with the recursion depth incremented). Injecting it — rather
|
|
15
|
+
* than importing `bytesToMarkdown` here — keeps this use-case off the dispatch's
|
|
16
|
+
* import cycle and lets every rendering branch be tested with a plain fake. `depth`
|
|
17
|
+
* caps `.msg`-inside-`.msg` nesting: past {@link MAX_MSG_DEPTH} levels an embedded
|
|
18
|
+
* message's attachments are listed but not expanded.
|
|
19
|
+
*/
|
|
20
|
+
declare const MAX_MSG_DEPTH = 3;
|
|
21
|
+
type MsgToMarkdownOptions = {
|
|
22
|
+
readonly depth?: number;
|
|
23
|
+
};
|
|
24
|
+
type MsgAttachmentConverter = (bytes: Uint8Array, filename: string) => Promise<Result<unknown, GraphError>>;
|
|
25
|
+
declare const renderMsg: (msg: ParsedMsg, depth: number, recurse: MsgAttachmentConverter) => Promise<string>;
|
|
26
|
+
declare const msgToMarkdown: (bytes: Uint8Array, opts: MsgToMarkdownOptions, recurse: MsgAttachmentConverter) => Promise<Result<unknown, GraphError>>;
|
|
27
|
+
export { MAX_MSG_DEPTH, msgToMarkdown, renderMsg };
|
|
28
|
+
export type { MsgAttachmentConverter, MsgToMarkdownOptions };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Result } from '../../domain/result.js';
|
|
2
|
+
import type { GraphError } from '../../infra/graph-client.js';
|
|
3
|
+
declare const renderOdfContent: (xml: string | undefined) => string;
|
|
4
|
+
declare const odfContentToMarkdown: (bytes: Uint8Array) => Promise<Result<string, GraphError>>;
|
|
5
|
+
export { odfContentToMarkdown, renderOdfContent };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Result } from '../../domain/result.js';
|
|
2
|
+
import type { GraphError } from '../../infra/graph-client.js';
|
|
3
|
+
/**
|
|
4
|
+
* Pulls the side-channel content out of an OpenDocument package (.odt / .ods /
|
|
5
|
+
* .odp and their .ot* template variants). OpenDocument is also a ZIP, so the
|
|
6
|
+
* shared `openOoxmlZip` adapter + XML walker apply directly; only the metadata
|
|
7
|
+
* shape differs — it lives in a single `meta.xml` (`office:document-meta >
|
|
8
|
+
* office:meta`) rather than the OOXML `docProps/*` parts.
|
|
9
|
+
*
|
|
10
|
+
* High-value subset: document properties (Dublin Core + ODF meta fields like
|
|
11
|
+
* generator / editing-cycles / creation-date), keyword list, and user-defined
|
|
12
|
+
* custom properties (`meta:user-defined`) — the ODF analog of OOXML custom
|
|
13
|
+
* document properties.
|
|
14
|
+
*/
|
|
15
|
+
type UserDefined = {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly value: string;
|
|
18
|
+
};
|
|
19
|
+
type OdfMetadata = {
|
|
20
|
+
readonly properties: Readonly<Record<string, string>>;
|
|
21
|
+
readonly keywords: ReadonlyArray<string>;
|
|
22
|
+
readonly userDefined: ReadonlyArray<UserDefined>;
|
|
23
|
+
};
|
|
24
|
+
declare const extractOdfMetadata: (bytes: Uint8Array) => Promise<Result<OdfMetadata, GraphError>>;
|
|
25
|
+
export { extractOdfMetadata };
|
|
26
|
+
export type { OdfMetadata, UserDefined };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Result } from '../../domain/result.js';
|
|
2
|
+
import type { GraphError } from '../../infra/graph-client.js';
|
|
3
|
+
import type { MarkdownEnvelope } from './docx-to-markdown.js';
|
|
4
|
+
/**
|
|
5
|
+
* Converts an OpenDocument (.odt / .ods / .odp) body to markdown by walking
|
|
6
|
+
* `content.xml` (headings / paragraphs / lists / tables for text docs, named
|
|
7
|
+
* sheet-tables for spreadsheets, per-slide text for presentations — including
|
|
8
|
+
* style-hidden content a rendered viewer would suppress). With
|
|
9
|
+
* `--include-metadata true` the side-channel / authored metadata
|
|
10
|
+
* (properties, keywords, user-defined fields) is appended as a trailing block.
|
|
11
|
+
*/
|
|
12
|
+
type OdfToMarkdownOptions = {
|
|
13
|
+
readonly includeMetadata?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const odfToMarkdown: (bytes: Uint8Array, opts?: OdfToMarkdownOptions) => Promise<Result<MarkdownEnvelope, GraphError>>;
|
|
16
|
+
export { odfToMarkdown };
|
|
17
|
+
export type { OdfToMarkdownOptions };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the OOXML extension families the markdown
|
|
3
|
+
* dispatchers route together. Each family shares one parser/extractor: the
|
|
4
|
+
* macro-enabled (`*m`) and template (`*tx` / `*tm`) variants are structurally
|
|
5
|
+
* identical to their base format, so they alias onto the same path. Keeping
|
|
6
|
+
* the lists here (not duplicated per dispatcher) means a new variant is added
|
|
7
|
+
* in exactly one place.
|
|
8
|
+
*/
|
|
9
|
+
declare const DOCX_FAMILY: ReadonlySet<string>;
|
|
10
|
+
declare const XLSX_FAMILY: ReadonlySet<string>;
|
|
11
|
+
declare const PPTX_FAMILY: ReadonlySet<string>;
|
|
12
|
+
declare const ODF_FAMILY: ReadonlySet<string>;
|
|
13
|
+
export { DOCX_FAMILY, ODF_FAMILY, PPTX_FAMILY, XLSX_FAMILY };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { Result } from '../../domain/result.js';
|
|
2
2
|
import type { GraphClient, GraphError } from '../../infra/graph-client.js';
|
|
3
3
|
import type { FetchOptions } from './fetch-raw-bytes.js';
|
|
4
|
-
|
|
4
|
+
type OfficeToMarkdownOptions = FetchOptions & {
|
|
5
|
+
readonly includeMetadata?: boolean;
|
|
6
|
+
readonly inlineImages?: boolean;
|
|
7
|
+
readonly maxCells?: number;
|
|
8
|
+
};
|
|
9
|
+
declare const officeToMarkdown: (graph: GraphClient, contentPath: string, filename: string, opts?: OfficeToMarkdownOptions) => Promise<Result<unknown, GraphError>>;
|
|
5
10
|
export { officeToMarkdown };
|
|
6
|
-
export type { FetchOptions };
|