@docling/docling-client 2.142.0 → 2.145.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/PYTHON_CLIENT_PARITY.md +37 -2
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -113,6 +113,10 @@ interface ConvertDocumentsOptions {
|
|
|
113
113
|
from_formats?: InputFormat[];
|
|
114
114
|
to_formats?: OutputFormat[];
|
|
115
115
|
pipeline?: ProcessingPipeline;
|
|
116
|
+
/**
|
|
117
|
+
* Only convert a range of pages (1-based, inclusive). The service default
|
|
118
|
+
* is the whole document, which the client never sends explicitly.
|
|
119
|
+
*/
|
|
116
120
|
page_range?: [number, number];
|
|
117
121
|
do_ocr?: boolean;
|
|
118
122
|
force_ocr?: boolean;
|
|
@@ -543,6 +547,12 @@ type DocumentResultItem<TDocument = DoclingDocument> = ExportResult<TDocument>;
|
|
|
543
547
|
interface ZipArchiveResult {
|
|
544
548
|
kind: 'ZipArchiveResult';
|
|
545
549
|
content: Uint8Array | unknown;
|
|
550
|
+
/**
|
|
551
|
+
* Suggested download name for the archive, e.g. derived from the source
|
|
552
|
+
* document when the task had a single input. Absent or null when no specific
|
|
553
|
+
* name applies.
|
|
554
|
+
*/
|
|
555
|
+
filename?: string | null;
|
|
546
556
|
}
|
|
547
557
|
interface RemoteTargetResult {
|
|
548
558
|
kind: 'RemoteTargetResult';
|
package/dist/index.d.ts
CHANGED
|
@@ -113,6 +113,10 @@ interface ConvertDocumentsOptions {
|
|
|
113
113
|
from_formats?: InputFormat[];
|
|
114
114
|
to_formats?: OutputFormat[];
|
|
115
115
|
pipeline?: ProcessingPipeline;
|
|
116
|
+
/**
|
|
117
|
+
* Only convert a range of pages (1-based, inclusive). The service default
|
|
118
|
+
* is the whole document, which the client never sends explicitly.
|
|
119
|
+
*/
|
|
116
120
|
page_range?: [number, number];
|
|
117
121
|
do_ocr?: boolean;
|
|
118
122
|
force_ocr?: boolean;
|
|
@@ -543,6 +547,12 @@ type DocumentResultItem<TDocument = DoclingDocument> = ExportResult<TDocument>;
|
|
|
543
547
|
interface ZipArchiveResult {
|
|
544
548
|
kind: 'ZipArchiveResult';
|
|
545
549
|
content: Uint8Array | unknown;
|
|
550
|
+
/**
|
|
551
|
+
* Suggested download name for the archive, e.g. derived from the source
|
|
552
|
+
* document when the task had a single input. Absent or null when no specific
|
|
553
|
+
* name applies.
|
|
554
|
+
*/
|
|
555
|
+
filename?: string | null;
|
|
546
556
|
}
|
|
547
557
|
interface RemoteTargetResult {
|
|
548
558
|
kind: 'RemoteTargetResult';
|
package/dist/index.js
CHANGED
|
@@ -1118,6 +1118,9 @@ function applyPageLimits(options, pageRange, maxNumPages) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
if (effectiveRange !== void 0) {
|
|
1120
1120
|
validatePageRange(effectiveRange);
|
|
1121
|
+
if (options.page_range === void 0 && effectiveRange[0] === 1 && effectiveRange[1] === Number.MAX_SAFE_INTEGER) {
|
|
1122
|
+
return clone(options);
|
|
1123
|
+
}
|
|
1121
1124
|
return { ...clone(options), page_range: [...effectiveRange] };
|
|
1122
1125
|
}
|
|
1123
1126
|
return clone(options);
|