@docling/docling-client 2.138.0 → 2.140.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/dist/index.d.cts CHANGED
@@ -16,12 +16,17 @@ type InputFormat = 'docx' | 'doc' | 'rtf' | 'pptx' | 'ppt' | 'html' | 'mhtml' |
16
16
  type OutputFormat = 'md' | 'json' | 'yaml' | 'html' | 'html_split_page' | 'text' | 'doctags' | 'vtt' | 'doclang' | 'dclx' | 'chunks' | 'latex';
17
17
  type ProcessingPipeline = 'legacy' | 'standard' | 'native' | 'vlm' | 'asr';
18
18
  type TableMode = 'fast' | 'accurate';
19
+ type TableFormerMode = TableMode;
19
20
  type ImageExportMode = 'placeholder' | 'embedded' | 'referenced';
21
+ type ImageRefMode = ImageExportMode;
20
22
  type PdfBackend = 'pypdfium2' | 'docling_parse' | 'threaded_docling_parse' | '_docling_parse' | 'dlparse_v1' | 'dlparse_v2' | 'dlparse_v4';
21
23
  type VlmResponseFormat = 'doctags' | 'doclang' | 'markdown' | 'deepseekocr_markdown' | 'unlimited_ocr_markdown' | 'html' | 'otsl' | 'plaintext' | 'chandra_html' | 'dots_json' | 'nemotron_parse_v2' | 'mineru2';
24
+ type ResponseFormat = VlmResponseFormat;
22
25
  type VlmInferenceFramework = 'mlx' | 'transformers' | 'vllm';
26
+ type InferenceFramework = VlmInferenceFramework;
23
27
  type TransformersModelType = 'automodel' | 'automodel-causallm' | 'automodel-imagetexttotext';
24
28
  type LegacyVlmModelType = 'smoldocling' | 'smoldocling_vllm' | 'granite_vision' | 'granite_vision_vllm' | 'granite_vision_ollama' | 'got_ocr_2' | 'granite_docling' | 'granite_docling_vllm' | 'nanonets_ocr2' | 'nanonets_ocr2_vllm' | 'nanonets_ocr2_lmstudio' | 'glm_ocr' | 'glm_ocr_vllm' | 'lightonocr' | 'lightonocr_vllm' | 'deepseekocr_ollama';
29
+ type VlmModelType = LegacyVlmModelType;
25
30
  type PictureClassificationLabel = 'bar_chart' | 'box_plot' | 'flow_chart' | 'line_chart' | 'pie_chart' | 'scatter_plot' | 'table' | 'other_chart' | 'full_page_image' | 'page_thumbnail' | 'photograph' | 'chemistry_structure' | 'bar_code' | 'icon' | 'logo' | 'qr_code' | 'signature' | 'stamp' | 'engineering_drawing' | 'screenshot_from_computer' | 'screenshot_from_manual' | 'geographical_map' | 'topographical_map' | 'calendar' | 'crossword_puzzle' | 'music' | 'other' | 'cad_drawing' | 'electrical_diagram' | 'map' | 'heatmap' | 'chemistry_markush_structure' | 'chemistry_molecular_structure' | 'natural_image' | 'picture_group' | 'remote_sensing' | 'scatter_chart' | 'screenshot' | 'stacked_bar_chart' | 'stratigraphic_chart';
26
31
  /** @deprecated Prefer picture_description_preset or picture_description_custom_config. */
27
32
  interface PictureDescriptionLocal {
@@ -371,7 +376,15 @@ interface BatchConvertSourcesRequest<TTarget extends BatchTarget = BatchTarget>
371
376
  targets?: TTarget[];
372
377
  callbacks?: CallbackSpec[];
373
378
  }
374
- type ChunkerKind = 'hybrid' | 'hierarchical';
379
+ declare const ChunkerKind: {
380
+ readonly HYBRID: "hybrid";
381
+ readonly HIERARCHICAL: "hierarchical";
382
+ };
383
+ type ChunkerKind = (typeof ChunkerKind)[keyof typeof ChunkerKind];
384
+ declare const ChunkerType: {
385
+ readonly HYBRID: "hybrid";
386
+ readonly HIERARCHICAL: "hierarchical";
387
+ };
375
388
  type ChunkerType = ChunkerKind;
376
389
  interface ChunkingExportOptions {
377
390
  include_converted_doc?: boolean;
@@ -490,6 +503,8 @@ interface ConfidenceScores {
490
503
  low_score?: number | null;
491
504
  mean_grade?: QualityGrade;
492
505
  low_grade?: QualityGrade;
506
+ /** Per-page confidence breakdown keyed by 1-based page number. */
507
+ pages?: Record<number, ConfidenceScores> | null;
493
508
  }
494
509
  interface ErrorItem {
495
510
  component_type: DoclingComponentType;
@@ -667,11 +682,16 @@ interface TaskFailureResult {
667
682
  interface HealthCheckResponse {
668
683
  status: string;
669
684
  }
685
+ declare const StatusWatcherKind: {
686
+ readonly WEBSOCKET: "websocket";
687
+ readonly POLLING: "polling";
688
+ };
689
+ type StatusWatcherKind = (typeof StatusWatcherKind)[keyof typeof StatusWatcherKind];
670
690
  interface WaitForTaskOptions {
671
691
  timeoutMs?: number;
672
692
  pollIntervalMs?: number;
673
693
  serverWaitSeconds?: number;
674
- statusWatcher?: 'websocket' | 'polling';
694
+ statusWatcher?: StatusWatcherKind;
675
695
  signal?: AbortSignal;
676
696
  onStatus?: (status: TaskStatusResponse) => void | Promise<void>;
677
697
  }
@@ -754,7 +774,6 @@ declare class FetchTransport implements DoclingTransport {
754
774
  request<T>(request: DoclingTransportRequest): Promise<T>;
755
775
  }
756
776
 
757
- type StatusWatcherKind = 'websocket' | 'polling';
758
777
  interface WebSocketLike {
759
778
  readonly readyState: number;
760
779
  send(data: string): void;
@@ -1078,4 +1097,4 @@ declare function preflightFileSize(source: NormalizedSource, maxFileSize: number
1078
1097
  declare function appendFormValue(form: FormData, key: string, value: unknown): void;
1079
1098
  declare function fileSourceFromBinary(source: BinaryFileSource, signal?: AbortSignal): Promise<FileSource>;
1080
1099
 
1081
- export { type AnyHttpSourceRequest, type ArtifactAddressResolver, ArtifactDownloader, type ArtifactDownloaderOptions, type ArtifactRef, type ArtifactType, type AutoSubmitResult, type AzureBlobCoordinates, type AzureBlobSource, type AzureBlobSourceRequest, type AzureBlobTarget, type BaseChunkDocumentsRequest, type BaseChunkerOptions, type BaseChunkingOptions, type BaseProgress, type BatchConvertSourcesRequest, type BatchResultForTarget, type BatchSource, type BatchSourceRequestInput, type BatchSourceRequestItem, type BatchSubmitCallOptions, type BatchTarget, type BatchTargetRequest, type BatchTargetRequestInput, type BinaryFileSource, type CallbackSpec, type ChunkCallOptions, type ChunkDocumentResponse, type ChunkSourceOptions, type ChunkSourcesRequest, type ChunkedDocumentResult, type ChunkedDocumentResultItem, type ChunkerKind, type ChunkerType, type ChunkingExportOptions, type ChunkingOptionType, type ClearResponse, type ConfidenceScores, type ConversionInput, type ConversionItem, type ConversionResult, type ConversionSource, type ConversionSourceInput, type ConversionStatus, type ConvertAllOptions, type ConvertDocumentErrorResponse, type ConvertDocumentResponse, type ConvertDocumentResult, type ConvertDocumentsOptions, type ConvertDocumentsRequest, type ConvertOptions, type ConvertSourcesRequest, type ConvertedOutcomeCountsMixin, DEFAULT_MAX_CONCURRENCY, DoclingArtifactDownloadError, DoclingBatchConversionError, type DoclingBinaryResponse, DoclingClient, type DoclingClientOptions, type DoclingComponentType, DoclingConversionError, type DoclingDocument, DoclingError, DoclingHttpError, DoclingJob, DoclingProtocolError, type DoclingRequestBodyType, DoclingResponseSchemaMismatchError, type DoclingResponseType, DoclingResultExpiredError, DoclingResultNotReadyError, DoclingServiceError, DoclingServiceUnavailableError, DoclingTaskError, DoclingTaskNotFoundError, type DoclingTaskResult, DoclingTimeoutError, type DoclingTransport, type DoclingTransportRequest, DoclingUsageLimitExceededError, type DocumentArtifactItem, type DocumentCompletedItem, type DocumentLimits, type DocumentResultItem, type ErrorItem, type ExportDocumentResponse, type ExportResult, type FailureCategory, type FailurePhase, type FetchLike, FetchTransport, type FetchTransportOptions, type FileSource, type FileSourceRequest, type GenericChunkDocumentsRequest, type GenericSource, type GenericSourceRequest, type GenericTarget, type GenericTargetRequest, type GoogleCloudStorageCoordinates, type GoogleCloudStorageServiceAccountInfo, type GoogleCloudStorageSource, type GoogleCloudStorageSourceRequest, type GoogleCloudStorageTarget, type GoogleDriveCoordinates, type GoogleDriveCredentials, type GoogleDriveSource, type GoogleDriveSourceRequest, type GoogleDriveTarget, type HeadingHierarchyOptions, type HealthCheckResponse, type HierarchicalChunkSourcesRequest, type HierarchicalChunkerOptions, type HierarchicalChunkingOptions, type HttpSource, type HttpSourceRequest, type HybridChunkSourcesRequest, type HybridChunkerOptions, type HybridChunkingOptions, type ImageExportMode, type InBodyConversionResponse, type InBodyTarget, type InputFormat, type KnownBatchSourceRequestItem, type KnownBatchTargetRequest, type LegacyVlmModelType, MAX_CONCURRENCY_LIMIT, type MessageKind, type NormalizedJsonSource, type NormalizedMultipartSource, type NormalizedSource, type OutcomeCounts, type OutputFormat, type PdfBackend, type PictureClassificationLabel, type PictureDescriptionApi, type PictureDescriptionLocal, type PresignedArtifactResult, type PresignedUrlConvertDocumentResponse, type PresignedUrlConvertResponse, type PresignedUrlTarget, type ProcessedDocsItem, type ProcessingPipeline, type ProfilingItem, type ProfilingScope, type ProgressCallbackRequest, type ProgressCallbackResponse, type ProgressDocumentCompleted, type ProgressKind, type ProgressSetNumDocs, type ProgressTaskCompleted, type ProgressUpdateProcessed, type PublicFailureInfo, type PutTarget, type QualityGrade, type RawServiceResult, type ReadinessResponse, type RemoteTargetResponse, type RemoteTargetResult, type ResultType, type S3Coordinates, type S3Source, type S3SourceRequest, type S3Target, type SourceRequestItem, type StatusWatcherKind, type StorageTarget, type SubmitAndRetrieveOptions, type SubmitCallOptions, type SubmitResultForTarget, type SubmitSourceOptions, type SubmitTarget, type TableMode, type Target, TargetName, type TargetRequest, type TaskFailureResult, type TaskProcessingMeta, type TaskStatus, type TaskStatusResponse, type TaskType, type TransformersModelType, type UsageLimitExceededDetails, type UsageLimitExceededResponse, type VlmInferenceFramework, type VlmModelApi, type VlmModelLocal, type VlmResponseFormat, type WaitForTaskOptions, type WatchTaskOptions, type WebSocketFactory, type WebSocketFactoryOptions, type WebSocketLike, type WebsocketMessage, type ZipArchiveResult, type ZipTarget, appendFormValue, applyPageLimits, documentFromBundle, documentFromJson, fileSourceFromBinary, materializePresignedResult, normalizeSourceInput, preflightFileSize, resolveConvertOptions, selectDocumentArtifact, validateConvertOptions, validateMaxFileSize, watchTask, withJsonOutput };
1100
+ export { type AnyHttpSourceRequest, type ArtifactAddressResolver, ArtifactDownloader, type ArtifactDownloaderOptions, type ArtifactRef, type ArtifactType, type AutoSubmitResult, type AzureBlobCoordinates, type AzureBlobSource, type AzureBlobSourceRequest, type AzureBlobTarget, type BaseChunkDocumentsRequest, type BaseChunkerOptions, type BaseChunkingOptions, type BaseProgress, type BatchConvertSourcesRequest, type BatchResultForTarget, type BatchSource, type BatchSourceRequestInput, type BatchSourceRequestItem, type BatchSubmitCallOptions, type BatchTarget, type BatchTargetRequest, type BatchTargetRequestInput, type BinaryFileSource, type CallbackSpec, type ChunkCallOptions, type ChunkDocumentResponse, type ChunkSourceOptions, type ChunkSourcesRequest, type ChunkedDocumentResult, type ChunkedDocumentResultItem, ChunkerKind, ChunkerType, type ChunkingExportOptions, type ChunkingOptionType, type ClearResponse, type ConfidenceScores, type ConversionInput, type ConversionItem, type ConversionResult, type ConversionSource, type ConversionSourceInput, type ConversionStatus, type ConvertAllOptions, type ConvertDocumentErrorResponse, type ConvertDocumentResponse, type ConvertDocumentResult, type ConvertDocumentsOptions, type ConvertDocumentsRequest, type ConvertOptions, type ConvertSourcesRequest, type ConvertedOutcomeCountsMixin, DEFAULT_MAX_CONCURRENCY, DoclingArtifactDownloadError, DoclingBatchConversionError, type DoclingBinaryResponse, DoclingClient, type DoclingClientOptions, type DoclingComponentType, DoclingConversionError, type DoclingDocument, DoclingError, DoclingHttpError, DoclingJob, DoclingProtocolError, type DoclingRequestBodyType, DoclingResponseSchemaMismatchError, type DoclingResponseType, DoclingResultExpiredError, DoclingResultNotReadyError, DoclingServiceError, DoclingServiceUnavailableError, DoclingTaskError, DoclingTaskNotFoundError, type DoclingTaskResult, DoclingTimeoutError, type DoclingTransport, type DoclingTransportRequest, DoclingUsageLimitExceededError, type DocumentArtifactItem, type DocumentCompletedItem, type DocumentLimits, type DocumentResultItem, type ErrorItem, type ExportDocumentResponse, type ExportResult, type FailureCategory, type FailurePhase, type FetchLike, FetchTransport, type FetchTransportOptions, type FileSource, type FileSourceRequest, type GenericChunkDocumentsRequest, type GenericSource, type GenericSourceRequest, type GenericTarget, type GenericTargetRequest, type GoogleCloudStorageCoordinates, type GoogleCloudStorageServiceAccountInfo, type GoogleCloudStorageSource, type GoogleCloudStorageSourceRequest, type GoogleCloudStorageTarget, type GoogleDriveCoordinates, type GoogleDriveCredentials, type GoogleDriveSource, type GoogleDriveSourceRequest, type GoogleDriveTarget, type HeadingHierarchyOptions, type HealthCheckResponse, type HierarchicalChunkSourcesRequest, type HierarchicalChunkerOptions, type HierarchicalChunkingOptions, type HttpSource, type HttpSourceRequest, type HybridChunkSourcesRequest, type HybridChunkerOptions, type HybridChunkingOptions, type ImageExportMode, type ImageRefMode, type InBodyConversionResponse, type InBodyTarget, type InferenceFramework, type InputFormat, type KnownBatchSourceRequestItem, type KnownBatchTargetRequest, type LegacyVlmModelType, MAX_CONCURRENCY_LIMIT, type MessageKind, type NormalizedJsonSource, type NormalizedMultipartSource, type NormalizedSource, type OutcomeCounts, type OutputFormat, type PdfBackend, type PictureClassificationLabel, type PictureDescriptionApi, type PictureDescriptionLocal, type PresignedArtifactResult, type PresignedUrlConvertDocumentResponse, type PresignedUrlConvertResponse, type PresignedUrlTarget, type ProcessedDocsItem, type ProcessingPipeline, type ProfilingItem, type ProfilingScope, type ProgressCallbackRequest, type ProgressCallbackResponse, type ProgressDocumentCompleted, type ProgressKind, type ProgressSetNumDocs, type ProgressTaskCompleted, type ProgressUpdateProcessed, type PublicFailureInfo, type PutTarget, type QualityGrade, type RawServiceResult, type ReadinessResponse, type RemoteTargetResponse, type RemoteTargetResult, type ResponseFormat, type ResultType, type S3Coordinates, type S3Source, type S3SourceRequest, type S3Target, type SourceRequestItem, StatusWatcherKind, type StorageTarget, type SubmitAndRetrieveOptions, type SubmitCallOptions, type SubmitResultForTarget, type SubmitSourceOptions, type SubmitTarget, type TableFormerMode, type TableMode, type Target, TargetName, type TargetRequest, type TaskFailureResult, type TaskProcessingMeta, type TaskStatus, type TaskStatusResponse, type TaskType, type TransformersModelType, type UsageLimitExceededDetails, type UsageLimitExceededResponse, type VlmInferenceFramework, type VlmModelApi, type VlmModelLocal, type VlmModelType, type VlmResponseFormat, type WaitForTaskOptions, type WatchTaskOptions, type WebSocketFactory, type WebSocketFactoryOptions, type WebSocketLike, type WebsocketMessage, type ZipArchiveResult, type ZipTarget, appendFormValue, applyPageLimits, documentFromBundle, documentFromJson, fileSourceFromBinary, materializePresignedResult, normalizeSourceInput, preflightFileSize, resolveConvertOptions, selectDocumentArtifact, validateConvertOptions, validateMaxFileSize, watchTask, withJsonOutput };
package/dist/index.d.ts CHANGED
@@ -16,12 +16,17 @@ type InputFormat = 'docx' | 'doc' | 'rtf' | 'pptx' | 'ppt' | 'html' | 'mhtml' |
16
16
  type OutputFormat = 'md' | 'json' | 'yaml' | 'html' | 'html_split_page' | 'text' | 'doctags' | 'vtt' | 'doclang' | 'dclx' | 'chunks' | 'latex';
17
17
  type ProcessingPipeline = 'legacy' | 'standard' | 'native' | 'vlm' | 'asr';
18
18
  type TableMode = 'fast' | 'accurate';
19
+ type TableFormerMode = TableMode;
19
20
  type ImageExportMode = 'placeholder' | 'embedded' | 'referenced';
21
+ type ImageRefMode = ImageExportMode;
20
22
  type PdfBackend = 'pypdfium2' | 'docling_parse' | 'threaded_docling_parse' | '_docling_parse' | 'dlparse_v1' | 'dlparse_v2' | 'dlparse_v4';
21
23
  type VlmResponseFormat = 'doctags' | 'doclang' | 'markdown' | 'deepseekocr_markdown' | 'unlimited_ocr_markdown' | 'html' | 'otsl' | 'plaintext' | 'chandra_html' | 'dots_json' | 'nemotron_parse_v2' | 'mineru2';
24
+ type ResponseFormat = VlmResponseFormat;
22
25
  type VlmInferenceFramework = 'mlx' | 'transformers' | 'vllm';
26
+ type InferenceFramework = VlmInferenceFramework;
23
27
  type TransformersModelType = 'automodel' | 'automodel-causallm' | 'automodel-imagetexttotext';
24
28
  type LegacyVlmModelType = 'smoldocling' | 'smoldocling_vllm' | 'granite_vision' | 'granite_vision_vllm' | 'granite_vision_ollama' | 'got_ocr_2' | 'granite_docling' | 'granite_docling_vllm' | 'nanonets_ocr2' | 'nanonets_ocr2_vllm' | 'nanonets_ocr2_lmstudio' | 'glm_ocr' | 'glm_ocr_vllm' | 'lightonocr' | 'lightonocr_vllm' | 'deepseekocr_ollama';
29
+ type VlmModelType = LegacyVlmModelType;
25
30
  type PictureClassificationLabel = 'bar_chart' | 'box_plot' | 'flow_chart' | 'line_chart' | 'pie_chart' | 'scatter_plot' | 'table' | 'other_chart' | 'full_page_image' | 'page_thumbnail' | 'photograph' | 'chemistry_structure' | 'bar_code' | 'icon' | 'logo' | 'qr_code' | 'signature' | 'stamp' | 'engineering_drawing' | 'screenshot_from_computer' | 'screenshot_from_manual' | 'geographical_map' | 'topographical_map' | 'calendar' | 'crossword_puzzle' | 'music' | 'other' | 'cad_drawing' | 'electrical_diagram' | 'map' | 'heatmap' | 'chemistry_markush_structure' | 'chemistry_molecular_structure' | 'natural_image' | 'picture_group' | 'remote_sensing' | 'scatter_chart' | 'screenshot' | 'stacked_bar_chart' | 'stratigraphic_chart';
26
31
  /** @deprecated Prefer picture_description_preset or picture_description_custom_config. */
27
32
  interface PictureDescriptionLocal {
@@ -371,7 +376,15 @@ interface BatchConvertSourcesRequest<TTarget extends BatchTarget = BatchTarget>
371
376
  targets?: TTarget[];
372
377
  callbacks?: CallbackSpec[];
373
378
  }
374
- type ChunkerKind = 'hybrid' | 'hierarchical';
379
+ declare const ChunkerKind: {
380
+ readonly HYBRID: "hybrid";
381
+ readonly HIERARCHICAL: "hierarchical";
382
+ };
383
+ type ChunkerKind = (typeof ChunkerKind)[keyof typeof ChunkerKind];
384
+ declare const ChunkerType: {
385
+ readonly HYBRID: "hybrid";
386
+ readonly HIERARCHICAL: "hierarchical";
387
+ };
375
388
  type ChunkerType = ChunkerKind;
376
389
  interface ChunkingExportOptions {
377
390
  include_converted_doc?: boolean;
@@ -490,6 +503,8 @@ interface ConfidenceScores {
490
503
  low_score?: number | null;
491
504
  mean_grade?: QualityGrade;
492
505
  low_grade?: QualityGrade;
506
+ /** Per-page confidence breakdown keyed by 1-based page number. */
507
+ pages?: Record<number, ConfidenceScores> | null;
493
508
  }
494
509
  interface ErrorItem {
495
510
  component_type: DoclingComponentType;
@@ -667,11 +682,16 @@ interface TaskFailureResult {
667
682
  interface HealthCheckResponse {
668
683
  status: string;
669
684
  }
685
+ declare const StatusWatcherKind: {
686
+ readonly WEBSOCKET: "websocket";
687
+ readonly POLLING: "polling";
688
+ };
689
+ type StatusWatcherKind = (typeof StatusWatcherKind)[keyof typeof StatusWatcherKind];
670
690
  interface WaitForTaskOptions {
671
691
  timeoutMs?: number;
672
692
  pollIntervalMs?: number;
673
693
  serverWaitSeconds?: number;
674
- statusWatcher?: 'websocket' | 'polling';
694
+ statusWatcher?: StatusWatcherKind;
675
695
  signal?: AbortSignal;
676
696
  onStatus?: (status: TaskStatusResponse) => void | Promise<void>;
677
697
  }
@@ -754,7 +774,6 @@ declare class FetchTransport implements DoclingTransport {
754
774
  request<T>(request: DoclingTransportRequest): Promise<T>;
755
775
  }
756
776
 
757
- type StatusWatcherKind = 'websocket' | 'polling';
758
777
  interface WebSocketLike {
759
778
  readonly readyState: number;
760
779
  send(data: string): void;
@@ -1078,4 +1097,4 @@ declare function preflightFileSize(source: NormalizedSource, maxFileSize: number
1078
1097
  declare function appendFormValue(form: FormData, key: string, value: unknown): void;
1079
1098
  declare function fileSourceFromBinary(source: BinaryFileSource, signal?: AbortSignal): Promise<FileSource>;
1080
1099
 
1081
- export { type AnyHttpSourceRequest, type ArtifactAddressResolver, ArtifactDownloader, type ArtifactDownloaderOptions, type ArtifactRef, type ArtifactType, type AutoSubmitResult, type AzureBlobCoordinates, type AzureBlobSource, type AzureBlobSourceRequest, type AzureBlobTarget, type BaseChunkDocumentsRequest, type BaseChunkerOptions, type BaseChunkingOptions, type BaseProgress, type BatchConvertSourcesRequest, type BatchResultForTarget, type BatchSource, type BatchSourceRequestInput, type BatchSourceRequestItem, type BatchSubmitCallOptions, type BatchTarget, type BatchTargetRequest, type BatchTargetRequestInput, type BinaryFileSource, type CallbackSpec, type ChunkCallOptions, type ChunkDocumentResponse, type ChunkSourceOptions, type ChunkSourcesRequest, type ChunkedDocumentResult, type ChunkedDocumentResultItem, type ChunkerKind, type ChunkerType, type ChunkingExportOptions, type ChunkingOptionType, type ClearResponse, type ConfidenceScores, type ConversionInput, type ConversionItem, type ConversionResult, type ConversionSource, type ConversionSourceInput, type ConversionStatus, type ConvertAllOptions, type ConvertDocumentErrorResponse, type ConvertDocumentResponse, type ConvertDocumentResult, type ConvertDocumentsOptions, type ConvertDocumentsRequest, type ConvertOptions, type ConvertSourcesRequest, type ConvertedOutcomeCountsMixin, DEFAULT_MAX_CONCURRENCY, DoclingArtifactDownloadError, DoclingBatchConversionError, type DoclingBinaryResponse, DoclingClient, type DoclingClientOptions, type DoclingComponentType, DoclingConversionError, type DoclingDocument, DoclingError, DoclingHttpError, DoclingJob, DoclingProtocolError, type DoclingRequestBodyType, DoclingResponseSchemaMismatchError, type DoclingResponseType, DoclingResultExpiredError, DoclingResultNotReadyError, DoclingServiceError, DoclingServiceUnavailableError, DoclingTaskError, DoclingTaskNotFoundError, type DoclingTaskResult, DoclingTimeoutError, type DoclingTransport, type DoclingTransportRequest, DoclingUsageLimitExceededError, type DocumentArtifactItem, type DocumentCompletedItem, type DocumentLimits, type DocumentResultItem, type ErrorItem, type ExportDocumentResponse, type ExportResult, type FailureCategory, type FailurePhase, type FetchLike, FetchTransport, type FetchTransportOptions, type FileSource, type FileSourceRequest, type GenericChunkDocumentsRequest, type GenericSource, type GenericSourceRequest, type GenericTarget, type GenericTargetRequest, type GoogleCloudStorageCoordinates, type GoogleCloudStorageServiceAccountInfo, type GoogleCloudStorageSource, type GoogleCloudStorageSourceRequest, type GoogleCloudStorageTarget, type GoogleDriveCoordinates, type GoogleDriveCredentials, type GoogleDriveSource, type GoogleDriveSourceRequest, type GoogleDriveTarget, type HeadingHierarchyOptions, type HealthCheckResponse, type HierarchicalChunkSourcesRequest, type HierarchicalChunkerOptions, type HierarchicalChunkingOptions, type HttpSource, type HttpSourceRequest, type HybridChunkSourcesRequest, type HybridChunkerOptions, type HybridChunkingOptions, type ImageExportMode, type InBodyConversionResponse, type InBodyTarget, type InputFormat, type KnownBatchSourceRequestItem, type KnownBatchTargetRequest, type LegacyVlmModelType, MAX_CONCURRENCY_LIMIT, type MessageKind, type NormalizedJsonSource, type NormalizedMultipartSource, type NormalizedSource, type OutcomeCounts, type OutputFormat, type PdfBackend, type PictureClassificationLabel, type PictureDescriptionApi, type PictureDescriptionLocal, type PresignedArtifactResult, type PresignedUrlConvertDocumentResponse, type PresignedUrlConvertResponse, type PresignedUrlTarget, type ProcessedDocsItem, type ProcessingPipeline, type ProfilingItem, type ProfilingScope, type ProgressCallbackRequest, type ProgressCallbackResponse, type ProgressDocumentCompleted, type ProgressKind, type ProgressSetNumDocs, type ProgressTaskCompleted, type ProgressUpdateProcessed, type PublicFailureInfo, type PutTarget, type QualityGrade, type RawServiceResult, type ReadinessResponse, type RemoteTargetResponse, type RemoteTargetResult, type ResultType, type S3Coordinates, type S3Source, type S3SourceRequest, type S3Target, type SourceRequestItem, type StatusWatcherKind, type StorageTarget, type SubmitAndRetrieveOptions, type SubmitCallOptions, type SubmitResultForTarget, type SubmitSourceOptions, type SubmitTarget, type TableMode, type Target, TargetName, type TargetRequest, type TaskFailureResult, type TaskProcessingMeta, type TaskStatus, type TaskStatusResponse, type TaskType, type TransformersModelType, type UsageLimitExceededDetails, type UsageLimitExceededResponse, type VlmInferenceFramework, type VlmModelApi, type VlmModelLocal, type VlmResponseFormat, type WaitForTaskOptions, type WatchTaskOptions, type WebSocketFactory, type WebSocketFactoryOptions, type WebSocketLike, type WebsocketMessage, type ZipArchiveResult, type ZipTarget, appendFormValue, applyPageLimits, documentFromBundle, documentFromJson, fileSourceFromBinary, materializePresignedResult, normalizeSourceInput, preflightFileSize, resolveConvertOptions, selectDocumentArtifact, validateConvertOptions, validateMaxFileSize, watchTask, withJsonOutput };
1100
+ export { type AnyHttpSourceRequest, type ArtifactAddressResolver, ArtifactDownloader, type ArtifactDownloaderOptions, type ArtifactRef, type ArtifactType, type AutoSubmitResult, type AzureBlobCoordinates, type AzureBlobSource, type AzureBlobSourceRequest, type AzureBlobTarget, type BaseChunkDocumentsRequest, type BaseChunkerOptions, type BaseChunkingOptions, type BaseProgress, type BatchConvertSourcesRequest, type BatchResultForTarget, type BatchSource, type BatchSourceRequestInput, type BatchSourceRequestItem, type BatchSubmitCallOptions, type BatchTarget, type BatchTargetRequest, type BatchTargetRequestInput, type BinaryFileSource, type CallbackSpec, type ChunkCallOptions, type ChunkDocumentResponse, type ChunkSourceOptions, type ChunkSourcesRequest, type ChunkedDocumentResult, type ChunkedDocumentResultItem, ChunkerKind, ChunkerType, type ChunkingExportOptions, type ChunkingOptionType, type ClearResponse, type ConfidenceScores, type ConversionInput, type ConversionItem, type ConversionResult, type ConversionSource, type ConversionSourceInput, type ConversionStatus, type ConvertAllOptions, type ConvertDocumentErrorResponse, type ConvertDocumentResponse, type ConvertDocumentResult, type ConvertDocumentsOptions, type ConvertDocumentsRequest, type ConvertOptions, type ConvertSourcesRequest, type ConvertedOutcomeCountsMixin, DEFAULT_MAX_CONCURRENCY, DoclingArtifactDownloadError, DoclingBatchConversionError, type DoclingBinaryResponse, DoclingClient, type DoclingClientOptions, type DoclingComponentType, DoclingConversionError, type DoclingDocument, DoclingError, DoclingHttpError, DoclingJob, DoclingProtocolError, type DoclingRequestBodyType, DoclingResponseSchemaMismatchError, type DoclingResponseType, DoclingResultExpiredError, DoclingResultNotReadyError, DoclingServiceError, DoclingServiceUnavailableError, DoclingTaskError, DoclingTaskNotFoundError, type DoclingTaskResult, DoclingTimeoutError, type DoclingTransport, type DoclingTransportRequest, DoclingUsageLimitExceededError, type DocumentArtifactItem, type DocumentCompletedItem, type DocumentLimits, type DocumentResultItem, type ErrorItem, type ExportDocumentResponse, type ExportResult, type FailureCategory, type FailurePhase, type FetchLike, FetchTransport, type FetchTransportOptions, type FileSource, type FileSourceRequest, type GenericChunkDocumentsRequest, type GenericSource, type GenericSourceRequest, type GenericTarget, type GenericTargetRequest, type GoogleCloudStorageCoordinates, type GoogleCloudStorageServiceAccountInfo, type GoogleCloudStorageSource, type GoogleCloudStorageSourceRequest, type GoogleCloudStorageTarget, type GoogleDriveCoordinates, type GoogleDriveCredentials, type GoogleDriveSource, type GoogleDriveSourceRequest, type GoogleDriveTarget, type HeadingHierarchyOptions, type HealthCheckResponse, type HierarchicalChunkSourcesRequest, type HierarchicalChunkerOptions, type HierarchicalChunkingOptions, type HttpSource, type HttpSourceRequest, type HybridChunkSourcesRequest, type HybridChunkerOptions, type HybridChunkingOptions, type ImageExportMode, type ImageRefMode, type InBodyConversionResponse, type InBodyTarget, type InferenceFramework, type InputFormat, type KnownBatchSourceRequestItem, type KnownBatchTargetRequest, type LegacyVlmModelType, MAX_CONCURRENCY_LIMIT, type MessageKind, type NormalizedJsonSource, type NormalizedMultipartSource, type NormalizedSource, type OutcomeCounts, type OutputFormat, type PdfBackend, type PictureClassificationLabel, type PictureDescriptionApi, type PictureDescriptionLocal, type PresignedArtifactResult, type PresignedUrlConvertDocumentResponse, type PresignedUrlConvertResponse, type PresignedUrlTarget, type ProcessedDocsItem, type ProcessingPipeline, type ProfilingItem, type ProfilingScope, type ProgressCallbackRequest, type ProgressCallbackResponse, type ProgressDocumentCompleted, type ProgressKind, type ProgressSetNumDocs, type ProgressTaskCompleted, type ProgressUpdateProcessed, type PublicFailureInfo, type PutTarget, type QualityGrade, type RawServiceResult, type ReadinessResponse, type RemoteTargetResponse, type RemoteTargetResult, type ResponseFormat, type ResultType, type S3Coordinates, type S3Source, type S3SourceRequest, type S3Target, type SourceRequestItem, StatusWatcherKind, type StorageTarget, type SubmitAndRetrieveOptions, type SubmitCallOptions, type SubmitResultForTarget, type SubmitSourceOptions, type SubmitTarget, type TableFormerMode, type TableMode, type Target, TargetName, type TargetRequest, type TaskFailureResult, type TaskProcessingMeta, type TaskStatus, type TaskStatusResponse, type TaskType, type TransformersModelType, type UsageLimitExceededDetails, type UsageLimitExceededResponse, type VlmInferenceFramework, type VlmModelApi, type VlmModelLocal, type VlmModelType, type VlmResponseFormat, type WaitForTaskOptions, type WatchTaskOptions, type WebSocketFactory, type WebSocketFactoryOptions, type WebSocketLike, type WebsocketMessage, type ZipArchiveResult, type ZipTarget, appendFormValue, applyPageLimits, documentFromBundle, documentFromJson, fileSourceFromBinary, materializePresignedResult, normalizeSourceInput, preflightFileSize, resolveConvertOptions, selectDocumentArtifact, validateConvertOptions, validateMaxFileSize, watchTask, withJsonOutput };
package/dist/index.js CHANGED
@@ -1940,6 +1940,24 @@ var TransportTimeoutError = class extends Error {
1940
1940
 
1941
1941
  // src/watchers.ts
1942
1942
  import WebSocket from "isomorphic-ws";
1943
+
1944
+ // src/types.ts
1945
+ var ChunkerKind = {
1946
+ HYBRID: "hybrid",
1947
+ HIERARCHICAL: "hierarchical"
1948
+ };
1949
+ var ChunkerType = ChunkerKind;
1950
+ var TargetName = {
1951
+ INBODY: "inbody",
1952
+ PRESIGNED_URL: "presigned_url",
1953
+ ZIP: "zip"
1954
+ };
1955
+ var StatusWatcherKind = {
1956
+ WEBSOCKET: "websocket",
1957
+ POLLING: "polling"
1958
+ };
1959
+
1960
+ // src/watchers.ts
1943
1961
  async function* watchTask(options) {
1944
1962
  if (options.watcher === "polling") {
1945
1963
  yield* pollUpdates(options);
@@ -3589,6 +3607,17 @@ function parseConfidence(value, path) {
3589
3607
  throw schemaMismatch(`${path}.${field} is unsupported`);
3590
3608
  }
3591
3609
  }
3610
+ if (value.pages !== void 0 && value.pages !== null) {
3611
+ if (!isRecord4(value.pages)) {
3612
+ throw schemaMismatch(`${path}.pages must be an object or null`);
3613
+ }
3614
+ for (const [pageKey, pageValue] of Object.entries(value.pages)) {
3615
+ if (!Number.isSafeInteger(Number(pageKey))) {
3616
+ throw schemaMismatch(`${path}.pages key must be an integer`);
3617
+ }
3618
+ parseConfidence(pageValue, `${path}.pages[${pageKey}]`);
3619
+ }
3620
+ }
3592
3621
  return value;
3593
3622
  }
3594
3623
  function schemaMismatch(message) {
@@ -4122,15 +4151,10 @@ async function* mapSourcesToItems(sources, options, headers) {
4122
4151
  function isRecord4(value) {
4123
4152
  return value !== null && typeof value === "object" && !Array.isArray(value);
4124
4153
  }
4125
-
4126
- // src/types.ts
4127
- var TargetName = {
4128
- INBODY: "inbody",
4129
- PRESIGNED_URL: "presigned_url",
4130
- ZIP: "zip"
4131
- };
4132
4154
  export {
4133
4155
  ArtifactDownloader,
4156
+ ChunkerKind,
4157
+ ChunkerType,
4134
4158
  DEFAULT_MAX_CONCURRENCY,
4135
4159
  DoclingArtifactDownloadError,
4136
4160
  DoclingBatchConversionError,
@@ -4151,6 +4175,7 @@ export {
4151
4175
  DoclingUsageLimitExceededError,
4152
4176
  FetchTransport,
4153
4177
  MAX_CONCURRENCY_LIMIT,
4178
+ StatusWatcherKind,
4154
4179
  TargetName,
4155
4180
  appendFormValue,
4156
4181
  applyPageLimits,