document-operations 0.0.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/index.cjs +1010 -0
- package/dist/index.d.cts +2259 -0
- package/dist/index.d.ts +2259 -0
- package/dist/index.js +973 -0
- package/package.json +106 -2
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,2259 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { DocumentFormat, LayoutDocument } from "documents.js";
|
|
3
|
+
import { ContentBlock, ContentSection, DefinitionsTable, LayoutMetadata, SourceResidue } from "document-schema.js";
|
|
4
|
+
//#region src/operation.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Carried alongside an operation's own input -- transport concerns an operation's own logic needs but that don't belong in its Zod input schema, since a caller (MCP tool args, a REST request body, a CLI flag set) never supplies them directly. Currently just an abort signal: MCP derives it from the tool call's own `ctx.mcpReq.signal`, document-cli from its own `--timeout`-derived controller, and a REST server would derive it from the incoming HTTP request's own abort event.
|
|
7
|
+
*/
|
|
8
|
+
interface DocumentOperationContext {
|
|
9
|
+
readonly signal?: AbortSignal;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* One document operation, complete enough for any of the three transports (MCP tool registration, a CLI command, a REST route) to expose it without redefining its shape or its behaviour: `inputSchema`/`outputSchema` are the single source of truth for validation and description text, and `run()` is the transport-agnostic implementation, throwing a plain (or documents.js's own typed) Error on failure rather than shaping any transport-specific result -- each transport decides for itself how to present a thrown error (MCP wraps it as an isError tool result, a REST route as a 4xx JSON body, a CLI command as a stderr message and a non-zero exit code).
|
|
13
|
+
*/
|
|
14
|
+
interface DocumentOperation<In = unknown, Out = unknown> {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly title: string;
|
|
17
|
+
readonly description: string;
|
|
18
|
+
readonly inputSchema: z.ZodType<In>;
|
|
19
|
+
readonly outputSchema?: z.ZodType<Out>;
|
|
20
|
+
run(input: In, context?: DocumentOperationContext): Promise<Out>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Builds a DocumentOperation whose input and output types are both inferred from real Zod schemas, so a call site never has to repeat `z.infer<typeof Schema>` itself. Use `defineOperationWithoutOutputSchema` instead for the rare operation whose original MCP tool registration declared no outputSchema at all.
|
|
24
|
+
*
|
|
25
|
+
* Deliberately returns the parameter object's own inferred literal type rather than an explicit `DocumentOperation<...>` return annotation. Zod 4's ZodType carries its own output type as one of three generic parameters (ZodType<Output, Input, Internals>), and TypeScript cannot prove, from inside this function body, that a generic `InputSchema extends z.ZodType` also extends `z.ZodType<z.infer<InputSchema>>` -- the two-step indirection through an abstract type parameter defeats it even though it is true for every concrete schema. Letting the literal's own type flow out instead sidesteps that: a caller's own concrete schema (e.g. `ConvertDocumentInputSchema`) is trivially assignable to `DocumentOperation<In, Out>`'s `z.ZodType<In>` field wherever that supertype is actually needed (the registry array below, or a future MCP/REST/CLI adapter parameter), because widening a CONCRETE schema's output type to line up is a normal covariant check, not the same self-referential generic one.
|
|
26
|
+
*/
|
|
27
|
+
declare function defineOperation<InputSchema extends z.ZodType, OutputSchema extends z.ZodType>(operation: {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly title: string;
|
|
30
|
+
readonly description: string;
|
|
31
|
+
readonly inputSchema: InputSchema;
|
|
32
|
+
readonly outputSchema: OutputSchema;
|
|
33
|
+
run(input: z.infer<InputSchema>, context?: DocumentOperationContext): Promise<z.infer<OutputSchema>>;
|
|
34
|
+
}): {
|
|
35
|
+
readonly name: string;
|
|
36
|
+
readonly title: string;
|
|
37
|
+
readonly description: string;
|
|
38
|
+
readonly inputSchema: InputSchema;
|
|
39
|
+
readonly outputSchema: OutputSchema;
|
|
40
|
+
run(input: z.infer<InputSchema>, context?: DocumentOperationContext): Promise<z.infer<OutputSchema>>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The `defineOperation` counterpart for an operation with no output schema to infer from (the original MCP tool registration declared none) -- `Out` is inferred from `run`'s own return type instead. See `defineOperation`'s own comment for why this returns the parameter object's inferred literal type rather than an explicit `DocumentOperation<...>` annotation.
|
|
44
|
+
*/
|
|
45
|
+
declare function defineOperationWithoutOutputSchema<InputSchema extends z.ZodType, Out>(operation: {
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly title: string;
|
|
48
|
+
readonly description: string;
|
|
49
|
+
readonly inputSchema: InputSchema;
|
|
50
|
+
run(input: z.infer<InputSchema>, context?: DocumentOperationContext): Promise<Out>;
|
|
51
|
+
}): {
|
|
52
|
+
readonly name: string;
|
|
53
|
+
readonly title: string;
|
|
54
|
+
readonly description: string;
|
|
55
|
+
readonly inputSchema: InputSchema;
|
|
56
|
+
run(input: z.infer<InputSchema>, context?: DocumentOperationContext): Promise<Out>;
|
|
57
|
+
};
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/registry.d.ts
|
|
60
|
+
/**
|
|
61
|
+
* Every document operation this package defines, one entry per MCP tool/CLI command/REST route -- "the same registry as the MCP" a consumer that needs to enumerate every operation (rather than importing one by name) reaches for: an MCP server registers each entry as a tool, a REST server adds one route per entry, and a CLI can validate its own parsed flags against an entry's inputSchema before dispatching to its run().
|
|
62
|
+
*/
|
|
63
|
+
declare const DOCUMENT_OPERATIONS: readonly DocumentOperation[];
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/io/document-input.d.ts
|
|
66
|
+
declare function inferFormatFromExtension(path: string): DocumentFormat | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The hybrid input shape every MCP tool that accepts a document accepts: either a filesystem path (format inferred from its extension) or inline base64-encoded bytes (format required, since there is no filename to infer it from).
|
|
69
|
+
*/
|
|
70
|
+
declare const DocumentInputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
71
|
+
path: z.ZodString;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
bytesBase64: z.ZodString;
|
|
74
|
+
format: z.ZodEnum<{
|
|
75
|
+
docx: "docx";
|
|
76
|
+
pptx: "pptx";
|
|
77
|
+
xlsx: "xlsx";
|
|
78
|
+
odt: "odt";
|
|
79
|
+
odp: "odp";
|
|
80
|
+
ods: "ods";
|
|
81
|
+
odg: "odg";
|
|
82
|
+
svg: "svg";
|
|
83
|
+
odf: "odf";
|
|
84
|
+
csv: "csv";
|
|
85
|
+
markdown: "markdown";
|
|
86
|
+
rtf: "rtf";
|
|
87
|
+
doc: "doc";
|
|
88
|
+
xls: "xls";
|
|
89
|
+
ppt: "ppt";
|
|
90
|
+
wpd: "wpd";
|
|
91
|
+
epub: "epub";
|
|
92
|
+
pdf: "pdf";
|
|
93
|
+
}>;
|
|
94
|
+
}, z.core.$strip>]>;
|
|
95
|
+
type DocumentInput = z.infer<typeof DocumentInputSchema>;
|
|
96
|
+
interface ResolvedDocumentInput {
|
|
97
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
98
|
+
readonly format: DocumentFormat;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Resolves the hybrid DocumentInput union to concrete bytes and a format: for the path shape, reads the file from disk and infers its format from the extension (throwing if the extension is unrecognised); for the bytesBase64 shape, decodes the inline payload and uses the caller-supplied format directly.
|
|
102
|
+
*/
|
|
103
|
+
declare function resolveDocumentInput(input: DocumentInput, options?: {
|
|
104
|
+
readonly signal?: AbortSignal;
|
|
105
|
+
}): Promise<ResolvedDocumentInput>;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/io/document-output.d.ts
|
|
108
|
+
/**
|
|
109
|
+
* The hybrid output shape every MCP tool that produces a document accepts: an optional filesystem path to write the result to. Omitting it returns the bytes inline, base64-encoded, instead.
|
|
110
|
+
*/
|
|
111
|
+
declare const DocumentOutputSchema: z.ZodObject<{
|
|
112
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
type DocumentOutput = z.infer<typeof DocumentOutputSchema>;
|
|
115
|
+
/**
|
|
116
|
+
* Above this many bytes, an inline base64 result is flagged `large: true` so a caller/LLM can see the response is sizeable before deciding whether to consume it directly. Purely advisory: `resolveDocumentOutput` never truncates or refuses to return large bytes, it only flags them -- silently truncating a document would produce a corrupt file with no indication anything was lost. 5 MB is a reasonable default order of magnitude for "an LLM context probably wants to know before this lands inline", well under typical MCP stdio transport limits.
|
|
117
|
+
*/
|
|
118
|
+
declare const LARGE_RESULT_THRESHOLD_BYTES: number;
|
|
119
|
+
interface WrittenDocumentOutput {
|
|
120
|
+
readonly path: string;
|
|
121
|
+
readonly byteLength: number;
|
|
122
|
+
}
|
|
123
|
+
interface InlineDocumentOutput {
|
|
124
|
+
readonly bytesBase64: string;
|
|
125
|
+
readonly byteLength: number;
|
|
126
|
+
readonly large?: true;
|
|
127
|
+
}
|
|
128
|
+
type ResolvedDocumentOutput = WrittenDocumentOutput | InlineDocumentOutput;
|
|
129
|
+
/**
|
|
130
|
+
* Resolves output bytes against the hybrid DocumentOutput shape: writes to `outputPath` and reports the path plus byte length when one is given, otherwise returns the bytes inline as base64 (flagged `large: true` above `LARGE_RESULT_THRESHOLD_BYTES`, never truncated or refused).
|
|
131
|
+
*/
|
|
132
|
+
declare function resolveDocumentOutput(bytes: Uint8Array<ArrayBuffer>, output: DocumentOutput): Promise<ResolvedDocumentOutput>;
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/operations/compute-formula.d.ts
|
|
135
|
+
declare const ComputeFormulaOutputSchema: z.ZodObject<{
|
|
136
|
+
sourceFormat: z.ZodEnum<{
|
|
137
|
+
docx: "docx";
|
|
138
|
+
pptx: "pptx";
|
|
139
|
+
xlsx: "xlsx";
|
|
140
|
+
odt: "odt";
|
|
141
|
+
odp: "odp";
|
|
142
|
+
ods: "ods";
|
|
143
|
+
odg: "odg";
|
|
144
|
+
svg: "svg";
|
|
145
|
+
odf: "odf";
|
|
146
|
+
csv: "csv";
|
|
147
|
+
markdown: "markdown";
|
|
148
|
+
rtf: "rtf";
|
|
149
|
+
doc: "doc";
|
|
150
|
+
xls: "xls";
|
|
151
|
+
ppt: "ppt";
|
|
152
|
+
wpd: "wpd";
|
|
153
|
+
epub: "epub";
|
|
154
|
+
pdf: "pdf";
|
|
155
|
+
}>;
|
|
156
|
+
documentKind: z.ZodEnum<{
|
|
157
|
+
wordprocessing: "wordprocessing";
|
|
158
|
+
presentation: "presentation";
|
|
159
|
+
spreadsheet: "spreadsheet";
|
|
160
|
+
drawing: "drawing";
|
|
161
|
+
formula: "formula";
|
|
162
|
+
}>;
|
|
163
|
+
formulaCount: z.ZodNumber;
|
|
164
|
+
formulas: z.ZodArray<z.ZodObject<{
|
|
165
|
+
index: z.ZodNumber;
|
|
166
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
167
|
+
locate: z.ZodString;
|
|
168
|
+
latex: z.ZodOptional<z.ZodString>;
|
|
169
|
+
outcome: z.ZodUnion<readonly [z.ZodObject<{
|
|
170
|
+
status: z.ZodLiteral<"evaluated">;
|
|
171
|
+
result: z.ZodUnion<readonly [z.ZodObject<{
|
|
172
|
+
kind: z.ZodLiteral<"quantity">;
|
|
173
|
+
magnitude: z.ZodNumber;
|
|
174
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
175
|
+
length: "length";
|
|
176
|
+
mass: "mass";
|
|
177
|
+
time: "time";
|
|
178
|
+
electricCurrent: "electricCurrent";
|
|
179
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
180
|
+
amountOfSubstance: "amountOfSubstance";
|
|
181
|
+
luminousIntensity: "luminousIntensity";
|
|
182
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
183
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
+
kind: z.ZodLiteral<"interval">;
|
|
185
|
+
min: z.ZodNumber;
|
|
186
|
+
max: z.ZodNumber;
|
|
187
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
188
|
+
length: "length";
|
|
189
|
+
mass: "mass";
|
|
190
|
+
time: "time";
|
|
191
|
+
electricCurrent: "electricCurrent";
|
|
192
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
193
|
+
amountOfSubstance: "amountOfSubstance";
|
|
194
|
+
luminousIntensity: "luminousIntensity";
|
|
195
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
196
|
+
}, z.core.$strip>]>;
|
|
197
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
198
|
+
status: z.ZodLiteral<"no-content">;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
status: z.ZodLiteral<"error">;
|
|
201
|
+
errorType: z.ZodString;
|
|
202
|
+
message: z.ZodString;
|
|
203
|
+
}, z.core.$strip>]>;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
declare const computeFormulaOperation: {
|
|
207
|
+
readonly name: string;
|
|
208
|
+
readonly title: string;
|
|
209
|
+
readonly description: string;
|
|
210
|
+
readonly inputSchema: z.ZodObject<{
|
|
211
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
212
|
+
path: z.ZodString;
|
|
213
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
214
|
+
bytesBase64: z.ZodString;
|
|
215
|
+
format: z.ZodEnum<{
|
|
216
|
+
docx: "docx";
|
|
217
|
+
pptx: "pptx";
|
|
218
|
+
xlsx: "xlsx";
|
|
219
|
+
odt: "odt";
|
|
220
|
+
odp: "odp";
|
|
221
|
+
ods: "ods";
|
|
222
|
+
odg: "odg";
|
|
223
|
+
svg: "svg";
|
|
224
|
+
odf: "odf";
|
|
225
|
+
csv: "csv";
|
|
226
|
+
markdown: "markdown";
|
|
227
|
+
rtf: "rtf";
|
|
228
|
+
doc: "doc";
|
|
229
|
+
xls: "xls";
|
|
230
|
+
ppt: "ppt";
|
|
231
|
+
wpd: "wpd";
|
|
232
|
+
epub: "epub";
|
|
233
|
+
pdf: "pdf";
|
|
234
|
+
}>;
|
|
235
|
+
}, z.core.$strip>]>;
|
|
236
|
+
bindings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
|
|
237
|
+
kind: z.ZodLiteral<"quantity">;
|
|
238
|
+
magnitude: z.ZodNumber;
|
|
239
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
240
|
+
length: "length";
|
|
241
|
+
mass: "mass";
|
|
242
|
+
time: "time";
|
|
243
|
+
electricCurrent: "electricCurrent";
|
|
244
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
245
|
+
amountOfSubstance: "amountOfSubstance";
|
|
246
|
+
luminousIntensity: "luminousIntensity";
|
|
247
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
kind: z.ZodLiteral<"interval">;
|
|
250
|
+
min: z.ZodNumber;
|
|
251
|
+
max: z.ZodNumber;
|
|
252
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
253
|
+
length: "length";
|
|
254
|
+
mass: "mass";
|
|
255
|
+
time: "time";
|
|
256
|
+
electricCurrent: "electricCurrent";
|
|
257
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
258
|
+
amountOfSubstance: "amountOfSubstance";
|
|
259
|
+
luminousIntensity: "luminousIntensity";
|
|
260
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
261
|
+
}, z.core.$strip>]>>>;
|
|
262
|
+
}, z.core.$strip>;
|
|
263
|
+
readonly outputSchema: z.ZodObject<{
|
|
264
|
+
sourceFormat: z.ZodEnum<{
|
|
265
|
+
docx: "docx";
|
|
266
|
+
pptx: "pptx";
|
|
267
|
+
xlsx: "xlsx";
|
|
268
|
+
odt: "odt";
|
|
269
|
+
odp: "odp";
|
|
270
|
+
ods: "ods";
|
|
271
|
+
odg: "odg";
|
|
272
|
+
svg: "svg";
|
|
273
|
+
odf: "odf";
|
|
274
|
+
csv: "csv";
|
|
275
|
+
markdown: "markdown";
|
|
276
|
+
rtf: "rtf";
|
|
277
|
+
doc: "doc";
|
|
278
|
+
xls: "xls";
|
|
279
|
+
ppt: "ppt";
|
|
280
|
+
wpd: "wpd";
|
|
281
|
+
epub: "epub";
|
|
282
|
+
pdf: "pdf";
|
|
283
|
+
}>;
|
|
284
|
+
documentKind: z.ZodEnum<{
|
|
285
|
+
wordprocessing: "wordprocessing";
|
|
286
|
+
presentation: "presentation";
|
|
287
|
+
spreadsheet: "spreadsheet";
|
|
288
|
+
drawing: "drawing";
|
|
289
|
+
formula: "formula";
|
|
290
|
+
}>;
|
|
291
|
+
formulaCount: z.ZodNumber;
|
|
292
|
+
formulas: z.ZodArray<z.ZodObject<{
|
|
293
|
+
index: z.ZodNumber;
|
|
294
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
295
|
+
locate: z.ZodString;
|
|
296
|
+
latex: z.ZodOptional<z.ZodString>;
|
|
297
|
+
outcome: z.ZodUnion<readonly [z.ZodObject<{
|
|
298
|
+
status: z.ZodLiteral<"evaluated">;
|
|
299
|
+
result: z.ZodUnion<readonly [z.ZodObject<{
|
|
300
|
+
kind: z.ZodLiteral<"quantity">;
|
|
301
|
+
magnitude: z.ZodNumber;
|
|
302
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
303
|
+
length: "length";
|
|
304
|
+
mass: "mass";
|
|
305
|
+
time: "time";
|
|
306
|
+
electricCurrent: "electricCurrent";
|
|
307
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
308
|
+
amountOfSubstance: "amountOfSubstance";
|
|
309
|
+
luminousIntensity: "luminousIntensity";
|
|
310
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
+
kind: z.ZodLiteral<"interval">;
|
|
313
|
+
min: z.ZodNumber;
|
|
314
|
+
max: z.ZodNumber;
|
|
315
|
+
dimension: z.ZodRecord<z.ZodEnum<{
|
|
316
|
+
length: "length";
|
|
317
|
+
mass: "mass";
|
|
318
|
+
time: "time";
|
|
319
|
+
electricCurrent: "electricCurrent";
|
|
320
|
+
thermodynamicTemperature: "thermodynamicTemperature";
|
|
321
|
+
amountOfSubstance: "amountOfSubstance";
|
|
322
|
+
luminousIntensity: "luminousIntensity";
|
|
323
|
+
}> & z.core.$partial, z.ZodNumber>;
|
|
324
|
+
}, z.core.$strip>]>;
|
|
325
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
326
|
+
status: z.ZodLiteral<"no-content">;
|
|
327
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
328
|
+
status: z.ZodLiteral<"error">;
|
|
329
|
+
errorType: z.ZodString;
|
|
330
|
+
message: z.ZodString;
|
|
331
|
+
}, z.core.$strip>]>;
|
|
332
|
+
}, z.core.$strip>>;
|
|
333
|
+
}, z.core.$strip>;
|
|
334
|
+
run(input: {
|
|
335
|
+
source: {
|
|
336
|
+
path: string;
|
|
337
|
+
} | {
|
|
338
|
+
bytesBase64: string;
|
|
339
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
340
|
+
};
|
|
341
|
+
bindings?: Record<string, {
|
|
342
|
+
kind: "quantity";
|
|
343
|
+
magnitude: number;
|
|
344
|
+
dimension: Partial<Record<"length" | "mass" | "time" | "electricCurrent" | "thermodynamicTemperature" | "amountOfSubstance" | "luminousIntensity", number>>;
|
|
345
|
+
} | {
|
|
346
|
+
kind: "interval";
|
|
347
|
+
min: number;
|
|
348
|
+
max: number;
|
|
349
|
+
dimension: Partial<Record<"length" | "mass" | "time" | "electricCurrent" | "thermodynamicTemperature" | "amountOfSubstance" | "luminousIntensity", number>>;
|
|
350
|
+
}> | undefined;
|
|
351
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
352
|
+
sourceFormat: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
353
|
+
documentKind: "wordprocessing" | "presentation" | "spreadsheet" | "drawing" | "formula";
|
|
354
|
+
formulaCount: number;
|
|
355
|
+
formulas: {
|
|
356
|
+
index: number;
|
|
357
|
+
locate: string;
|
|
358
|
+
outcome: {
|
|
359
|
+
status: "evaluated";
|
|
360
|
+
result: {
|
|
361
|
+
kind: "quantity";
|
|
362
|
+
magnitude: number;
|
|
363
|
+
dimension: Partial<Record<"length" | "mass" | "time" | "electricCurrent" | "thermodynamicTemperature" | "amountOfSubstance" | "luminousIntensity", number>>;
|
|
364
|
+
} | {
|
|
365
|
+
kind: "interval";
|
|
366
|
+
min: number;
|
|
367
|
+
max: number;
|
|
368
|
+
dimension: Partial<Record<"length" | "mass" | "time" | "electricCurrent" | "thermodynamicTemperature" | "amountOfSubstance" | "luminousIntensity", number>>;
|
|
369
|
+
};
|
|
370
|
+
} | {
|
|
371
|
+
status: "no-content";
|
|
372
|
+
} | {
|
|
373
|
+
status: "error";
|
|
374
|
+
errorType: string;
|
|
375
|
+
message: string;
|
|
376
|
+
};
|
|
377
|
+
sourcePath?: string | undefined;
|
|
378
|
+
latex?: string | undefined;
|
|
379
|
+
}[];
|
|
380
|
+
}>;
|
|
381
|
+
};
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region src/operations/convert.d.ts
|
|
384
|
+
declare const FontInputSchema: z.ZodObject<{
|
|
385
|
+
family: z.ZodString;
|
|
386
|
+
bold: z.ZodBoolean;
|
|
387
|
+
italic: z.ZodBoolean;
|
|
388
|
+
bytesBase64: z.ZodString;
|
|
389
|
+
}, z.core.$strip>;
|
|
390
|
+
declare const ConvertDocumentOutputSchema: z.ZodObject<{
|
|
391
|
+
targetFormat: z.ZodEnum<{
|
|
392
|
+
docx: "docx";
|
|
393
|
+
pptx: "pptx";
|
|
394
|
+
xlsx: "xlsx";
|
|
395
|
+
odt: "odt";
|
|
396
|
+
odp: "odp";
|
|
397
|
+
ods: "ods";
|
|
398
|
+
odg: "odg";
|
|
399
|
+
svg: "svg";
|
|
400
|
+
odf: "odf";
|
|
401
|
+
csv: "csv";
|
|
402
|
+
markdown: "markdown";
|
|
403
|
+
rtf: "rtf";
|
|
404
|
+
doc: "doc";
|
|
405
|
+
xls: "xls";
|
|
406
|
+
ppt: "ppt";
|
|
407
|
+
wpd: "wpd";
|
|
408
|
+
epub: "epub";
|
|
409
|
+
pdf: "pdf";
|
|
410
|
+
}>;
|
|
411
|
+
output: z.ZodUnion<readonly [z.ZodObject<{
|
|
412
|
+
path: z.ZodString;
|
|
413
|
+
byteLength: z.ZodNumber;
|
|
414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
+
bytesBase64: z.ZodString;
|
|
416
|
+
byteLength: z.ZodNumber;
|
|
417
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
418
|
+
}, z.core.$strip>]>;
|
|
419
|
+
diagnostics: z.ZodArray<z.ZodObject<{
|
|
420
|
+
severity: z.ZodEnum<{
|
|
421
|
+
warning: "warning";
|
|
422
|
+
info: "info";
|
|
423
|
+
}>;
|
|
424
|
+
code: z.ZodString;
|
|
425
|
+
message: z.ZodString;
|
|
426
|
+
pageIndex: z.ZodOptional<z.ZodNumber>;
|
|
427
|
+
}, z.core.$strip>>;
|
|
428
|
+
fontSubstitutions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
429
|
+
requestedFamily: z.ZodString;
|
|
430
|
+
requestedBold: z.ZodBoolean;
|
|
431
|
+
requestedItalic: z.ZodBoolean;
|
|
432
|
+
reason: z.ZodEnum<{
|
|
433
|
+
"missing-face": "missing-face";
|
|
434
|
+
"vendored-substitute": "vendored-substitute";
|
|
435
|
+
}>;
|
|
436
|
+
resolvedFamily: z.ZodString;
|
|
437
|
+
}, z.core.$strip>>>;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
declare const ListDocumentConversionsOutputSchema: z.ZodObject<{
|
|
440
|
+
conversions: z.ZodArray<z.ZodObject<{
|
|
441
|
+
source: z.ZodEnum<{
|
|
442
|
+
docx: "docx";
|
|
443
|
+
pptx: "pptx";
|
|
444
|
+
xlsx: "xlsx";
|
|
445
|
+
odt: "odt";
|
|
446
|
+
odp: "odp";
|
|
447
|
+
ods: "ods";
|
|
448
|
+
odg: "odg";
|
|
449
|
+
svg: "svg";
|
|
450
|
+
odf: "odf";
|
|
451
|
+
csv: "csv";
|
|
452
|
+
markdown: "markdown";
|
|
453
|
+
rtf: "rtf";
|
|
454
|
+
doc: "doc";
|
|
455
|
+
xls: "xls";
|
|
456
|
+
ppt: "ppt";
|
|
457
|
+
wpd: "wpd";
|
|
458
|
+
epub: "epub";
|
|
459
|
+
pdf: "pdf";
|
|
460
|
+
}>;
|
|
461
|
+
target: z.ZodEnum<{
|
|
462
|
+
docx: "docx";
|
|
463
|
+
pptx: "pptx";
|
|
464
|
+
xlsx: "xlsx";
|
|
465
|
+
odt: "odt";
|
|
466
|
+
odp: "odp";
|
|
467
|
+
ods: "ods";
|
|
468
|
+
odg: "odg";
|
|
469
|
+
svg: "svg";
|
|
470
|
+
odf: "odf";
|
|
471
|
+
csv: "csv";
|
|
472
|
+
markdown: "markdown";
|
|
473
|
+
rtf: "rtf";
|
|
474
|
+
doc: "doc";
|
|
475
|
+
xls: "xls";
|
|
476
|
+
ppt: "ppt";
|
|
477
|
+
wpd: "wpd";
|
|
478
|
+
epub: "epub";
|
|
479
|
+
pdf: "pdf";
|
|
480
|
+
}>;
|
|
481
|
+
}, z.core.$strip>>;
|
|
482
|
+
}, z.core.$strip>;
|
|
483
|
+
declare const convertDocumentOperation: {
|
|
484
|
+
readonly name: string;
|
|
485
|
+
readonly title: string;
|
|
486
|
+
readonly description: string;
|
|
487
|
+
readonly inputSchema: z.ZodObject<{
|
|
488
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
489
|
+
path: z.ZodString;
|
|
490
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
491
|
+
bytesBase64: z.ZodString;
|
|
492
|
+
format: z.ZodEnum<{
|
|
493
|
+
docx: "docx";
|
|
494
|
+
pptx: "pptx";
|
|
495
|
+
xlsx: "xlsx";
|
|
496
|
+
odt: "odt";
|
|
497
|
+
odp: "odp";
|
|
498
|
+
ods: "ods";
|
|
499
|
+
odg: "odg";
|
|
500
|
+
svg: "svg";
|
|
501
|
+
odf: "odf";
|
|
502
|
+
csv: "csv";
|
|
503
|
+
markdown: "markdown";
|
|
504
|
+
rtf: "rtf";
|
|
505
|
+
doc: "doc";
|
|
506
|
+
xls: "xls";
|
|
507
|
+
ppt: "ppt";
|
|
508
|
+
wpd: "wpd";
|
|
509
|
+
epub: "epub";
|
|
510
|
+
pdf: "pdf";
|
|
511
|
+
}>;
|
|
512
|
+
}, z.core.$strip>]>;
|
|
513
|
+
targetFormat: z.ZodEnum<{
|
|
514
|
+
docx: "docx";
|
|
515
|
+
pptx: "pptx";
|
|
516
|
+
xlsx: "xlsx";
|
|
517
|
+
odt: "odt";
|
|
518
|
+
odp: "odp";
|
|
519
|
+
ods: "ods";
|
|
520
|
+
odg: "odg";
|
|
521
|
+
svg: "svg";
|
|
522
|
+
odf: "odf";
|
|
523
|
+
csv: "csv";
|
|
524
|
+
markdown: "markdown";
|
|
525
|
+
rtf: "rtf";
|
|
526
|
+
doc: "doc";
|
|
527
|
+
xls: "xls";
|
|
528
|
+
ppt: "ppt";
|
|
529
|
+
wpd: "wpd";
|
|
530
|
+
epub: "epub";
|
|
531
|
+
pdf: "pdf";
|
|
532
|
+
}>;
|
|
533
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
534
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
535
|
+
}, z.core.$strip>>;
|
|
536
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
537
|
+
family: z.ZodString;
|
|
538
|
+
bold: z.ZodBoolean;
|
|
539
|
+
italic: z.ZodBoolean;
|
|
540
|
+
bytesBase64: z.ZodString;
|
|
541
|
+
}, z.core.$strip>>>;
|
|
542
|
+
onSubstitutionDiagnostics: z.ZodOptional<z.ZodBoolean>;
|
|
543
|
+
images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
544
|
+
}, z.core.$strip>;
|
|
545
|
+
readonly outputSchema: z.ZodObject<{
|
|
546
|
+
targetFormat: z.ZodEnum<{
|
|
547
|
+
docx: "docx";
|
|
548
|
+
pptx: "pptx";
|
|
549
|
+
xlsx: "xlsx";
|
|
550
|
+
odt: "odt";
|
|
551
|
+
odp: "odp";
|
|
552
|
+
ods: "ods";
|
|
553
|
+
odg: "odg";
|
|
554
|
+
svg: "svg";
|
|
555
|
+
odf: "odf";
|
|
556
|
+
csv: "csv";
|
|
557
|
+
markdown: "markdown";
|
|
558
|
+
rtf: "rtf";
|
|
559
|
+
doc: "doc";
|
|
560
|
+
xls: "xls";
|
|
561
|
+
ppt: "ppt";
|
|
562
|
+
wpd: "wpd";
|
|
563
|
+
epub: "epub";
|
|
564
|
+
pdf: "pdf";
|
|
565
|
+
}>;
|
|
566
|
+
output: z.ZodUnion<readonly [z.ZodObject<{
|
|
567
|
+
path: z.ZodString;
|
|
568
|
+
byteLength: z.ZodNumber;
|
|
569
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
570
|
+
bytesBase64: z.ZodString;
|
|
571
|
+
byteLength: z.ZodNumber;
|
|
572
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
573
|
+
}, z.core.$strip>]>;
|
|
574
|
+
diagnostics: z.ZodArray<z.ZodObject<{
|
|
575
|
+
severity: z.ZodEnum<{
|
|
576
|
+
warning: "warning";
|
|
577
|
+
info: "info";
|
|
578
|
+
}>;
|
|
579
|
+
code: z.ZodString;
|
|
580
|
+
message: z.ZodString;
|
|
581
|
+
pageIndex: z.ZodOptional<z.ZodNumber>;
|
|
582
|
+
}, z.core.$strip>>;
|
|
583
|
+
fontSubstitutions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
584
|
+
requestedFamily: z.ZodString;
|
|
585
|
+
requestedBold: z.ZodBoolean;
|
|
586
|
+
requestedItalic: z.ZodBoolean;
|
|
587
|
+
reason: z.ZodEnum<{
|
|
588
|
+
"missing-face": "missing-face";
|
|
589
|
+
"vendored-substitute": "vendored-substitute";
|
|
590
|
+
}>;
|
|
591
|
+
resolvedFamily: z.ZodString;
|
|
592
|
+
}, z.core.$strip>>>;
|
|
593
|
+
}, z.core.$strip>;
|
|
594
|
+
run(input: {
|
|
595
|
+
source: {
|
|
596
|
+
path: string;
|
|
597
|
+
} | {
|
|
598
|
+
bytesBase64: string;
|
|
599
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
600
|
+
};
|
|
601
|
+
targetFormat: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
602
|
+
output?: {
|
|
603
|
+
outputPath?: string | undefined;
|
|
604
|
+
} | undefined;
|
|
605
|
+
fonts?: {
|
|
606
|
+
family: string;
|
|
607
|
+
bold: boolean;
|
|
608
|
+
italic: boolean;
|
|
609
|
+
bytesBase64: string;
|
|
610
|
+
}[] | undefined;
|
|
611
|
+
onSubstitutionDiagnostics?: boolean | undefined;
|
|
612
|
+
images?: Record<string, string> | undefined;
|
|
613
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
614
|
+
targetFormat: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
615
|
+
output: {
|
|
616
|
+
path: string;
|
|
617
|
+
byteLength: number;
|
|
618
|
+
} | {
|
|
619
|
+
bytesBase64: string;
|
|
620
|
+
byteLength: number;
|
|
621
|
+
large?: true | undefined;
|
|
622
|
+
};
|
|
623
|
+
diagnostics: {
|
|
624
|
+
severity: "warning" | "info";
|
|
625
|
+
code: string;
|
|
626
|
+
message: string;
|
|
627
|
+
pageIndex?: number | undefined;
|
|
628
|
+
}[];
|
|
629
|
+
fontSubstitutions?: {
|
|
630
|
+
requestedFamily: string;
|
|
631
|
+
requestedBold: boolean;
|
|
632
|
+
requestedItalic: boolean;
|
|
633
|
+
reason: "missing-face" | "vendored-substitute";
|
|
634
|
+
resolvedFamily: string;
|
|
635
|
+
}[] | undefined;
|
|
636
|
+
}>;
|
|
637
|
+
};
|
|
638
|
+
declare const listDocumentConversionsOperation: {
|
|
639
|
+
readonly name: string;
|
|
640
|
+
readonly title: string;
|
|
641
|
+
readonly description: string;
|
|
642
|
+
readonly inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
643
|
+
readonly outputSchema: z.ZodObject<{
|
|
644
|
+
conversions: z.ZodArray<z.ZodObject<{
|
|
645
|
+
source: z.ZodEnum<{
|
|
646
|
+
docx: "docx";
|
|
647
|
+
pptx: "pptx";
|
|
648
|
+
xlsx: "xlsx";
|
|
649
|
+
odt: "odt";
|
|
650
|
+
odp: "odp";
|
|
651
|
+
ods: "ods";
|
|
652
|
+
odg: "odg";
|
|
653
|
+
svg: "svg";
|
|
654
|
+
odf: "odf";
|
|
655
|
+
csv: "csv";
|
|
656
|
+
markdown: "markdown";
|
|
657
|
+
rtf: "rtf";
|
|
658
|
+
doc: "doc";
|
|
659
|
+
xls: "xls";
|
|
660
|
+
ppt: "ppt";
|
|
661
|
+
wpd: "wpd";
|
|
662
|
+
epub: "epub";
|
|
663
|
+
pdf: "pdf";
|
|
664
|
+
}>;
|
|
665
|
+
target: z.ZodEnum<{
|
|
666
|
+
docx: "docx";
|
|
667
|
+
pptx: "pptx";
|
|
668
|
+
xlsx: "xlsx";
|
|
669
|
+
odt: "odt";
|
|
670
|
+
odp: "odp";
|
|
671
|
+
ods: "ods";
|
|
672
|
+
odg: "odg";
|
|
673
|
+
svg: "svg";
|
|
674
|
+
odf: "odf";
|
|
675
|
+
csv: "csv";
|
|
676
|
+
markdown: "markdown";
|
|
677
|
+
rtf: "rtf";
|
|
678
|
+
doc: "doc";
|
|
679
|
+
xls: "xls";
|
|
680
|
+
ppt: "ppt";
|
|
681
|
+
wpd: "wpd";
|
|
682
|
+
epub: "epub";
|
|
683
|
+
pdf: "pdf";
|
|
684
|
+
}>;
|
|
685
|
+
}, z.core.$strip>>;
|
|
686
|
+
}, z.core.$strip>;
|
|
687
|
+
run(input: Record<string, never>, context?: DocumentOperationContext): Promise<{
|
|
688
|
+
conversions: {
|
|
689
|
+
source: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
690
|
+
target: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
691
|
+
}[];
|
|
692
|
+
}>;
|
|
693
|
+
};
|
|
694
|
+
//#endregion
|
|
695
|
+
//#region src/operations/docx-extras.d.ts
|
|
696
|
+
declare const docxExtrasOperation: {
|
|
697
|
+
readonly name: string;
|
|
698
|
+
readonly title: string;
|
|
699
|
+
readonly description: string;
|
|
700
|
+
readonly inputSchema: z.ZodObject<{
|
|
701
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
702
|
+
path: z.ZodString;
|
|
703
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
704
|
+
bytesBase64: z.ZodString;
|
|
705
|
+
format: z.ZodEnum<{
|
|
706
|
+
docx: "docx";
|
|
707
|
+
pptx: "pptx";
|
|
708
|
+
xlsx: "xlsx";
|
|
709
|
+
odt: "odt";
|
|
710
|
+
odp: "odp";
|
|
711
|
+
ods: "ods";
|
|
712
|
+
odg: "odg";
|
|
713
|
+
svg: "svg";
|
|
714
|
+
odf: "odf";
|
|
715
|
+
csv: "csv";
|
|
716
|
+
markdown: "markdown";
|
|
717
|
+
rtf: "rtf";
|
|
718
|
+
doc: "doc";
|
|
719
|
+
xls: "xls";
|
|
720
|
+
ppt: "ppt";
|
|
721
|
+
wpd: "wpd";
|
|
722
|
+
epub: "epub";
|
|
723
|
+
pdf: "pdf";
|
|
724
|
+
}>;
|
|
725
|
+
}, z.core.$strip>]>;
|
|
726
|
+
}, z.core.$strip>;
|
|
727
|
+
run(input: {
|
|
728
|
+
source: {
|
|
729
|
+
path: string;
|
|
730
|
+
} | {
|
|
731
|
+
bytesBase64: string;
|
|
732
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
733
|
+
};
|
|
734
|
+
}, context?: DocumentOperationContext): Promise<import("documents.js").DocxExtras>;
|
|
735
|
+
};
|
|
736
|
+
//#endregion
|
|
737
|
+
//#region src/operations/editor.d.ts
|
|
738
|
+
declare const documentCreateOperation: {
|
|
739
|
+
readonly name: string;
|
|
740
|
+
readonly title: string;
|
|
741
|
+
readonly description: string;
|
|
742
|
+
readonly inputSchema: z.ZodObject<{
|
|
743
|
+
format: z.ZodEnum<{
|
|
744
|
+
docx: "docx";
|
|
745
|
+
pptx: "pptx";
|
|
746
|
+
odt: "odt";
|
|
747
|
+
odp: "odp";
|
|
748
|
+
ods: "ods";
|
|
749
|
+
odg: "odg";
|
|
750
|
+
pdf: "pdf";
|
|
751
|
+
markdown: "markdown";
|
|
752
|
+
}>;
|
|
753
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
754
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
755
|
+
}, z.core.$strip>>;
|
|
756
|
+
}, z.core.$strip>;
|
|
757
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
758
|
+
path: z.ZodString;
|
|
759
|
+
byteLength: z.ZodNumber;
|
|
760
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
761
|
+
bytesBase64: z.ZodString;
|
|
762
|
+
byteLength: z.ZodNumber;
|
|
763
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
764
|
+
}, z.core.$strip>]>;
|
|
765
|
+
run(input: {
|
|
766
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown";
|
|
767
|
+
output?: {
|
|
768
|
+
outputPath?: string | undefined;
|
|
769
|
+
} | undefined;
|
|
770
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
771
|
+
path: string;
|
|
772
|
+
byteLength: number;
|
|
773
|
+
} | {
|
|
774
|
+
bytesBase64: string;
|
|
775
|
+
byteLength: number;
|
|
776
|
+
large?: true | undefined;
|
|
777
|
+
}>;
|
|
778
|
+
};
|
|
779
|
+
declare const documentAppendParagraphsOperation: {
|
|
780
|
+
readonly name: string;
|
|
781
|
+
readonly title: string;
|
|
782
|
+
readonly description: string;
|
|
783
|
+
readonly inputSchema: z.ZodObject<{
|
|
784
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
785
|
+
path: z.ZodString;
|
|
786
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
787
|
+
bytesBase64: z.ZodString;
|
|
788
|
+
format: z.ZodEnum<{
|
|
789
|
+
docx: "docx";
|
|
790
|
+
pptx: "pptx";
|
|
791
|
+
xlsx: "xlsx";
|
|
792
|
+
odt: "odt";
|
|
793
|
+
odp: "odp";
|
|
794
|
+
ods: "ods";
|
|
795
|
+
odg: "odg";
|
|
796
|
+
svg: "svg";
|
|
797
|
+
odf: "odf";
|
|
798
|
+
csv: "csv";
|
|
799
|
+
markdown: "markdown";
|
|
800
|
+
rtf: "rtf";
|
|
801
|
+
doc: "doc";
|
|
802
|
+
xls: "xls";
|
|
803
|
+
ppt: "ppt";
|
|
804
|
+
wpd: "wpd";
|
|
805
|
+
epub: "epub";
|
|
806
|
+
pdf: "pdf";
|
|
807
|
+
}>;
|
|
808
|
+
}, z.core.$strip>]>;
|
|
809
|
+
targetFormat: z.ZodEnum<{
|
|
810
|
+
docx: "docx";
|
|
811
|
+
odt: "odt";
|
|
812
|
+
markdown: "markdown";
|
|
813
|
+
}>;
|
|
814
|
+
paragraphs: z.ZodArray<z.ZodObject<{
|
|
815
|
+
text: z.ZodOptional<z.ZodString>;
|
|
816
|
+
styleId: z.ZodOptional<z.ZodString>;
|
|
817
|
+
headingLevel: z.ZodOptional<z.ZodNumber>;
|
|
818
|
+
alignment: z.ZodOptional<z.ZodEnum<{
|
|
819
|
+
left: "left";
|
|
820
|
+
center: "center";
|
|
821
|
+
right: "right";
|
|
822
|
+
justify: "justify";
|
|
823
|
+
}>>;
|
|
824
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
825
|
+
text: z.ZodOptional<z.ZodString>;
|
|
826
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
827
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
828
|
+
strike: z.ZodOptional<z.ZodBoolean>;
|
|
829
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
830
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
831
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
832
|
+
colorHex: z.ZodOptional<z.ZodString>;
|
|
833
|
+
hyperlink: z.ZodOptional<z.ZodString>;
|
|
834
|
+
code: z.ZodOptional<z.ZodBoolean>;
|
|
835
|
+
}, z.core.$strip>>>;
|
|
836
|
+
}, z.core.$strip>>;
|
|
837
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
838
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
839
|
+
}, z.core.$strip>>;
|
|
840
|
+
}, z.core.$strip>;
|
|
841
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
842
|
+
path: z.ZodString;
|
|
843
|
+
byteLength: z.ZodNumber;
|
|
844
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
845
|
+
bytesBase64: z.ZodString;
|
|
846
|
+
byteLength: z.ZodNumber;
|
|
847
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
848
|
+
}, z.core.$strip>]>;
|
|
849
|
+
run(input: {
|
|
850
|
+
source: {
|
|
851
|
+
path: string;
|
|
852
|
+
} | {
|
|
853
|
+
bytesBase64: string;
|
|
854
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
855
|
+
};
|
|
856
|
+
targetFormat: "docx" | "odt" | "markdown";
|
|
857
|
+
paragraphs: {
|
|
858
|
+
text?: string | undefined;
|
|
859
|
+
styleId?: string | undefined;
|
|
860
|
+
headingLevel?: number | undefined;
|
|
861
|
+
alignment?: "left" | "center" | "right" | "justify" | undefined;
|
|
862
|
+
runs?: {
|
|
863
|
+
text?: string | undefined;
|
|
864
|
+
bold?: boolean | undefined;
|
|
865
|
+
italic?: boolean | undefined;
|
|
866
|
+
strike?: boolean | undefined;
|
|
867
|
+
underline?: boolean | undefined;
|
|
868
|
+
fontFamily?: string | undefined;
|
|
869
|
+
sizePt?: number | undefined;
|
|
870
|
+
colorHex?: string | undefined;
|
|
871
|
+
hyperlink?: string | undefined;
|
|
872
|
+
code?: boolean | undefined;
|
|
873
|
+
}[] | undefined;
|
|
874
|
+
}[];
|
|
875
|
+
output?: {
|
|
876
|
+
outputPath?: string | undefined;
|
|
877
|
+
} | undefined;
|
|
878
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
879
|
+
path: string;
|
|
880
|
+
byteLength: number;
|
|
881
|
+
} | {
|
|
882
|
+
bytesBase64: string;
|
|
883
|
+
byteLength: number;
|
|
884
|
+
large?: true | undefined;
|
|
885
|
+
}>;
|
|
886
|
+
};
|
|
887
|
+
//#endregion
|
|
888
|
+
//#region src/operations/fonts.d.ts
|
|
889
|
+
declare const fontsOperation: {
|
|
890
|
+
readonly name: string;
|
|
891
|
+
readonly title: string;
|
|
892
|
+
readonly description: string;
|
|
893
|
+
readonly inputSchema: z.ZodObject<{
|
|
894
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
895
|
+
path: z.ZodString;
|
|
896
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
897
|
+
bytesBase64: z.ZodString;
|
|
898
|
+
format: z.ZodEnum<{
|
|
899
|
+
docx: "docx";
|
|
900
|
+
pptx: "pptx";
|
|
901
|
+
xlsx: "xlsx";
|
|
902
|
+
odt: "odt";
|
|
903
|
+
odp: "odp";
|
|
904
|
+
ods: "ods";
|
|
905
|
+
odg: "odg";
|
|
906
|
+
svg: "svg";
|
|
907
|
+
odf: "odf";
|
|
908
|
+
csv: "csv";
|
|
909
|
+
markdown: "markdown";
|
|
910
|
+
rtf: "rtf";
|
|
911
|
+
doc: "doc";
|
|
912
|
+
xls: "xls";
|
|
913
|
+
ppt: "ppt";
|
|
914
|
+
wpd: "wpd";
|
|
915
|
+
epub: "epub";
|
|
916
|
+
pdf: "pdf";
|
|
917
|
+
}>;
|
|
918
|
+
}, z.core.$strip>]>;
|
|
919
|
+
}, z.core.$strip>;
|
|
920
|
+
readonly outputSchema: z.ZodObject<{
|
|
921
|
+
faces: z.ZodArray<z.ZodObject<{
|
|
922
|
+
family: z.ZodString;
|
|
923
|
+
bold: z.ZodBoolean;
|
|
924
|
+
italic: z.ZodBoolean;
|
|
925
|
+
byteLength: z.ZodNumber;
|
|
926
|
+
}, z.core.$strip>>;
|
|
927
|
+
}, z.core.$strip>;
|
|
928
|
+
run(input: {
|
|
929
|
+
source: {
|
|
930
|
+
path: string;
|
|
931
|
+
} | {
|
|
932
|
+
bytesBase64: string;
|
|
933
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
934
|
+
};
|
|
935
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
936
|
+
faces: {
|
|
937
|
+
family: string;
|
|
938
|
+
bold: boolean;
|
|
939
|
+
italic: boolean;
|
|
940
|
+
byteLength: number;
|
|
941
|
+
}[];
|
|
942
|
+
}>;
|
|
943
|
+
};
|
|
944
|
+
declare const describeFontFileOperation: {
|
|
945
|
+
readonly name: string;
|
|
946
|
+
readonly title: string;
|
|
947
|
+
readonly description: string;
|
|
948
|
+
readonly inputSchema: z.ZodObject<{
|
|
949
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
950
|
+
path: z.ZodString;
|
|
951
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
952
|
+
bytesBase64: z.ZodString;
|
|
953
|
+
}, z.core.$strip>]>;
|
|
954
|
+
}, z.core.$strip>;
|
|
955
|
+
readonly outputSchema: z.ZodObject<{
|
|
956
|
+
family: z.ZodString;
|
|
957
|
+
bold: z.ZodBoolean;
|
|
958
|
+
italic: z.ZodBoolean;
|
|
959
|
+
}, z.core.$strip>;
|
|
960
|
+
run(input: {
|
|
961
|
+
source: {
|
|
962
|
+
path: string;
|
|
963
|
+
} | {
|
|
964
|
+
bytesBase64: string;
|
|
965
|
+
};
|
|
966
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
967
|
+
family: string;
|
|
968
|
+
bold: boolean;
|
|
969
|
+
italic: boolean;
|
|
970
|
+
}>;
|
|
971
|
+
};
|
|
972
|
+
//#endregion
|
|
973
|
+
//#region src/operations/from-package.d.ts
|
|
974
|
+
declare const fromPackageOperation: {
|
|
975
|
+
readonly name: string;
|
|
976
|
+
readonly title: string;
|
|
977
|
+
readonly description: string;
|
|
978
|
+
readonly inputSchema: z.ZodObject<{
|
|
979
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
980
|
+
path: z.ZodString;
|
|
981
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
982
|
+
bytesBase64: z.ZodString;
|
|
983
|
+
format: z.ZodEnum<{
|
|
984
|
+
docx: "docx";
|
|
985
|
+
pptx: "pptx";
|
|
986
|
+
xlsx: "xlsx";
|
|
987
|
+
odt: "odt";
|
|
988
|
+
odp: "odp";
|
|
989
|
+
ods: "ods";
|
|
990
|
+
odg: "odg";
|
|
991
|
+
svg: "svg";
|
|
992
|
+
odf: "odf";
|
|
993
|
+
csv: "csv";
|
|
994
|
+
markdown: "markdown";
|
|
995
|
+
rtf: "rtf";
|
|
996
|
+
doc: "doc";
|
|
997
|
+
xls: "xls";
|
|
998
|
+
ppt: "ppt";
|
|
999
|
+
wpd: "wpd";
|
|
1000
|
+
epub: "epub";
|
|
1001
|
+
pdf: "pdf";
|
|
1002
|
+
}>;
|
|
1003
|
+
}, z.core.$strip>]>;
|
|
1004
|
+
targetFormat: z.ZodEnum<{
|
|
1005
|
+
docx: "docx";
|
|
1006
|
+
pptx: "pptx";
|
|
1007
|
+
xlsx: "xlsx";
|
|
1008
|
+
odt: "odt";
|
|
1009
|
+
odp: "odp";
|
|
1010
|
+
ods: "ods";
|
|
1011
|
+
odg: "odg";
|
|
1012
|
+
svg: "svg";
|
|
1013
|
+
odf: "odf";
|
|
1014
|
+
csv: "csv";
|
|
1015
|
+
markdown: "markdown";
|
|
1016
|
+
rtf: "rtf";
|
|
1017
|
+
doc: "doc";
|
|
1018
|
+
xls: "xls";
|
|
1019
|
+
ppt: "ppt";
|
|
1020
|
+
wpd: "wpd";
|
|
1021
|
+
epub: "epub";
|
|
1022
|
+
pdf: "pdf";
|
|
1023
|
+
}>;
|
|
1024
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
1025
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
1026
|
+
}, z.core.$strip>>;
|
|
1027
|
+
}, z.core.$strip>;
|
|
1028
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1029
|
+
path: z.ZodString;
|
|
1030
|
+
byteLength: z.ZodNumber;
|
|
1031
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1032
|
+
bytesBase64: z.ZodString;
|
|
1033
|
+
byteLength: z.ZodNumber;
|
|
1034
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1035
|
+
}, z.core.$strip>]>;
|
|
1036
|
+
run(input: {
|
|
1037
|
+
source: {
|
|
1038
|
+
path: string;
|
|
1039
|
+
} | {
|
|
1040
|
+
bytesBase64: string;
|
|
1041
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1042
|
+
};
|
|
1043
|
+
targetFormat: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1044
|
+
output?: {
|
|
1045
|
+
outputPath?: string | undefined;
|
|
1046
|
+
} | undefined;
|
|
1047
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
1048
|
+
path: string;
|
|
1049
|
+
byteLength: number;
|
|
1050
|
+
} | {
|
|
1051
|
+
bytesBase64: string;
|
|
1052
|
+
byteLength: number;
|
|
1053
|
+
large?: true | undefined;
|
|
1054
|
+
}>;
|
|
1055
|
+
};
|
|
1056
|
+
//#endregion
|
|
1057
|
+
//#region src/operations/metadata.d.ts
|
|
1058
|
+
declare const metadataReadOperation: {
|
|
1059
|
+
readonly name: string;
|
|
1060
|
+
readonly title: string;
|
|
1061
|
+
readonly description: string;
|
|
1062
|
+
readonly inputSchema: z.ZodObject<{
|
|
1063
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1064
|
+
path: z.ZodString;
|
|
1065
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1066
|
+
bytesBase64: z.ZodString;
|
|
1067
|
+
format: z.ZodEnum<{
|
|
1068
|
+
docx: "docx";
|
|
1069
|
+
pptx: "pptx";
|
|
1070
|
+
xlsx: "xlsx";
|
|
1071
|
+
odt: "odt";
|
|
1072
|
+
odp: "odp";
|
|
1073
|
+
ods: "ods";
|
|
1074
|
+
odg: "odg";
|
|
1075
|
+
svg: "svg";
|
|
1076
|
+
odf: "odf";
|
|
1077
|
+
csv: "csv";
|
|
1078
|
+
markdown: "markdown";
|
|
1079
|
+
rtf: "rtf";
|
|
1080
|
+
doc: "doc";
|
|
1081
|
+
xls: "xls";
|
|
1082
|
+
ppt: "ppt";
|
|
1083
|
+
wpd: "wpd";
|
|
1084
|
+
epub: "epub";
|
|
1085
|
+
pdf: "pdf";
|
|
1086
|
+
}>;
|
|
1087
|
+
}, z.core.$strip>]>;
|
|
1088
|
+
}, z.core.$strip>;
|
|
1089
|
+
run(input: {
|
|
1090
|
+
source: {
|
|
1091
|
+
path: string;
|
|
1092
|
+
} | {
|
|
1093
|
+
bytesBase64: string;
|
|
1094
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1095
|
+
};
|
|
1096
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
1097
|
+
title?: string | undefined;
|
|
1098
|
+
author?: string | undefined;
|
|
1099
|
+
subject?: string | undefined;
|
|
1100
|
+
keywords?: string[] | undefined;
|
|
1101
|
+
creator?: string | undefined;
|
|
1102
|
+
producer?: string | undefined;
|
|
1103
|
+
createdIso?: string | undefined;
|
|
1104
|
+
modifiedIso?: string | undefined;
|
|
1105
|
+
lastPrintedIso?: string | undefined;
|
|
1106
|
+
language?: string | undefined;
|
|
1107
|
+
direction?: "ltr" | "rtl" | undefined;
|
|
1108
|
+
publisher?: string | undefined;
|
|
1109
|
+
contributor?: string | undefined;
|
|
1110
|
+
rights?: string | undefined;
|
|
1111
|
+
identifier?: string | undefined;
|
|
1112
|
+
comments?: string | undefined;
|
|
1113
|
+
company?: string | undefined;
|
|
1114
|
+
manager?: string | undefined;
|
|
1115
|
+
}>;
|
|
1116
|
+
};
|
|
1117
|
+
declare const metadataWriteOperation: {
|
|
1118
|
+
readonly name: string;
|
|
1119
|
+
readonly title: string;
|
|
1120
|
+
readonly description: string;
|
|
1121
|
+
readonly inputSchema: z.ZodObject<{
|
|
1122
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1123
|
+
path: z.ZodString;
|
|
1124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1125
|
+
bytesBase64: z.ZodString;
|
|
1126
|
+
format: z.ZodEnum<{
|
|
1127
|
+
docx: "docx";
|
|
1128
|
+
pptx: "pptx";
|
|
1129
|
+
xlsx: "xlsx";
|
|
1130
|
+
odt: "odt";
|
|
1131
|
+
odp: "odp";
|
|
1132
|
+
ods: "ods";
|
|
1133
|
+
odg: "odg";
|
|
1134
|
+
svg: "svg";
|
|
1135
|
+
odf: "odf";
|
|
1136
|
+
csv: "csv";
|
|
1137
|
+
markdown: "markdown";
|
|
1138
|
+
rtf: "rtf";
|
|
1139
|
+
doc: "doc";
|
|
1140
|
+
xls: "xls";
|
|
1141
|
+
ppt: "ppt";
|
|
1142
|
+
wpd: "wpd";
|
|
1143
|
+
epub: "epub";
|
|
1144
|
+
pdf: "pdf";
|
|
1145
|
+
}>;
|
|
1146
|
+
}, z.core.$strip>]>;
|
|
1147
|
+
targetFormat: z.ZodEnum<{
|
|
1148
|
+
docx: "docx";
|
|
1149
|
+
pptx: "pptx";
|
|
1150
|
+
xlsx: "xlsx";
|
|
1151
|
+
odt: "odt";
|
|
1152
|
+
odp: "odp";
|
|
1153
|
+
ods: "ods";
|
|
1154
|
+
odg: "odg";
|
|
1155
|
+
svg: "svg";
|
|
1156
|
+
odf: "odf";
|
|
1157
|
+
csv: "csv";
|
|
1158
|
+
markdown: "markdown";
|
|
1159
|
+
rtf: "rtf";
|
|
1160
|
+
doc: "doc";
|
|
1161
|
+
xls: "xls";
|
|
1162
|
+
ppt: "ppt";
|
|
1163
|
+
wpd: "wpd";
|
|
1164
|
+
epub: "epub";
|
|
1165
|
+
pdf: "pdf";
|
|
1166
|
+
}>;
|
|
1167
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
1168
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
1169
|
+
}, z.core.$strip>>;
|
|
1170
|
+
setTitle: z.ZodOptional<z.ZodString>;
|
|
1171
|
+
setAuthor: z.ZodOptional<z.ZodString>;
|
|
1172
|
+
setSubject: z.ZodOptional<z.ZodString>;
|
|
1173
|
+
setKeywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1174
|
+
}, z.core.$strip>;
|
|
1175
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1176
|
+
path: z.ZodString;
|
|
1177
|
+
byteLength: z.ZodNumber;
|
|
1178
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1179
|
+
bytesBase64: z.ZodString;
|
|
1180
|
+
byteLength: z.ZodNumber;
|
|
1181
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1182
|
+
}, z.core.$strip>]>;
|
|
1183
|
+
run(input: {
|
|
1184
|
+
source: {
|
|
1185
|
+
path: string;
|
|
1186
|
+
} | {
|
|
1187
|
+
bytesBase64: string;
|
|
1188
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1189
|
+
};
|
|
1190
|
+
targetFormat: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1191
|
+
output?: {
|
|
1192
|
+
outputPath?: string | undefined;
|
|
1193
|
+
} | undefined;
|
|
1194
|
+
setTitle?: string | undefined;
|
|
1195
|
+
setAuthor?: string | undefined;
|
|
1196
|
+
setSubject?: string | undefined;
|
|
1197
|
+
setKeywords?: string[] | undefined;
|
|
1198
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
1199
|
+
path: string;
|
|
1200
|
+
byteLength: number;
|
|
1201
|
+
} | {
|
|
1202
|
+
bytesBase64: string;
|
|
1203
|
+
byteLength: number;
|
|
1204
|
+
large?: true | undefined;
|
|
1205
|
+
}>;
|
|
1206
|
+
};
|
|
1207
|
+
//#endregion
|
|
1208
|
+
//#region ../odf.js/dist/read-BcxAWBB5.d.ts
|
|
1209
|
+
interface OdtDocument {
|
|
1210
|
+
metadata: LayoutMetadata;
|
|
1211
|
+
sections: ContentSection[];
|
|
1212
|
+
definitions?: DefinitionsTable;
|
|
1213
|
+
headerFooterParts?: OdtHeaderFooterPart[];
|
|
1214
|
+
sectionMasterPages?: (string | undefined)[];
|
|
1215
|
+
source?: Record<string, SourceResidue>;
|
|
1216
|
+
}
|
|
1217
|
+
type OdtHeaderFooterVariant = "default" | "left" | "first";
|
|
1218
|
+
interface OdtHeaderFooterPart {
|
|
1219
|
+
readonly masterPage: string;
|
|
1220
|
+
readonly kind: "header" | "footer";
|
|
1221
|
+
readonly variant: OdtHeaderFooterVariant;
|
|
1222
|
+
readonly blocks: ContentBlock[];
|
|
1223
|
+
}
|
|
1224
|
+
//#endregion
|
|
1225
|
+
//#region ../odf.js/dist/forms-wTsoDdDc.d.ts
|
|
1226
|
+
//#region src/typed/shared/forms.d.ts
|
|
1227
|
+
interface OdbFormControl {
|
|
1228
|
+
tag: string;
|
|
1229
|
+
name?: string;
|
|
1230
|
+
controlImplementation?: string;
|
|
1231
|
+
dataField?: string;
|
|
1232
|
+
id?: string;
|
|
1233
|
+
label?: string;
|
|
1234
|
+
controls: OdbFormControl[];
|
|
1235
|
+
}
|
|
1236
|
+
interface OdbFormDefinition {
|
|
1237
|
+
name?: string;
|
|
1238
|
+
command?: string;
|
|
1239
|
+
commandType?: string;
|
|
1240
|
+
datasource?: string;
|
|
1241
|
+
filter?: string;
|
|
1242
|
+
order?: string;
|
|
1243
|
+
controls: OdbFormControl[];
|
|
1244
|
+
subForms: OdbFormDefinition[];
|
|
1245
|
+
}
|
|
1246
|
+
//#endregion
|
|
1247
|
+
//#region ../odf.js/dist/form-DbTyKkIO.d.ts
|
|
1248
|
+
//#region src/typed/odb/form.d.ts
|
|
1249
|
+
interface OdbForm {
|
|
1250
|
+
name: string;
|
|
1251
|
+
href: string;
|
|
1252
|
+
document: OdtDocument;
|
|
1253
|
+
forms: OdbFormDefinition[];
|
|
1254
|
+
}
|
|
1255
|
+
//#endregion
|
|
1256
|
+
//#region ../odf.js/dist/report-x9RuNwmr.d.ts
|
|
1257
|
+
//#region src/typed/odb/report.d.ts
|
|
1258
|
+
interface OdbReportElement {
|
|
1259
|
+
tag: string;
|
|
1260
|
+
name?: string;
|
|
1261
|
+
text?: string;
|
|
1262
|
+
formula?: string;
|
|
1263
|
+
dataField?: string;
|
|
1264
|
+
}
|
|
1265
|
+
interface OdbReportBand {
|
|
1266
|
+
kind: "report-header" | "page-header" | "group-header" | "detail" | "group-footer" | "page-footer" | "report-footer";
|
|
1267
|
+
name?: string;
|
|
1268
|
+
elements: OdbReportElement[];
|
|
1269
|
+
}
|
|
1270
|
+
interface OdbReportFunction {
|
|
1271
|
+
name: string;
|
|
1272
|
+
formula: string;
|
|
1273
|
+
}
|
|
1274
|
+
interface OdbReportGroup {
|
|
1275
|
+
groupExpression?: string;
|
|
1276
|
+
sortExpression?: string;
|
|
1277
|
+
sortAscending?: boolean;
|
|
1278
|
+
startNewColumn?: boolean;
|
|
1279
|
+
resetPageNumber?: boolean;
|
|
1280
|
+
keepTogether?: string;
|
|
1281
|
+
header?: OdbReportBand;
|
|
1282
|
+
footer?: OdbReportBand;
|
|
1283
|
+
functions: OdbReportFunction[];
|
|
1284
|
+
groups: OdbReportGroup[];
|
|
1285
|
+
}
|
|
1286
|
+
interface OdbReport {
|
|
1287
|
+
name: string;
|
|
1288
|
+
href: string;
|
|
1289
|
+
command?: string;
|
|
1290
|
+
commandType?: string;
|
|
1291
|
+
caption?: string;
|
|
1292
|
+
mimeType?: string;
|
|
1293
|
+
reportHeader?: OdbReportBand;
|
|
1294
|
+
pageHeader?: OdbReportBand;
|
|
1295
|
+
groups: OdbReportGroup[];
|
|
1296
|
+
detail?: OdbReportBand;
|
|
1297
|
+
pageFooter?: OdbReportBand;
|
|
1298
|
+
reportFooter?: OdbReportBand;
|
|
1299
|
+
functions: OdbReportFunction[];
|
|
1300
|
+
}
|
|
1301
|
+
//#endregion
|
|
1302
|
+
//#region src/operations/odb.d.ts
|
|
1303
|
+
declare function resolveOdbBytes(source: DocumentInput): Promise<Uint8Array<ArrayBuffer>>;
|
|
1304
|
+
declare const odbTablesOperation: {
|
|
1305
|
+
readonly name: string;
|
|
1306
|
+
readonly title: string;
|
|
1307
|
+
readonly description: string;
|
|
1308
|
+
readonly inputSchema: z.ZodObject<{
|
|
1309
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1310
|
+
path: z.ZodString;
|
|
1311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1312
|
+
bytesBase64: z.ZodString;
|
|
1313
|
+
format: z.ZodEnum<{
|
|
1314
|
+
docx: "docx";
|
|
1315
|
+
pptx: "pptx";
|
|
1316
|
+
xlsx: "xlsx";
|
|
1317
|
+
odt: "odt";
|
|
1318
|
+
odp: "odp";
|
|
1319
|
+
ods: "ods";
|
|
1320
|
+
odg: "odg";
|
|
1321
|
+
svg: "svg";
|
|
1322
|
+
odf: "odf";
|
|
1323
|
+
csv: "csv";
|
|
1324
|
+
markdown: "markdown";
|
|
1325
|
+
rtf: "rtf";
|
|
1326
|
+
doc: "doc";
|
|
1327
|
+
xls: "xls";
|
|
1328
|
+
ppt: "ppt";
|
|
1329
|
+
wpd: "wpd";
|
|
1330
|
+
epub: "epub";
|
|
1331
|
+
pdf: "pdf";
|
|
1332
|
+
}>;
|
|
1333
|
+
}, z.core.$strip>]>;
|
|
1334
|
+
}, z.core.$strip>;
|
|
1335
|
+
run(input: {
|
|
1336
|
+
source: {
|
|
1337
|
+
path: string;
|
|
1338
|
+
} | {
|
|
1339
|
+
bytesBase64: string;
|
|
1340
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1341
|
+
};
|
|
1342
|
+
}, context?: DocumentOperationContext): Promise<readonly import("documents.js").HsqldbTable[]>;
|
|
1343
|
+
};
|
|
1344
|
+
declare const odbFormsOperation: {
|
|
1345
|
+
readonly name: string;
|
|
1346
|
+
readonly title: string;
|
|
1347
|
+
readonly description: string;
|
|
1348
|
+
readonly inputSchema: z.ZodObject<{
|
|
1349
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1350
|
+
path: z.ZodString;
|
|
1351
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1352
|
+
bytesBase64: z.ZodString;
|
|
1353
|
+
format: z.ZodEnum<{
|
|
1354
|
+
docx: "docx";
|
|
1355
|
+
pptx: "pptx";
|
|
1356
|
+
xlsx: "xlsx";
|
|
1357
|
+
odt: "odt";
|
|
1358
|
+
odp: "odp";
|
|
1359
|
+
ods: "ods";
|
|
1360
|
+
odg: "odg";
|
|
1361
|
+
svg: "svg";
|
|
1362
|
+
odf: "odf";
|
|
1363
|
+
csv: "csv";
|
|
1364
|
+
markdown: "markdown";
|
|
1365
|
+
rtf: "rtf";
|
|
1366
|
+
doc: "doc";
|
|
1367
|
+
xls: "xls";
|
|
1368
|
+
ppt: "ppt";
|
|
1369
|
+
wpd: "wpd";
|
|
1370
|
+
epub: "epub";
|
|
1371
|
+
pdf: "pdf";
|
|
1372
|
+
}>;
|
|
1373
|
+
}, z.core.$strip>]>;
|
|
1374
|
+
}, z.core.$strip>;
|
|
1375
|
+
run(input: {
|
|
1376
|
+
source: {
|
|
1377
|
+
path: string;
|
|
1378
|
+
} | {
|
|
1379
|
+
bytesBase64: string;
|
|
1380
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1381
|
+
};
|
|
1382
|
+
}, context?: DocumentOperationContext): Promise<readonly OdbForm[]>;
|
|
1383
|
+
};
|
|
1384
|
+
declare const odbReportsOperation: {
|
|
1385
|
+
readonly name: string;
|
|
1386
|
+
readonly title: string;
|
|
1387
|
+
readonly description: string;
|
|
1388
|
+
readonly inputSchema: z.ZodObject<{
|
|
1389
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1390
|
+
path: z.ZodString;
|
|
1391
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1392
|
+
bytesBase64: z.ZodString;
|
|
1393
|
+
format: z.ZodEnum<{
|
|
1394
|
+
docx: "docx";
|
|
1395
|
+
pptx: "pptx";
|
|
1396
|
+
xlsx: "xlsx";
|
|
1397
|
+
odt: "odt";
|
|
1398
|
+
odp: "odp";
|
|
1399
|
+
ods: "ods";
|
|
1400
|
+
odg: "odg";
|
|
1401
|
+
svg: "svg";
|
|
1402
|
+
odf: "odf";
|
|
1403
|
+
csv: "csv";
|
|
1404
|
+
markdown: "markdown";
|
|
1405
|
+
rtf: "rtf";
|
|
1406
|
+
doc: "doc";
|
|
1407
|
+
xls: "xls";
|
|
1408
|
+
ppt: "ppt";
|
|
1409
|
+
wpd: "wpd";
|
|
1410
|
+
epub: "epub";
|
|
1411
|
+
pdf: "pdf";
|
|
1412
|
+
}>;
|
|
1413
|
+
}, z.core.$strip>]>;
|
|
1414
|
+
}, z.core.$strip>;
|
|
1415
|
+
run(input: {
|
|
1416
|
+
source: {
|
|
1417
|
+
path: string;
|
|
1418
|
+
} | {
|
|
1419
|
+
bytesBase64: string;
|
|
1420
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1421
|
+
};
|
|
1422
|
+
}, context?: DocumentOperationContext): Promise<readonly OdbReport[]>;
|
|
1423
|
+
};
|
|
1424
|
+
declare const odbQueryOperation: {
|
|
1425
|
+
readonly name: string;
|
|
1426
|
+
readonly title: string;
|
|
1427
|
+
readonly description: string;
|
|
1428
|
+
readonly inputSchema: z.ZodObject<{
|
|
1429
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1430
|
+
path: z.ZodString;
|
|
1431
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1432
|
+
bytesBase64: z.ZodString;
|
|
1433
|
+
format: z.ZodEnum<{
|
|
1434
|
+
docx: "docx";
|
|
1435
|
+
pptx: "pptx";
|
|
1436
|
+
xlsx: "xlsx";
|
|
1437
|
+
odt: "odt";
|
|
1438
|
+
odp: "odp";
|
|
1439
|
+
ods: "ods";
|
|
1440
|
+
odg: "odg";
|
|
1441
|
+
svg: "svg";
|
|
1442
|
+
odf: "odf";
|
|
1443
|
+
csv: "csv";
|
|
1444
|
+
markdown: "markdown";
|
|
1445
|
+
rtf: "rtf";
|
|
1446
|
+
doc: "doc";
|
|
1447
|
+
xls: "xls";
|
|
1448
|
+
ppt: "ppt";
|
|
1449
|
+
wpd: "wpd";
|
|
1450
|
+
epub: "epub";
|
|
1451
|
+
pdf: "pdf";
|
|
1452
|
+
}>;
|
|
1453
|
+
}, z.core.$strip>]>;
|
|
1454
|
+
sql: z.ZodOptional<z.ZodString>;
|
|
1455
|
+
query: z.ZodOptional<z.ZodString>;
|
|
1456
|
+
}, z.core.$strip>;
|
|
1457
|
+
run(input: {
|
|
1458
|
+
source: {
|
|
1459
|
+
path: string;
|
|
1460
|
+
} | {
|
|
1461
|
+
bytesBase64: string;
|
|
1462
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1463
|
+
};
|
|
1464
|
+
sql?: string | undefined;
|
|
1465
|
+
query?: string | undefined;
|
|
1466
|
+
}, context?: DocumentOperationContext): Promise<import("documents.js").SqlResultSet>;
|
|
1467
|
+
};
|
|
1468
|
+
declare const odbToCsvOperation: {
|
|
1469
|
+
readonly name: string;
|
|
1470
|
+
readonly title: string;
|
|
1471
|
+
readonly description: string;
|
|
1472
|
+
readonly inputSchema: z.ZodObject<{
|
|
1473
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1474
|
+
path: z.ZodString;
|
|
1475
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1476
|
+
bytesBase64: z.ZodString;
|
|
1477
|
+
format: z.ZodEnum<{
|
|
1478
|
+
docx: "docx";
|
|
1479
|
+
pptx: "pptx";
|
|
1480
|
+
xlsx: "xlsx";
|
|
1481
|
+
odt: "odt";
|
|
1482
|
+
odp: "odp";
|
|
1483
|
+
ods: "ods";
|
|
1484
|
+
odg: "odg";
|
|
1485
|
+
svg: "svg";
|
|
1486
|
+
odf: "odf";
|
|
1487
|
+
csv: "csv";
|
|
1488
|
+
markdown: "markdown";
|
|
1489
|
+
rtf: "rtf";
|
|
1490
|
+
doc: "doc";
|
|
1491
|
+
xls: "xls";
|
|
1492
|
+
ppt: "ppt";
|
|
1493
|
+
wpd: "wpd";
|
|
1494
|
+
epub: "epub";
|
|
1495
|
+
pdf: "pdf";
|
|
1496
|
+
}>;
|
|
1497
|
+
}, z.core.$strip>]>;
|
|
1498
|
+
table: z.ZodOptional<z.ZodString>;
|
|
1499
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
1500
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
1501
|
+
}, z.core.$strip>>;
|
|
1502
|
+
}, z.core.$strip>;
|
|
1503
|
+
run(input: {
|
|
1504
|
+
source: {
|
|
1505
|
+
path: string;
|
|
1506
|
+
} | {
|
|
1507
|
+
bytesBase64: string;
|
|
1508
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1509
|
+
};
|
|
1510
|
+
table?: string | undefined;
|
|
1511
|
+
output?: {
|
|
1512
|
+
outputPath?: string | undefined;
|
|
1513
|
+
} | undefined;
|
|
1514
|
+
}, context?: DocumentOperationContext): Promise<ResolvedDocumentOutput>;
|
|
1515
|
+
};
|
|
1516
|
+
declare const odbToXlsxOperation: {
|
|
1517
|
+
readonly name: string;
|
|
1518
|
+
readonly title: string;
|
|
1519
|
+
readonly description: string;
|
|
1520
|
+
readonly inputSchema: z.ZodObject<{
|
|
1521
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1522
|
+
path: z.ZodString;
|
|
1523
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1524
|
+
bytesBase64: z.ZodString;
|
|
1525
|
+
format: z.ZodEnum<{
|
|
1526
|
+
docx: "docx";
|
|
1527
|
+
pptx: "pptx";
|
|
1528
|
+
xlsx: "xlsx";
|
|
1529
|
+
odt: "odt";
|
|
1530
|
+
odp: "odp";
|
|
1531
|
+
ods: "ods";
|
|
1532
|
+
odg: "odg";
|
|
1533
|
+
svg: "svg";
|
|
1534
|
+
odf: "odf";
|
|
1535
|
+
csv: "csv";
|
|
1536
|
+
markdown: "markdown";
|
|
1537
|
+
rtf: "rtf";
|
|
1538
|
+
doc: "doc";
|
|
1539
|
+
xls: "xls";
|
|
1540
|
+
ppt: "ppt";
|
|
1541
|
+
wpd: "wpd";
|
|
1542
|
+
epub: "epub";
|
|
1543
|
+
pdf: "pdf";
|
|
1544
|
+
}>;
|
|
1545
|
+
}, z.core.$strip>]>;
|
|
1546
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
1547
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
1548
|
+
}, z.core.$strip>>;
|
|
1549
|
+
}, z.core.$strip>;
|
|
1550
|
+
run(input: {
|
|
1551
|
+
source: {
|
|
1552
|
+
path: string;
|
|
1553
|
+
} | {
|
|
1554
|
+
bytesBase64: string;
|
|
1555
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1556
|
+
};
|
|
1557
|
+
output?: {
|
|
1558
|
+
outputPath?: string | undefined;
|
|
1559
|
+
} | undefined;
|
|
1560
|
+
}, context?: DocumentOperationContext): Promise<ResolvedDocumentOutput>;
|
|
1561
|
+
};
|
|
1562
|
+
//#endregion
|
|
1563
|
+
//#region src/operations/odb-render-report.d.ts
|
|
1564
|
+
declare const OdbRenderReportOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1565
|
+
mathDiagnostics: z.ZodArray<z.ZodObject<{
|
|
1566
|
+
kind: z.ZodEnum<{
|
|
1567
|
+
"unsupported-element": "unsupported-element";
|
|
1568
|
+
"approximated-element": "approximated-element";
|
|
1569
|
+
}>;
|
|
1570
|
+
detail: z.ZodString;
|
|
1571
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1572
|
+
}, z.core.$strip>>;
|
|
1573
|
+
fontSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1574
|
+
requestedFamily: z.ZodString;
|
|
1575
|
+
requestedBold: z.ZodBoolean;
|
|
1576
|
+
requestedItalic: z.ZodBoolean;
|
|
1577
|
+
reason: z.ZodEnum<{
|
|
1578
|
+
"missing-face": "missing-face";
|
|
1579
|
+
"vendored-substitute": "vendored-substitute";
|
|
1580
|
+
}>;
|
|
1581
|
+
resolvedFamily: z.ZodString;
|
|
1582
|
+
}, z.core.$strip>>;
|
|
1583
|
+
charSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1584
|
+
from: z.ZodString;
|
|
1585
|
+
to: z.ZodString;
|
|
1586
|
+
pageIndex: z.ZodNumber;
|
|
1587
|
+
}, z.core.$strip>>;
|
|
1588
|
+
path: z.ZodString;
|
|
1589
|
+
byteLength: z.ZodNumber;
|
|
1590
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1591
|
+
mathDiagnostics: z.ZodArray<z.ZodObject<{
|
|
1592
|
+
kind: z.ZodEnum<{
|
|
1593
|
+
"unsupported-element": "unsupported-element";
|
|
1594
|
+
"approximated-element": "approximated-element";
|
|
1595
|
+
}>;
|
|
1596
|
+
detail: z.ZodString;
|
|
1597
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1598
|
+
}, z.core.$strip>>;
|
|
1599
|
+
fontSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1600
|
+
requestedFamily: z.ZodString;
|
|
1601
|
+
requestedBold: z.ZodBoolean;
|
|
1602
|
+
requestedItalic: z.ZodBoolean;
|
|
1603
|
+
reason: z.ZodEnum<{
|
|
1604
|
+
"missing-face": "missing-face";
|
|
1605
|
+
"vendored-substitute": "vendored-substitute";
|
|
1606
|
+
}>;
|
|
1607
|
+
resolvedFamily: z.ZodString;
|
|
1608
|
+
}, z.core.$strip>>;
|
|
1609
|
+
charSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1610
|
+
from: z.ZodString;
|
|
1611
|
+
to: z.ZodString;
|
|
1612
|
+
pageIndex: z.ZodNumber;
|
|
1613
|
+
}, z.core.$strip>>;
|
|
1614
|
+
bytesBase64: z.ZodString;
|
|
1615
|
+
byteLength: z.ZodNumber;
|
|
1616
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1617
|
+
}, z.core.$strip>]>;
|
|
1618
|
+
declare const odbRenderReportOperation: {
|
|
1619
|
+
readonly name: string;
|
|
1620
|
+
readonly title: string;
|
|
1621
|
+
readonly description: string;
|
|
1622
|
+
readonly inputSchema: z.ZodObject<{
|
|
1623
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1624
|
+
path: z.ZodString;
|
|
1625
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1626
|
+
bytesBase64: z.ZodString;
|
|
1627
|
+
format: z.ZodEnum<{
|
|
1628
|
+
docx: "docx";
|
|
1629
|
+
pptx: "pptx";
|
|
1630
|
+
xlsx: "xlsx";
|
|
1631
|
+
odt: "odt";
|
|
1632
|
+
odp: "odp";
|
|
1633
|
+
ods: "ods";
|
|
1634
|
+
odg: "odg";
|
|
1635
|
+
svg: "svg";
|
|
1636
|
+
odf: "odf";
|
|
1637
|
+
csv: "csv";
|
|
1638
|
+
markdown: "markdown";
|
|
1639
|
+
rtf: "rtf";
|
|
1640
|
+
doc: "doc";
|
|
1641
|
+
xls: "xls";
|
|
1642
|
+
ppt: "ppt";
|
|
1643
|
+
wpd: "wpd";
|
|
1644
|
+
epub: "epub";
|
|
1645
|
+
pdf: "pdf";
|
|
1646
|
+
}>;
|
|
1647
|
+
}, z.core.$strip>]>;
|
|
1648
|
+
report: z.ZodOptional<z.ZodString>;
|
|
1649
|
+
targetFormat: z.ZodEnum<{
|
|
1650
|
+
docx: "docx";
|
|
1651
|
+
odt: "odt";
|
|
1652
|
+
pdf: "pdf";
|
|
1653
|
+
}>;
|
|
1654
|
+
output: z.ZodOptional<z.ZodObject<{
|
|
1655
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
1656
|
+
}, z.core.$strip>>;
|
|
1657
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1658
|
+
family: z.ZodString;
|
|
1659
|
+
bold: z.ZodBoolean;
|
|
1660
|
+
italic: z.ZodBoolean;
|
|
1661
|
+
bytesBase64: z.ZodString;
|
|
1662
|
+
}, z.core.$strip>>>;
|
|
1663
|
+
}, z.core.$strip>;
|
|
1664
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1665
|
+
mathDiagnostics: z.ZodArray<z.ZodObject<{
|
|
1666
|
+
kind: z.ZodEnum<{
|
|
1667
|
+
"unsupported-element": "unsupported-element";
|
|
1668
|
+
"approximated-element": "approximated-element";
|
|
1669
|
+
}>;
|
|
1670
|
+
detail: z.ZodString;
|
|
1671
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1672
|
+
}, z.core.$strip>>;
|
|
1673
|
+
fontSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1674
|
+
requestedFamily: z.ZodString;
|
|
1675
|
+
requestedBold: z.ZodBoolean;
|
|
1676
|
+
requestedItalic: z.ZodBoolean;
|
|
1677
|
+
reason: z.ZodEnum<{
|
|
1678
|
+
"missing-face": "missing-face";
|
|
1679
|
+
"vendored-substitute": "vendored-substitute";
|
|
1680
|
+
}>;
|
|
1681
|
+
resolvedFamily: z.ZodString;
|
|
1682
|
+
}, z.core.$strip>>;
|
|
1683
|
+
charSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1684
|
+
from: z.ZodString;
|
|
1685
|
+
to: z.ZodString;
|
|
1686
|
+
pageIndex: z.ZodNumber;
|
|
1687
|
+
}, z.core.$strip>>;
|
|
1688
|
+
path: z.ZodString;
|
|
1689
|
+
byteLength: z.ZodNumber;
|
|
1690
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1691
|
+
mathDiagnostics: z.ZodArray<z.ZodObject<{
|
|
1692
|
+
kind: z.ZodEnum<{
|
|
1693
|
+
"unsupported-element": "unsupported-element";
|
|
1694
|
+
"approximated-element": "approximated-element";
|
|
1695
|
+
}>;
|
|
1696
|
+
detail: z.ZodString;
|
|
1697
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
1698
|
+
}, z.core.$strip>>;
|
|
1699
|
+
fontSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1700
|
+
requestedFamily: z.ZodString;
|
|
1701
|
+
requestedBold: z.ZodBoolean;
|
|
1702
|
+
requestedItalic: z.ZodBoolean;
|
|
1703
|
+
reason: z.ZodEnum<{
|
|
1704
|
+
"missing-face": "missing-face";
|
|
1705
|
+
"vendored-substitute": "vendored-substitute";
|
|
1706
|
+
}>;
|
|
1707
|
+
resolvedFamily: z.ZodString;
|
|
1708
|
+
}, z.core.$strip>>;
|
|
1709
|
+
charSubstitutions: z.ZodArray<z.ZodObject<{
|
|
1710
|
+
from: z.ZodString;
|
|
1711
|
+
to: z.ZodString;
|
|
1712
|
+
pageIndex: z.ZodNumber;
|
|
1713
|
+
}, z.core.$strip>>;
|
|
1714
|
+
bytesBase64: z.ZodString;
|
|
1715
|
+
byteLength: z.ZodNumber;
|
|
1716
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1717
|
+
}, z.core.$strip>]>;
|
|
1718
|
+
run(input: {
|
|
1719
|
+
source: {
|
|
1720
|
+
path: string;
|
|
1721
|
+
} | {
|
|
1722
|
+
bytesBase64: string;
|
|
1723
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1724
|
+
};
|
|
1725
|
+
targetFormat: "docx" | "odt" | "pdf";
|
|
1726
|
+
report?: string | undefined;
|
|
1727
|
+
output?: {
|
|
1728
|
+
outputPath?: string | undefined;
|
|
1729
|
+
} | undefined;
|
|
1730
|
+
fonts?: {
|
|
1731
|
+
family: string;
|
|
1732
|
+
bold: boolean;
|
|
1733
|
+
italic: boolean;
|
|
1734
|
+
bytesBase64: string;
|
|
1735
|
+
}[] | undefined;
|
|
1736
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
1737
|
+
mathDiagnostics: {
|
|
1738
|
+
kind: "unsupported-element" | "approximated-element";
|
|
1739
|
+
detail: string;
|
|
1740
|
+
sourcePath?: string | undefined;
|
|
1741
|
+
}[];
|
|
1742
|
+
fontSubstitutions: {
|
|
1743
|
+
requestedFamily: string;
|
|
1744
|
+
requestedBold: boolean;
|
|
1745
|
+
requestedItalic: boolean;
|
|
1746
|
+
reason: "missing-face" | "vendored-substitute";
|
|
1747
|
+
resolvedFamily: string;
|
|
1748
|
+
}[];
|
|
1749
|
+
charSubstitutions: {
|
|
1750
|
+
from: string;
|
|
1751
|
+
to: string;
|
|
1752
|
+
pageIndex: number;
|
|
1753
|
+
}[];
|
|
1754
|
+
path: string;
|
|
1755
|
+
byteLength: number;
|
|
1756
|
+
} | {
|
|
1757
|
+
mathDiagnostics: {
|
|
1758
|
+
kind: "unsupported-element" | "approximated-element";
|
|
1759
|
+
detail: string;
|
|
1760
|
+
sourcePath?: string | undefined;
|
|
1761
|
+
}[];
|
|
1762
|
+
fontSubstitutions: {
|
|
1763
|
+
requestedFamily: string;
|
|
1764
|
+
requestedBold: boolean;
|
|
1765
|
+
requestedItalic: boolean;
|
|
1766
|
+
reason: "missing-face" | "vendored-substitute";
|
|
1767
|
+
resolvedFamily: string;
|
|
1768
|
+
}[];
|
|
1769
|
+
charSubstitutions: {
|
|
1770
|
+
from: string;
|
|
1771
|
+
to: string;
|
|
1772
|
+
pageIndex: number;
|
|
1773
|
+
}[];
|
|
1774
|
+
bytesBase64: string;
|
|
1775
|
+
byteLength: number;
|
|
1776
|
+
large?: true | undefined;
|
|
1777
|
+
}>;
|
|
1778
|
+
};
|
|
1779
|
+
//#endregion
|
|
1780
|
+
//#region src/operations/odm.d.ts
|
|
1781
|
+
declare const OdmToPdfOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1782
|
+
path: z.ZodString;
|
|
1783
|
+
byteLength: z.ZodNumber;
|
|
1784
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1785
|
+
bytesBase64: z.ZodString;
|
|
1786
|
+
byteLength: z.ZodNumber;
|
|
1787
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1788
|
+
}, z.core.$strip>]>;
|
|
1789
|
+
declare const odmToPdfOperation: {
|
|
1790
|
+
readonly name: string;
|
|
1791
|
+
readonly title: string;
|
|
1792
|
+
readonly description: string;
|
|
1793
|
+
readonly inputSchema: z.ZodObject<{
|
|
1794
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1795
|
+
path: z.ZodString;
|
|
1796
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1797
|
+
bytesBase64: z.ZodString;
|
|
1798
|
+
}, z.core.$strip>]>;
|
|
1799
|
+
chapters: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
1800
|
+
href: z.ZodString;
|
|
1801
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1802
|
+
path: z.ZodString;
|
|
1803
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1804
|
+
bytesBase64: z.ZodString;
|
|
1805
|
+
format: z.ZodEnum<{
|
|
1806
|
+
docx: "docx";
|
|
1807
|
+
pptx: "pptx";
|
|
1808
|
+
xlsx: "xlsx";
|
|
1809
|
+
odt: "odt";
|
|
1810
|
+
odp: "odp";
|
|
1811
|
+
ods: "ods";
|
|
1812
|
+
odg: "odg";
|
|
1813
|
+
svg: "svg";
|
|
1814
|
+
odf: "odf";
|
|
1815
|
+
csv: "csv";
|
|
1816
|
+
markdown: "markdown";
|
|
1817
|
+
rtf: "rtf";
|
|
1818
|
+
doc: "doc";
|
|
1819
|
+
xls: "xls";
|
|
1820
|
+
ppt: "ppt";
|
|
1821
|
+
wpd: "wpd";
|
|
1822
|
+
epub: "epub";
|
|
1823
|
+
pdf: "pdf";
|
|
1824
|
+
}>;
|
|
1825
|
+
}, z.core.$strip>]>;
|
|
1826
|
+
}, z.core.$strip>>>;
|
|
1827
|
+
chaptersDir: z.ZodOptional<z.ZodString>;
|
|
1828
|
+
output: z.ZodDefault<z.ZodObject<{
|
|
1829
|
+
outputPath: z.ZodOptional<z.ZodString>;
|
|
1830
|
+
}, z.core.$strip>>;
|
|
1831
|
+
}, z.core.$strip>;
|
|
1832
|
+
readonly outputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1833
|
+
path: z.ZodString;
|
|
1834
|
+
byteLength: z.ZodNumber;
|
|
1835
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1836
|
+
bytesBase64: z.ZodString;
|
|
1837
|
+
byteLength: z.ZodNumber;
|
|
1838
|
+
large: z.ZodOptional<z.ZodLiteral<true>>;
|
|
1839
|
+
}, z.core.$strip>]>;
|
|
1840
|
+
run(input: {
|
|
1841
|
+
source: {
|
|
1842
|
+
path: string;
|
|
1843
|
+
} | {
|
|
1844
|
+
bytesBase64: string;
|
|
1845
|
+
};
|
|
1846
|
+
chapters: {
|
|
1847
|
+
href: string;
|
|
1848
|
+
source: {
|
|
1849
|
+
path: string;
|
|
1850
|
+
} | {
|
|
1851
|
+
bytesBase64: string;
|
|
1852
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1853
|
+
};
|
|
1854
|
+
}[];
|
|
1855
|
+
output: {
|
|
1856
|
+
outputPath?: string | undefined;
|
|
1857
|
+
};
|
|
1858
|
+
chaptersDir?: string | undefined;
|
|
1859
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
1860
|
+
path: string;
|
|
1861
|
+
byteLength: number;
|
|
1862
|
+
} | {
|
|
1863
|
+
bytesBase64: string;
|
|
1864
|
+
byteLength: number;
|
|
1865
|
+
large?: true | undefined;
|
|
1866
|
+
}>;
|
|
1867
|
+
};
|
|
1868
|
+
//#endregion
|
|
1869
|
+
//#region src/operations/outline.d.ts
|
|
1870
|
+
interface OutlineGroupJson {
|
|
1871
|
+
text: string;
|
|
1872
|
+
level: number;
|
|
1873
|
+
children: OutlineChildJson[];
|
|
1874
|
+
}
|
|
1875
|
+
type OutlineChildJson = OutlineGroupJson | {
|
|
1876
|
+
kind: string;
|
|
1877
|
+
text: string;
|
|
1878
|
+
};
|
|
1879
|
+
interface OutlineDocumentOutput {
|
|
1880
|
+
readonly sourceFormat: DocumentFormat;
|
|
1881
|
+
readonly kind: string;
|
|
1882
|
+
readonly outline: OutlineChildJson[];
|
|
1883
|
+
}
|
|
1884
|
+
declare const outlineDocumentOperation: {
|
|
1885
|
+
readonly name: string;
|
|
1886
|
+
readonly title: string;
|
|
1887
|
+
readonly description: string;
|
|
1888
|
+
readonly inputSchema: z.ZodObject<{
|
|
1889
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1890
|
+
path: z.ZodString;
|
|
1891
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1892
|
+
bytesBase64: z.ZodString;
|
|
1893
|
+
format: z.ZodEnum<{
|
|
1894
|
+
docx: "docx";
|
|
1895
|
+
pptx: "pptx";
|
|
1896
|
+
xlsx: "xlsx";
|
|
1897
|
+
odt: "odt";
|
|
1898
|
+
odp: "odp";
|
|
1899
|
+
ods: "ods";
|
|
1900
|
+
odg: "odg";
|
|
1901
|
+
svg: "svg";
|
|
1902
|
+
odf: "odf";
|
|
1903
|
+
csv: "csv";
|
|
1904
|
+
markdown: "markdown";
|
|
1905
|
+
rtf: "rtf";
|
|
1906
|
+
doc: "doc";
|
|
1907
|
+
xls: "xls";
|
|
1908
|
+
ppt: "ppt";
|
|
1909
|
+
wpd: "wpd";
|
|
1910
|
+
epub: "epub";
|
|
1911
|
+
pdf: "pdf";
|
|
1912
|
+
}>;
|
|
1913
|
+
}, z.core.$strip>]>;
|
|
1914
|
+
}, z.core.$strip>;
|
|
1915
|
+
run(input: {
|
|
1916
|
+
source: {
|
|
1917
|
+
path: string;
|
|
1918
|
+
} | {
|
|
1919
|
+
bytesBase64: string;
|
|
1920
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
1921
|
+
};
|
|
1922
|
+
}, context?: DocumentOperationContext): Promise<OutlineDocumentOutput>;
|
|
1923
|
+
};
|
|
1924
|
+
//#endregion
|
|
1925
|
+
//#region ../pdf-codec/dist/layout.d.ts
|
|
1926
|
+
interface LayoutOutlineItem {
|
|
1927
|
+
readonly title: string;
|
|
1928
|
+
readonly destination?: string;
|
|
1929
|
+
readonly children: readonly LayoutOutlineItem[];
|
|
1930
|
+
}
|
|
1931
|
+
declare const LayoutFormWidgetSchema: z.ZodObject<{
|
|
1932
|
+
pageIndex: z.ZodNumber;
|
|
1933
|
+
xPt: z.ZodNumber;
|
|
1934
|
+
yPt: z.ZodNumber;
|
|
1935
|
+
widthPt: z.ZodNumber;
|
|
1936
|
+
heightPt: z.ZodNumber;
|
|
1937
|
+
}, z.core.$strip>;
|
|
1938
|
+
type LayoutFormWidget = z.infer<typeof LayoutFormWidgetSchema>;
|
|
1939
|
+
interface LayoutFormField {
|
|
1940
|
+
readonly name: string;
|
|
1941
|
+
readonly fieldType: "text" | "checkbox" | "radio" | "button" | "listbox" | "combobox" | "signature" | "group";
|
|
1942
|
+
readonly value?: string;
|
|
1943
|
+
readonly checked?: boolean;
|
|
1944
|
+
readonly options?: readonly string[];
|
|
1945
|
+
readonly alias?: string;
|
|
1946
|
+
readonly readOnly?: boolean;
|
|
1947
|
+
readonly widgets: readonly LayoutFormWidget[];
|
|
1948
|
+
readonly children: readonly LayoutFormField[];
|
|
1949
|
+
}
|
|
1950
|
+
interface LayoutStructureElement {
|
|
1951
|
+
readonly id: string;
|
|
1952
|
+
readonly type: string;
|
|
1953
|
+
readonly title?: string;
|
|
1954
|
+
readonly language?: string;
|
|
1955
|
+
readonly alt?: string;
|
|
1956
|
+
readonly actualText?: string;
|
|
1957
|
+
readonly children: readonly LayoutStructureElement[];
|
|
1958
|
+
}
|
|
1959
|
+
//#endregion
|
|
1960
|
+
//#region src/operations/pdf-inspect.d.ts
|
|
1961
|
+
interface PdfInspectSummary {
|
|
1962
|
+
readonly pageCount: number;
|
|
1963
|
+
readonly pages: readonly {
|
|
1964
|
+
readonly widthPt: number;
|
|
1965
|
+
readonly heightPt: number;
|
|
1966
|
+
readonly itemKinds: Record<string, number>;
|
|
1967
|
+
}[];
|
|
1968
|
+
readonly metadata: LayoutDocument["metadata"];
|
|
1969
|
+
readonly imagesByFormat: Record<string, number>;
|
|
1970
|
+
}
|
|
1971
|
+
declare const pdfInspectOperation: {
|
|
1972
|
+
readonly name: string;
|
|
1973
|
+
readonly title: string;
|
|
1974
|
+
readonly description: string;
|
|
1975
|
+
readonly inputSchema: z.ZodObject<{
|
|
1976
|
+
source: z.ZodUnion<readonly [z.ZodObject<{
|
|
1977
|
+
path: z.ZodString;
|
|
1978
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1979
|
+
bytesBase64: z.ZodString;
|
|
1980
|
+
format: z.ZodEnum<{
|
|
1981
|
+
docx: "docx";
|
|
1982
|
+
pptx: "pptx";
|
|
1983
|
+
xlsx: "xlsx";
|
|
1984
|
+
odt: "odt";
|
|
1985
|
+
odp: "odp";
|
|
1986
|
+
ods: "ods";
|
|
1987
|
+
odg: "odg";
|
|
1988
|
+
svg: "svg";
|
|
1989
|
+
odf: "odf";
|
|
1990
|
+
csv: "csv";
|
|
1991
|
+
markdown: "markdown";
|
|
1992
|
+
rtf: "rtf";
|
|
1993
|
+
doc: "doc";
|
|
1994
|
+
xls: "xls";
|
|
1995
|
+
ppt: "ppt";
|
|
1996
|
+
wpd: "wpd";
|
|
1997
|
+
epub: "epub";
|
|
1998
|
+
pdf: "pdf";
|
|
1999
|
+
}>;
|
|
2000
|
+
}, z.core.$strip>]>;
|
|
2001
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
2002
|
+
}, z.core.$strip>;
|
|
2003
|
+
run(input: {
|
|
2004
|
+
source: {
|
|
2005
|
+
path: string;
|
|
2006
|
+
} | {
|
|
2007
|
+
bytesBase64: string;
|
|
2008
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "svg" | "odf" | "csv" | "rtf" | "doc" | "xls" | "ppt" | "wpd" | "epub";
|
|
2009
|
+
};
|
|
2010
|
+
full?: boolean | undefined;
|
|
2011
|
+
}, context?: DocumentOperationContext): Promise<{
|
|
2012
|
+
formatVersion: 1;
|
|
2013
|
+
metadata: {
|
|
2014
|
+
title?: string | undefined;
|
|
2015
|
+
author?: string | undefined;
|
|
2016
|
+
subject?: string | undefined;
|
|
2017
|
+
keywords?: string[] | undefined;
|
|
2018
|
+
creator?: string | undefined;
|
|
2019
|
+
producer?: string | undefined;
|
|
2020
|
+
createdIso?: string | undefined;
|
|
2021
|
+
modifiedIso?: string | undefined;
|
|
2022
|
+
lastPrintedIso?: string | undefined;
|
|
2023
|
+
language?: string | undefined;
|
|
2024
|
+
direction?: "ltr" | "rtl" | undefined;
|
|
2025
|
+
publisher?: string | undefined;
|
|
2026
|
+
contributor?: string | undefined;
|
|
2027
|
+
rights?: string | undefined;
|
|
2028
|
+
identifier?: string | undefined;
|
|
2029
|
+
comments?: string | undefined;
|
|
2030
|
+
company?: string | undefined;
|
|
2031
|
+
manager?: string | undefined;
|
|
2032
|
+
};
|
|
2033
|
+
pages: {
|
|
2034
|
+
widthPt: number;
|
|
2035
|
+
heightPt: number;
|
|
2036
|
+
items: ({
|
|
2037
|
+
kind: "text";
|
|
2038
|
+
text: string;
|
|
2039
|
+
xPt: number;
|
|
2040
|
+
yPt: number;
|
|
2041
|
+
font: {
|
|
2042
|
+
family: string;
|
|
2043
|
+
weight: "bold" | "normal";
|
|
2044
|
+
style: "italic" | "normal";
|
|
2045
|
+
};
|
|
2046
|
+
sizePt: number;
|
|
2047
|
+
color: {
|
|
2048
|
+
r: number;
|
|
2049
|
+
g: number;
|
|
2050
|
+
b: number;
|
|
2051
|
+
};
|
|
2052
|
+
widthPt?: number | undefined;
|
|
2053
|
+
rotationDeg?: number | undefined;
|
|
2054
|
+
underline?: boolean | undefined;
|
|
2055
|
+
layer?: string | undefined;
|
|
2056
|
+
actualText?: string | undefined;
|
|
2057
|
+
alt?: string | undefined;
|
|
2058
|
+
structure?: string | undefined;
|
|
2059
|
+
sourcePath?: string | undefined;
|
|
2060
|
+
} | {
|
|
2061
|
+
kind: "image";
|
|
2062
|
+
imageId: string;
|
|
2063
|
+
xPt: number;
|
|
2064
|
+
yPt: number;
|
|
2065
|
+
widthPt: number;
|
|
2066
|
+
heightPt: number;
|
|
2067
|
+
rotationDeg?: number | undefined;
|
|
2068
|
+
layer?: string | undefined;
|
|
2069
|
+
structure?: string | undefined;
|
|
2070
|
+
sourcePath?: string | undefined;
|
|
2071
|
+
} | {
|
|
2072
|
+
kind: "rect";
|
|
2073
|
+
xPt: number;
|
|
2074
|
+
yPt: number;
|
|
2075
|
+
widthPt: number;
|
|
2076
|
+
heightPt: number;
|
|
2077
|
+
fill?: {
|
|
2078
|
+
r: number;
|
|
2079
|
+
g: number;
|
|
2080
|
+
b: number;
|
|
2081
|
+
} | undefined;
|
|
2082
|
+
stroke?: {
|
|
2083
|
+
color: {
|
|
2084
|
+
r: number;
|
|
2085
|
+
g: number;
|
|
2086
|
+
b: number;
|
|
2087
|
+
};
|
|
2088
|
+
widthPt: number;
|
|
2089
|
+
} | undefined;
|
|
2090
|
+
layer?: string | undefined;
|
|
2091
|
+
structure?: string | undefined;
|
|
2092
|
+
sourcePath?: string | undefined;
|
|
2093
|
+
} | {
|
|
2094
|
+
kind: "line";
|
|
2095
|
+
x1Pt: number;
|
|
2096
|
+
y1Pt: number;
|
|
2097
|
+
x2Pt: number;
|
|
2098
|
+
y2Pt: number;
|
|
2099
|
+
color: {
|
|
2100
|
+
r: number;
|
|
2101
|
+
g: number;
|
|
2102
|
+
b: number;
|
|
2103
|
+
};
|
|
2104
|
+
widthPt: number;
|
|
2105
|
+
style?: "solid" | "dashed" | "dotted" | "double" | undefined;
|
|
2106
|
+
layer?: string | undefined;
|
|
2107
|
+
structure?: string | undefined;
|
|
2108
|
+
sourcePath?: string | undefined;
|
|
2109
|
+
} | {
|
|
2110
|
+
kind: "ellipse";
|
|
2111
|
+
xPt: number;
|
|
2112
|
+
yPt: number;
|
|
2113
|
+
widthPt: number;
|
|
2114
|
+
heightPt: number;
|
|
2115
|
+
fill?: {
|
|
2116
|
+
r: number;
|
|
2117
|
+
g: number;
|
|
2118
|
+
b: number;
|
|
2119
|
+
} | undefined;
|
|
2120
|
+
stroke?: {
|
|
2121
|
+
color: {
|
|
2122
|
+
r: number;
|
|
2123
|
+
g: number;
|
|
2124
|
+
b: number;
|
|
2125
|
+
};
|
|
2126
|
+
widthPt: number;
|
|
2127
|
+
} | undefined;
|
|
2128
|
+
layer?: string | undefined;
|
|
2129
|
+
structure?: string | undefined;
|
|
2130
|
+
sourcePath?: string | undefined;
|
|
2131
|
+
} | {
|
|
2132
|
+
kind: "path";
|
|
2133
|
+
subpaths: {
|
|
2134
|
+
startXPt: number;
|
|
2135
|
+
startYPt: number;
|
|
2136
|
+
segments: ({
|
|
2137
|
+
kind: "line";
|
|
2138
|
+
xPt: number;
|
|
2139
|
+
yPt: number;
|
|
2140
|
+
} | {
|
|
2141
|
+
kind: "cubic";
|
|
2142
|
+
c1xPt: number;
|
|
2143
|
+
c1yPt: number;
|
|
2144
|
+
c2xPt: number;
|
|
2145
|
+
c2yPt: number;
|
|
2146
|
+
xPt: number;
|
|
2147
|
+
yPt: number;
|
|
2148
|
+
})[];
|
|
2149
|
+
closed: boolean;
|
|
2150
|
+
}[];
|
|
2151
|
+
fill?: {
|
|
2152
|
+
r: number;
|
|
2153
|
+
g: number;
|
|
2154
|
+
b: number;
|
|
2155
|
+
} | undefined;
|
|
2156
|
+
fillRule?: "nonzero" | "evenodd" | undefined;
|
|
2157
|
+
stroke?: {
|
|
2158
|
+
color: {
|
|
2159
|
+
r: number;
|
|
2160
|
+
g: number;
|
|
2161
|
+
b: number;
|
|
2162
|
+
};
|
|
2163
|
+
widthPt: number;
|
|
2164
|
+
} | undefined;
|
|
2165
|
+
style?: "solid" | "dashed" | "dotted" | "double" | undefined;
|
|
2166
|
+
layer?: string | undefined;
|
|
2167
|
+
structure?: string | undefined;
|
|
2168
|
+
sourcePath?: string | undefined;
|
|
2169
|
+
} | {
|
|
2170
|
+
kind: "link";
|
|
2171
|
+
uri: string;
|
|
2172
|
+
xPt: number;
|
|
2173
|
+
yPt: number;
|
|
2174
|
+
widthPt: number;
|
|
2175
|
+
heightPt: number;
|
|
2176
|
+
title?: string | undefined;
|
|
2177
|
+
sourcePath?: string | undefined;
|
|
2178
|
+
} | {
|
|
2179
|
+
kind: "internalLink";
|
|
2180
|
+
destination: string;
|
|
2181
|
+
xPt: number;
|
|
2182
|
+
yPt: number;
|
|
2183
|
+
widthPt: number;
|
|
2184
|
+
heightPt: number;
|
|
2185
|
+
title?: string | undefined;
|
|
2186
|
+
})[];
|
|
2187
|
+
annotations?: {
|
|
2188
|
+
subtype: string;
|
|
2189
|
+
xPt: number;
|
|
2190
|
+
yPt: number;
|
|
2191
|
+
widthPt: number;
|
|
2192
|
+
heightPt: number;
|
|
2193
|
+
contents?: string | undefined;
|
|
2194
|
+
author?: string | undefined;
|
|
2195
|
+
modifiedIso?: string | undefined;
|
|
2196
|
+
quads?: [{
|
|
2197
|
+
xPt: number;
|
|
2198
|
+
yPt: number;
|
|
2199
|
+
}, {
|
|
2200
|
+
xPt: number;
|
|
2201
|
+
yPt: number;
|
|
2202
|
+
}, {
|
|
2203
|
+
xPt: number;
|
|
2204
|
+
yPt: number;
|
|
2205
|
+
}, {
|
|
2206
|
+
xPt: number;
|
|
2207
|
+
yPt: number;
|
|
2208
|
+
}][] | undefined;
|
|
2209
|
+
source?: {
|
|
2210
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "odf" | "rtf" | "wpd" | "epub" | "odm" | "odb";
|
|
2211
|
+
xml: string;
|
|
2212
|
+
} | undefined;
|
|
2213
|
+
}[] | undefined;
|
|
2214
|
+
notes?: string | undefined;
|
|
2215
|
+
}[];
|
|
2216
|
+
images: Record<string, {
|
|
2217
|
+
format: "png" | "jpeg";
|
|
2218
|
+
base64: string;
|
|
2219
|
+
widthPx: number;
|
|
2220
|
+
heightPx: number;
|
|
2221
|
+
original?: {
|
|
2222
|
+
filter: "jbig2" | "jpeg2000";
|
|
2223
|
+
base64: string;
|
|
2224
|
+
jbig2GlobalsBase64?: string | undefined;
|
|
2225
|
+
} | undefined;
|
|
2226
|
+
}>;
|
|
2227
|
+
destinations?: {
|
|
2228
|
+
name: string;
|
|
2229
|
+
pageIndex: number;
|
|
2230
|
+
target: {
|
|
2231
|
+
kind: "xyz" | "fit" | "fitH" | "fitV" | "fitR" | "fitB" | "fitBH" | "fitBV";
|
|
2232
|
+
leftPt?: number | undefined;
|
|
2233
|
+
topPt?: number | undefined;
|
|
2234
|
+
bottomPt?: number | undefined;
|
|
2235
|
+
rightPt?: number | undefined;
|
|
2236
|
+
zoom?: number | undefined;
|
|
2237
|
+
};
|
|
2238
|
+
}[] | undefined;
|
|
2239
|
+
outline?: LayoutOutlineItem[] | undefined;
|
|
2240
|
+
attachments?: {
|
|
2241
|
+
name: string;
|
|
2242
|
+
base64: string;
|
|
2243
|
+
description?: string | undefined;
|
|
2244
|
+
mimeType?: string | undefined;
|
|
2245
|
+
}[] | undefined;
|
|
2246
|
+
layers?: {
|
|
2247
|
+
name: string;
|
|
2248
|
+
visible: boolean;
|
|
2249
|
+
}[] | undefined;
|
|
2250
|
+
structure?: LayoutStructureElement[] | undefined;
|
|
2251
|
+
form?: LayoutFormField[] | undefined;
|
|
2252
|
+
source?: Record<string, {
|
|
2253
|
+
format: "docx" | "pptx" | "odt" | "odp" | "ods" | "odg" | "pdf" | "markdown" | "xlsx" | "odf" | "rtf" | "wpd" | "epub" | "odm" | "odb";
|
|
2254
|
+
xml: string;
|
|
2255
|
+
}> | undefined;
|
|
2256
|
+
} | PdfInspectSummary>;
|
|
2257
|
+
};
|
|
2258
|
+
//#endregion
|
|
2259
|
+
export { ComputeFormulaOutputSchema, ConvertDocumentOutputSchema, DOCUMENT_OPERATIONS, type DocumentInput, DocumentInputSchema, type DocumentOperation, type DocumentOperationContext, type DocumentOutput, DocumentOutputSchema, FontInputSchema, type InlineDocumentOutput, LARGE_RESULT_THRESHOLD_BYTES, ListDocumentConversionsOutputSchema, OdbRenderReportOutputSchema, OdmToPdfOutputSchema, type ResolvedDocumentInput, type ResolvedDocumentOutput, type WrittenDocumentOutput, computeFormulaOperation, convertDocumentOperation, defineOperation, defineOperationWithoutOutputSchema, describeFontFileOperation, documentAppendParagraphsOperation, documentCreateOperation, docxExtrasOperation, fontsOperation, fromPackageOperation, inferFormatFromExtension, listDocumentConversionsOperation, metadataReadOperation, metadataWriteOperation, odbFormsOperation, odbQueryOperation, odbRenderReportOperation, odbReportsOperation, odbTablesOperation, odbToCsvOperation, odbToXlsxOperation, odmToPdfOperation, outlineDocumentOperation, pdfInspectOperation, resolveDocumentInput, resolveDocumentOutput, resolveOdbBytes };
|