@talonic/docs 0.21.5 → 0.21.7
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/content.js +91 -18
- package/dist/index.js +62 -3
- package/dist/index.js.map +1 -1
- package/dist/seo.js +249 -8
- package/dist/tailwind-preset.d.cts +45 -0
- package/dist/tailwind-preset.d.ts +45 -0
- package/openapi.json +249 -8
- package/package.json +1 -1
package/dist/content.js
CHANGED
|
@@ -11648,7 +11648,7 @@ var sections20 = [
|
|
|
11648
11648
|
params: [
|
|
11649
11649
|
{ name: "request_id", type: "string", description: "Unique request identifier for tracing." },
|
|
11650
11650
|
{ name: "status", type: "string", description: 'Always "processing" for asynchronous responses.' },
|
|
11651
|
-
{ name: "document", type: "object", description: "Source document summary: id, filename, pages." },
|
|
11651
|
+
{ name: "document", type: "object", description: "Source document summary: id, filename, pages, size_bytes." },
|
|
11652
11652
|
{ name: "poll_url", type: "string", description: "URL to poll for document processing status." },
|
|
11653
11653
|
{ name: "estimated_seconds", type: "integer", description: "Estimated processing time in seconds." },
|
|
11654
11654
|
{ name: "links", type: "object", description: "Related resource URLs: document, extractions, dashboard." }
|
|
@@ -11663,7 +11663,8 @@ var sections20 = [
|
|
|
11663
11663
|
"document": {
|
|
11664
11664
|
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
11665
11665
|
"filename": "large-report.pdf",
|
|
11666
|
-
"pages": 42
|
|
11666
|
+
"pages": 42,
|
|
11667
|
+
"size_bytes": 8912640
|
|
11667
11668
|
},
|
|
11668
11669
|
"poll_url": "/v1/documents/c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
11669
11670
|
"estimated_seconds": 63,
|
|
@@ -12073,7 +12074,8 @@ X-Talonic-Cells-Resolved-AI: 5`
|
|
|
12073
12074
|
"document": {
|
|
12074
12075
|
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
12075
12076
|
"filename": "large-report.pdf",
|
|
12076
|
-
"pages": 42
|
|
12077
|
+
"pages": 42,
|
|
12078
|
+
"size_bytes": 8912640
|
|
12077
12079
|
},
|
|
12078
12080
|
"poll_url": "/v1/documents/c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
12079
12081
|
"estimated_seconds": 63
|
|
@@ -14761,7 +14763,8 @@ var sections25 = [
|
|
|
14761
14763
|
title: "Response fields",
|
|
14762
14764
|
params: [
|
|
14763
14765
|
{ name: "document_id", type: "string", description: "UUID of the newly created document. Absent when the file is a duplicate." },
|
|
14764
|
-
{ name: "filename", type: "string", description: "Stored filename of the document." },
|
|
14766
|
+
{ name: "filename", type: "string", description: "Stored filename of the document. Also present on a `duplicate` response." },
|
|
14767
|
+
{ name: "size_bytes", type: "integer | null", description: "Uploaded file size in bytes. Present on both the `queued` and the `duplicate` response." },
|
|
14765
14768
|
{ name: "status", type: "string", description: "`queued` when accepted for processing, or `duplicate` if the file already exists." },
|
|
14766
14769
|
{ name: "processing_mode", type: "string", description: "`realtime` or `batch`: the mode the document was queued under." },
|
|
14767
14770
|
{ name: "source_id", type: "string", description: "ID of the source the document was ingested into." },
|
|
@@ -14776,6 +14779,7 @@ var sections25 = [
|
|
|
14776
14779
|
code: `{
|
|
14777
14780
|
"document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
|
|
14778
14781
|
"filename": "invoice-2024-09.pdf",
|
|
14782
|
+
"size_bytes": 204800,
|
|
14779
14783
|
"status": "queued",
|
|
14780
14784
|
"processing_mode": "realtime",
|
|
14781
14785
|
"source_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
@@ -14923,6 +14927,7 @@ var sections25 = [
|
|
|
14923
14927
|
params: [
|
|
14924
14928
|
{ name: "document_id", type: "string", description: "The created document UUID." },
|
|
14925
14929
|
{ name: "filename", type: "string", description: "The uploaded filename." },
|
|
14930
|
+
{ name: "size_bytes", type: "integer | null", description: "Uploaded file size in bytes." },
|
|
14926
14931
|
{ name: "status", type: "string", description: "`queued` when accepted for processing." },
|
|
14927
14932
|
{ name: "processing_mode", type: "string", description: "The mode the document will be processed in." },
|
|
14928
14933
|
{ name: "source_id", type: "string", description: "The source it was ingested into." },
|
|
@@ -14935,6 +14940,7 @@ var sections25 = [
|
|
|
14935
14940
|
code: `{
|
|
14936
14941
|
"document_id": "d4e5f6a7-b8c9-0123-defa-234567890123",
|
|
14937
14942
|
"filename": "contract-2024.pdf",
|
|
14943
|
+
"size_bytes": 204800,
|
|
14938
14944
|
"status": "queued",
|
|
14939
14945
|
"processing_mode": "realtime",
|
|
14940
14946
|
"source_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
@@ -15632,9 +15638,9 @@ var sections27 = [
|
|
|
15632
15638
|
parentSlug: "webhooks",
|
|
15633
15639
|
title: "Events",
|
|
15634
15640
|
seoTitle: "Webhook Events for Document Extraction \u2014 Talonic Docs",
|
|
15635
|
-
description: "Subscribe to
|
|
15641
|
+
description: "Subscribe to webhook events across the document lifecycle: extraction.complete, extraction.failed, job.complete, delivery.sent, run.completed, and more.",
|
|
15636
15642
|
content: [
|
|
15637
|
-
{ type: "paragraph", text: "**Webhook events** are real-time HTTP POST notifications that Talonic sends to your server when something happens to a document, extraction, or
|
|
15643
|
+
{ type: "paragraph", text: "**Webhook events** are real-time HTTP POST notifications that Talonic sends to your server when something happens to a document, extraction, job, or run. Instead of polling the API, you register a URL and receive a JSON payload within seconds of each event. Configure webhook URLs per-source or workspace-wide via [webhook configurations](create-webhook-config), or per-extraction via the `webhook_url` option on `POST /v1/extract`." },
|
|
15638
15644
|
{ type: "paragraph", text: "Available webhook events:" },
|
|
15639
15645
|
{ type: "list", items: [
|
|
15640
15646
|
"`document.uploaded` \u2014 A new document has been uploaded and queued for processing.",
|
|
@@ -15652,11 +15658,37 @@ var sections27 = [
|
|
|
15652
15658
|
"`delivery.sent` \u2014 An outbound delivery was sent successfully.",
|
|
15653
15659
|
"`delivery.failed` \u2014 An outbound delivery failed after all retry attempts.",
|
|
15654
15660
|
"`process.completed` \u2014 A document processing run finished all steps and the result is available.",
|
|
15655
|
-
"`process.failed` \u2014 A document processing run failed. The error payload includes the step name and error detail."
|
|
15661
|
+
"`process.failed` \u2014 A document processing run failed. The error payload includes the step name and error detail.",
|
|
15662
|
+
"`run.completed` \u2014 A `POST /v1/run` Spec pipeline finished; structured output is available (review-held fields null). The payload carries `records[]` \u2014 always an array, one `{document_id, filename, data}` entry per output row \u2014 alongside the legacy `structured_data` field kept for compatibility; prefer `records`.",
|
|
15663
|
+
"`run.failed` \u2014 A `POST /v1/run` Spec pipeline failed because every document errored during ingest or extraction. When the failure occurred at the ingest leg, the `error` payload includes `document_ids`, the best-effort list of documents that were being ingested."
|
|
15656
15664
|
] },
|
|
15657
15665
|
{ type: "paragraph", text: "Most integrations subscribe to `extraction.complete` to trigger downstream processing, for example writing structured data to a database or notifying a user. A typical workflow is to pass `webhook_url` on `POST /v1/extract`, then handle the callback payload in your server without polling. New webhook configurations subscribe to `extraction.complete` and `extraction.failed` by default." },
|
|
15658
15666
|
{ type: "paragraph", text: "The `data` object of each payload is event-specific. For `extraction.complete` it includes the `document_id`, `extraction_id`, `filename`, `field_count`, and `confidence_overall` score. Use the `extraction_id` to fetch the full result via `GET /v1/extractions/:id` when the payload does not contain all the fields you need." },
|
|
15659
15667
|
{ type: "paragraph", text: "Pair event handling with [Signature Verification](webhook-security) to ensure payloads are authentic. `extraction.failed` and `process.failed` events include an `error` field with a machine-readable code and human-readable message: use it to decide whether to retry via `POST /v1/extract` with `document_id`." },
|
|
15668
|
+
{
|
|
15669
|
+
type: "code",
|
|
15670
|
+
title: "run.completed payload",
|
|
15671
|
+
code: `{
|
|
15672
|
+
"event": "run.completed",
|
|
15673
|
+
"delivery_id": "dlv_a1b2c3d4e5f67890",
|
|
15674
|
+
"timestamp": "2026-07-14T21:06:48.977Z",
|
|
15675
|
+
"data": {
|
|
15676
|
+
"pipeline_id": "1a0c681d-ea20-4bb4-8892-01a6d7f834da",
|
|
15677
|
+
"schema_id": "1fc7807e-e1aa-4504-b796-5709986e78ed",
|
|
15678
|
+
"status": "completed",
|
|
15679
|
+
"records": [
|
|
15680
|
+
{
|
|
15681
|
+
"document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
15682
|
+
"filename": "invoice-0847.pdf",
|
|
15683
|
+
"data": { "vendor_name": "Acme Corp", "total_amount": 14250.00 }
|
|
15684
|
+
}
|
|
15685
|
+
],
|
|
15686
|
+
"structured_data": [
|
|
15687
|
+
{ "vendor_name": "Acme Corp", "total_amount": 14250.00 }
|
|
15688
|
+
]
|
|
15689
|
+
}
|
|
15690
|
+
}`
|
|
15691
|
+
},
|
|
15660
15692
|
{ type: "callout", variant: "warning", text: "Webhook URLs pointing at `localhost` or private network addresses (RFC 1918 ranges) are rejected by the SSRF guard at delivery time and the delivery is recorded as failed. Use a publicly reachable HTTPS endpoint in production." }
|
|
15661
15693
|
],
|
|
15662
15694
|
related: [
|
|
@@ -15666,12 +15698,13 @@ var sections27 = [
|
|
|
15666
15698
|
{ label: "Machine-Readable Reference Endpoints", slug: "webhook-reference-endpoints" }
|
|
15667
15699
|
],
|
|
15668
15700
|
faq: [
|
|
15669
|
-
{ question: "What webhook events does Talonic send?", answer: "
|
|
15701
|
+
{ question: "What webhook events does Talonic send?", answer: "Events spanning the document, job, and run lifecycle: document.uploaded, document.processing, document.classified, extraction.started, extraction.complete, extraction.failed, job.created, job.started, job.phase_complete, job.complete, job.failed, review.approved, delivery.sent, delivery.failed, process.completed, process.failed, run.completed, and run.failed." },
|
|
15670
15702
|
{ question: "How do I subscribe to Talonic webhook events?", answer: "Create a webhook configuration with POST /v1/webhooks, passing your endpoint URL and an events array. If you omit events, the webhook subscribes to extraction.complete and extraction.failed by default. For a one-off callback, pass webhook_url directly on POST /v1/extract." },
|
|
15671
15703
|
{ question: "What is in the extraction.complete webhook payload?", answer: "The payload body contains event, delivery_id, timestamp, and a data object with document_id, extraction_id, filename, field_count, and confidence_overall. Fetch the full extracted fields with GET /v1/extractions/:id using the extraction_id." },
|
|
15704
|
+
{ question: "What is in the run.completed webhook payload?", answer: "The data object carries pipeline_id, schema_id, status, and records[] \u2014 always an array, one {document_id, filename, data} entry per output row, regardless of whether the run processed one document or many. The legacy structured_data field (a flat object for a single-document run, an array for multi-document) is still emitted for compatibility, but records is the field to build on since it always carries per-row document attribution." },
|
|
15672
15705
|
{ question: "Can I get the list of supported events programmatically?", answer: "Yes. GET /v1/webhooks/events returns every supported event type with a description, so your integration can discover the catalog at runtime instead of hard-coding it." }
|
|
15673
15706
|
],
|
|
15674
|
-
mentions: ["webhook events", "real-time notifications", "extraction.complete", "event subscription", "HTTP POST callback", "document lifecycle"]
|
|
15707
|
+
mentions: ["webhook events", "real-time notifications", "extraction.complete", "event subscription", "HTTP POST callback", "document lifecycle", "run.completed", "run.failed", "records[]"]
|
|
15675
15708
|
},
|
|
15676
15709
|
{
|
|
15677
15710
|
slug: "webhook-security",
|
|
@@ -28803,6 +28836,7 @@ var sections50 = [
|
|
|
28803
28836
|
{ type: "paragraph", text: 'The **Run** endpoint, `POST /v1/run`, is the one-call front door for Spec pipelines: send one or more documents together with a `spec_id`, and the platform ingests every input, waits for OCR, compiles the Spec\'s saved rail into a pipeline, and starts it \u2014 extraction, resolution, validation, and delivery exactly as composed in the Spec editor. It replaces the two-step "upload documents, then `POST /v1/pipelines`" flow for integrations that push files as they arrive.' },
|
|
28804
28837
|
{ type: "paragraph", text: "Inputs are flexible: attach up to 20 `files` as multipart parts, pass remote `file_urls` for documents the platform should download, or mix both in one call. At least one input is required. The endpoint always answers `202 Accepted` immediately with a `run_id` and a `poll_url` \u2014 ingestion and the pipeline run continue asynchronously, so the caller never blocks on OCR or LLM work." },
|
|
28805
28838
|
{ type: "paragraph", text: "Two optional tagging fields ride along and are stamped on **every document** the call ingests: `batch_id`, an opaque grouping key for correlating the run with an external job or batch, and `metadata`, a flat key-value object for anything else the caller wants to carry through. Both are echoed back by `GET /v1/run/:id`, and both surface on the ingested documents (`batch_id` / `metadata` on the document reads)." },
|
|
28839
|
+
{ type: "paragraph", text: "The 202 response carries a `documents[]` array \u2014 one entry per input, in the order you sent them \u2014 so you always know which platform document each upload became. Each entry has `document_id`, `filename`, `size_bytes`, and `source` (`file` or `file_url`). `document_id` is the **canonical** document: for a byte-identical re-upload it resolves to the existing document already on the platform rather than minting a new one, and the entry additionally carries `deduplicated: true` plus `linked_document_id`, the id of the thin per-upload link row created for this call. A first-time upload carries `deduplicated: false` and no `linked_document_id`." },
|
|
28806
28840
|
{ type: "callout", variant: "info", text: "Unlike POST /v1/process, this endpoint does not deduplicate submissions \u2014 every call starts a fresh run. Byte-identical documents are still content-deduplicated at the ingestion layer (the run reads the canonical document's data)." },
|
|
28807
28841
|
{
|
|
28808
28842
|
type: "endpoint",
|
|
@@ -28846,7 +28880,14 @@ var sections50 = [
|
|
|
28846
28880
|
{ name: "spec_id", type: "uuid", description: "The Spec being run." },
|
|
28847
28881
|
{ name: "status", type: "string", description: "Always processing on acceptance." },
|
|
28848
28882
|
{ name: "input_count", type: "integer", description: "Total inputs accepted (files + file_urls)." },
|
|
28849
|
-
{ name: "poll_url", type: "string", description: "Relative URL to poll: /v1/run/:id." }
|
|
28883
|
+
{ name: "poll_url", type: "string", description: "Relative URL to poll: /v1/run/:id." },
|
|
28884
|
+
{ name: "documents[]", type: "array", description: "One entry per input, in input order." },
|
|
28885
|
+
{ name: "documents[].document_id", type: "uuid", description: "The canonical document id \u2014 the id output rows (webhook records[], data products) carry for this document." },
|
|
28886
|
+
{ name: "documents[].filename", type: "string | null", description: "The uploaded filename (file input), or the acquired document's filename (file_url input)." },
|
|
28887
|
+
{ name: "documents[].size_bytes", type: "integer | null", description: "File size in bytes." },
|
|
28888
|
+
{ name: "documents[].source", type: "string", description: '"file" or "file_url" \u2014 which input kind produced this document.' },
|
|
28889
|
+
{ name: "documents[].deduplicated", type: "boolean", description: "true when this upload content-matched an existing document; document_id then points at that existing (canonical) document." },
|
|
28890
|
+
{ name: "documents[].linked_document_id", type: "uuid", description: "Present only when deduplicated is true \u2014 the id of the thin link row created for this specific upload." }
|
|
28850
28891
|
]
|
|
28851
28892
|
},
|
|
28852
28893
|
{
|
|
@@ -28857,7 +28898,24 @@ var sections50 = [
|
|
|
28857
28898
|
"spec_id": "1fc7807e-e1aa-4504-b796-5709986e78ed",
|
|
28858
28899
|
"status": "processing",
|
|
28859
28900
|
"input_count": 2,
|
|
28860
|
-
"poll_url": "/v1/run/a8716d18-978d-4d19-8ca5-8b3784ca857c"
|
|
28901
|
+
"poll_url": "/v1/run/a8716d18-978d-4d19-8ca5-8b3784ca857c",
|
|
28902
|
+
"documents": [
|
|
28903
|
+
{
|
|
28904
|
+
"document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
28905
|
+
"filename": "invoice-0847.pdf",
|
|
28906
|
+
"size_bytes": 184320,
|
|
28907
|
+
"source": "file",
|
|
28908
|
+
"deduplicated": false
|
|
28909
|
+
},
|
|
28910
|
+
{
|
|
28911
|
+
"document_id": "9f1e2d3c-4b5a-6789-0123-456789abcdef",
|
|
28912
|
+
"filename": "msa-2026.pdf",
|
|
28913
|
+
"size_bytes": 92160,
|
|
28914
|
+
"source": "file_url",
|
|
28915
|
+
"deduplicated": true,
|
|
28916
|
+
"linked_document_id": "b7a6c5d4-e3f2-1098-7654-3210fedcba98"
|
|
28917
|
+
}
|
|
28918
|
+
]
|
|
28861
28919
|
}`
|
|
28862
28920
|
},
|
|
28863
28921
|
{ type: "callout", variant: "info", text: "For push-style consumption, subscribe to the run.completed / run.failed webhooks (POST /v1/webhooks), or configure a delivery binding on the document.structured signal to receive each document's structured fields as its own webhook payload the moment it finishes." },
|
|
@@ -28885,9 +28943,10 @@ var sections50 = [
|
|
|
28885
28943
|
{ question: "How do I get the results?", answer: "Three ways: poll GET /v1/run/:id until status reaches completed; subscribe to the run.completed webhook for a push notification; or configure a delivery binding on the document.structured signal to receive each document's structured fields as a payload at your destination the moment that document finishes." },
|
|
28886
28944
|
{ question: "What are batch_id and metadata for?", answer: "They are caller-owned tags. batch_id is an opaque grouping key (your ERP job number, import batch, ticket id); metadata is a flat key-value object for anything else. Both are stamped on every document the call ingests and echoed back when polling the run, so you can correlate platform output with your own systems without a lookup table." },
|
|
28887
28945
|
{ question: "Does polling count against my rate limit?", answer: "Polling GET /v1/run/:id is metered under the general read namespace, not the run submission namespace \u2014 frequent polling never burns your daily submission quota." },
|
|
28888
|
-
{ question: "What happens if I run out of credits?", answer: "The call is rejected up front with 402 insufficient_credits before any document is ingested \u2014 no partial run is created. Top up and resubmit the same call." }
|
|
28946
|
+
{ question: "What happens if I run out of credits?", answer: "The call is rejected up front with 402 insufficient_credits before any document is ingested \u2014 no partial run is created. Top up and resubmit the same call." },
|
|
28947
|
+
{ question: "How do I match run.completed results back to my uploads?", answer: "Use document_id. Each entry in the submit response's documents[] array carries the canonical document_id for that input, and each row in the run.completed webhook's records[] array carries the same document_id (plus filename) for the output it produced \u2014 join on that field to attribute a structured row back to the file or URL you sent. For a deduplicated upload (deduplicated: true), document_id points at the pre-existing canonical document, and linked_document_id identifies the link row created for this specific call." }
|
|
28889
28948
|
],
|
|
28890
|
-
mentions: ["spec", "pipeline run", "one-call ingest", "batch_id", "client metadata", "multipart upload", "file_urls", "webhook"]
|
|
28949
|
+
mentions: ["spec", "pipeline run", "one-call ingest", "batch_id", "client metadata", "multipart upload", "file_urls", "webhook", "documents[]", "deduplication", "linked_document_id"]
|
|
28891
28950
|
},
|
|
28892
28951
|
{
|
|
28893
28952
|
slug: "poll-spec-run",
|
|
@@ -28896,8 +28955,9 @@ var sections50 = [
|
|
|
28896
28955
|
seoTitle: "Poll a Spec Run \u2014 GET /v1/run/:id \u2014 Talonic Docs",
|
|
28897
28956
|
description: "Poll a /v1/run request by id: run status folded with live pipeline progress, per-document completion counts, and the echoed batch_id and metadata tags.",
|
|
28898
28957
|
content: [
|
|
28899
|
-
{ type: "paragraph", text: "The **Poll a Run** endpoint, `GET /v1/run/:id`, reads a `/v1/run` request by the `run_id` returned on submission. The response folds the request row together with the compiled pipeline's live progress
|
|
28958
|
+
{ type: "paragraph", text: "The **Poll a Run** endpoint, `GET /v1/run/:id`, reads a `/v1/run` request by the `run_id` returned on submission. The response folds the request row together with the compiled pipeline's live progress. The public status vocabulary is three states: `processing` covers both ingestion/OCR (before a pipeline exists) and the compiled pipeline actually executing, ending at `completed` or `failed`." },
|
|
28900
28959
|
{ type: "paragraph", text: "Once the pipeline exists, `pipeline_id` is set and a `progress` object reports per-document counts \u2014 how many documents finished, and how many errored. A run reports `failed` only when **every** document errored (no usable output); a run where some documents succeeded and some errored completes with the error count visible in `progress.error_documents`." },
|
|
28960
|
+
{ type: "paragraph", text: "The response also echoes `documents[]` \u2014 the same array returned at submission, each entry augmented with a per-document `status` (`processing`, `completed`, or `failed`) so you can tell which specific inputs are still in flight without waiting for the whole run to finish. `documents[]` is omitted for runs submitted before this field existed." },
|
|
28901
28961
|
{ type: "callout", variant: "info", text: "Poll this endpoint, not the pipeline: the run request is the stable public handle, and its status is folded live at read time. The same terminal states also fire the run.completed / run.failed webhooks, so poll or subscribe \u2014 whichever fits your integration." },
|
|
28902
28962
|
{
|
|
28903
28963
|
type: "endpoint",
|
|
@@ -28923,13 +28983,15 @@ var sections50 = [
|
|
|
28923
28983
|
params: [
|
|
28924
28984
|
{ name: "run_id", type: "uuid", description: "The run request id." },
|
|
28925
28985
|
{ name: "spec_id", type: "uuid", description: "The Spec being run." },
|
|
28926
|
-
{ name: "status", type: "string", description: "processing,
|
|
28986
|
+
{ name: "status", type: "string", description: "processing, completed, or failed. processing covers both the pre-pipeline ingestion/OCR wait and the pipeline actually executing." },
|
|
28927
28987
|
{ name: "pipeline_id", type: "uuid | null", description: "The compiled pipeline, once it exists." },
|
|
28928
28988
|
{ name: "input_count", type: "integer", description: "Total inputs accepted at submission." },
|
|
28929
28989
|
{ name: "batch_id", type: "string | null", description: "The caller grouping key supplied on submission, echoed back." },
|
|
28930
28990
|
{ name: "metadata", type: "object | null", description: "The validated flat metadata object supplied on submission, echoed back." },
|
|
28931
28991
|
{ name: "error_message", type: "string | null", description: "Populated when the run failed before a pipeline existed (e.g. every input failed OCR)." },
|
|
28932
28992
|
{ name: "progress", type: "object | null", description: "Present once the pipeline has started: total_documents, completed_documents, error_documents." },
|
|
28993
|
+
{ name: "documents[]", type: "array", description: "The submit-time documents[] array, each entry augmented with a per-document status. Omitted for runs submitted before this field existed." },
|
|
28994
|
+
{ name: "documents[].status", type: "string", description: "processing, completed, or failed for this specific document." },
|
|
28933
28995
|
{ name: "created_at", type: "string", description: "ISO 8601 submission timestamp." },
|
|
28934
28996
|
{ name: "updated_at", type: "string", description: "ISO 8601 last-transition timestamp." }
|
|
28935
28997
|
]
|
|
@@ -28950,6 +29012,16 @@ var sections50 = [
|
|
|
28950
29012
|
"completed_documents": 1,
|
|
28951
29013
|
"error_documents": 0
|
|
28952
29014
|
},
|
|
29015
|
+
"documents": [
|
|
29016
|
+
{
|
|
29017
|
+
"document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
29018
|
+
"filename": "invoice-0847.pdf",
|
|
29019
|
+
"size_bytes": 184320,
|
|
29020
|
+
"source": "file",
|
|
29021
|
+
"deduplicated": false,
|
|
29022
|
+
"status": "completed"
|
|
29023
|
+
}
|
|
29024
|
+
],
|
|
28953
29025
|
"created_at": "2026-07-14T21:04:11.312Z",
|
|
28954
29026
|
"updated_at": "2026-07-14T21:06:48.977Z"
|
|
28955
29027
|
}`
|
|
@@ -28970,11 +29042,12 @@ var sections50 = [
|
|
|
28970
29042
|
{ label: "Pipeline Progress", slug: "get-pipeline-progress" }
|
|
28971
29043
|
],
|
|
28972
29044
|
faq: [
|
|
28973
|
-
{ question: "What do the
|
|
29045
|
+
{ question: "What do the three statuses mean?", answer: "processing = the run is in flight \u2014 either ingestion/OCR before a pipeline exists, or the Spec's compiled pipeline actually executing (both fold to the same word); completed = the run finished with usable output; failed = no usable output (every document errored, or ingestion itself failed \u2014 see error_message)." },
|
|
28974
29046
|
{ question: "When does a run count as failed?", answer: "Only when every document errored. A partially successful run \u2014 some documents completed, some errored \u2014 reports completed, with the error count in progress.error_documents, and the failing documents visible on the pipeline." },
|
|
28975
|
-
{ question: "Where is the structured output?", answer: "Per document, at your delivery destinations: configure a binding on the document.structured signal (pipeline.capture deliverable) and each document's structured fields are pushed as a payload when it finishes. Alternatively read the pipeline's data product or record set via pipeline_id." }
|
|
29047
|
+
{ question: "Where is the structured output?", answer: "Per document, at your delivery destinations: configure a binding on the document.structured signal (pipeline.capture deliverable) and each document's structured fields are pushed as a payload when it finishes. Alternatively read the pipeline's data product or record set via pipeline_id, or subscribe to run.completed and read its records[] array." },
|
|
29048
|
+
{ question: "What does the per-document status in documents[] tell me?", answer: "Whether that specific input has finished, independent of the overall run: processing, completed, or failed. This lets you show progress for individual uploads in a multi-file run instead of waiting for every document to settle. It is derived from live pipeline-document state, so it can complete before the top-level run status does." }
|
|
28976
29049
|
],
|
|
28977
|
-
mentions: ["run status", "polling", "pipeline progress", "batch_id", "metadata echo", "run.completed webhook"]
|
|
29050
|
+
mentions: ["run status", "polling", "pipeline progress", "batch_id", "metadata echo", "run.completed webhook", "documents[] status"]
|
|
28978
29051
|
}
|
|
28979
29052
|
];
|
|
28980
29053
|
|
package/dist/index.js
CHANGED
|
@@ -1963,8 +1963,34 @@ function ApiReference({ LinkComponent }) {
|
|
|
1963
1963
|
"spec_id": "1fc7807e-e1aa-4504-b796-5709986e78ed",
|
|
1964
1964
|
"status": "processing",
|
|
1965
1965
|
"input_count": 1,
|
|
1966
|
-
"poll_url": "/v1/run/a8716d18-978d-4d19-8ca5-8b3784ca857c"
|
|
1966
|
+
"poll_url": "/v1/run/a8716d18-978d-4d19-8ca5-8b3784ca857c",
|
|
1967
|
+
"documents": [
|
|
1968
|
+
{
|
|
1969
|
+
"document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
1970
|
+
"filename": "invoice-0847.pdf",
|
|
1971
|
+
"size_bytes": 184320,
|
|
1972
|
+
"source": "file",
|
|
1973
|
+
"deduplicated": false
|
|
1974
|
+
}
|
|
1975
|
+
]
|
|
1967
1976
|
}` }),
|
|
1977
|
+
/* @__PURE__ */ jsxs5("p", { className: "text-[15px] text-void-text-secondary leading-relaxed my-3", children: [
|
|
1978
|
+
/* @__PURE__ */ jsx5("code", { children: "documents[]" }),
|
|
1979
|
+
" holds one entry per input, in input order. ",
|
|
1980
|
+
/* @__PURE__ */ jsx5("code", { children: "document_id" }),
|
|
1981
|
+
" is the ",
|
|
1982
|
+
/* @__PURE__ */ jsx5("strong", { children: "canonical" }),
|
|
1983
|
+
" document \u2014 the same id the ",
|
|
1984
|
+
/* @__PURE__ */ jsx5("code", { children: "run.completed" }),
|
|
1985
|
+
" webhook's",
|
|
1986
|
+
" ",
|
|
1987
|
+
/* @__PURE__ */ jsx5("code", { children: "records[]" }),
|
|
1988
|
+
" rows carry \u2014 so join on it to attribute output back to an upload. A byte-identical re-upload resolves to the existing canonical document instead of minting a new one: its entry carries ",
|
|
1989
|
+
/* @__PURE__ */ jsx5("code", { children: "deduplicated: true" }),
|
|
1990
|
+
" plus ",
|
|
1991
|
+
/* @__PURE__ */ jsx5("code", { children: "linked_document_id" }),
|
|
1992
|
+
", the id of the thin per-upload link row created for that call."
|
|
1993
|
+
] }),
|
|
1968
1994
|
/* @__PURE__ */ jsx5(
|
|
1969
1995
|
ParamTable,
|
|
1970
1996
|
{
|
|
@@ -2006,11 +2032,12 @@ function ApiReference({ LinkComponent }) {
|
|
|
2006
2032
|
{
|
|
2007
2033
|
title: "Response fields",
|
|
2008
2034
|
params: [
|
|
2009
|
-
{ name: "status", type: "string", description: "processing
|
|
2035
|
+
{ name: "status", type: "string", description: "processing | completed | failed. processing covers both the pre-pipeline ingest/OCR wait and the pipeline actually executing. failed means NO usable output \u2014 every document errored." },
|
|
2010
2036
|
{ name: "pipeline_id", type: "uuid | null", description: "The compiled pipeline, once it exists." },
|
|
2011
2037
|
{ name: "batch_id", type: "string | null", description: "The grouping key supplied on submission, echoed back." },
|
|
2012
2038
|
{ name: "metadata", type: "object | null", description: "The flat metadata object supplied on submission, echoed back." },
|
|
2013
|
-
{ name: "progress", type: "object | null", description: "Once the pipeline started: total_documents, completed_documents, error_documents." }
|
|
2039
|
+
{ name: "progress", type: "object | null", description: "Once the pipeline started: total_documents, completed_documents, error_documents." },
|
|
2040
|
+
{ name: "documents[]", type: "array", description: "The submit-time documents[] array, each entry augmented with a per-document status (processing | completed | failed). Omitted for runs submitted before this field existed." }
|
|
2014
2041
|
]
|
|
2015
2042
|
}
|
|
2016
2043
|
),
|
|
@@ -2027,6 +2054,16 @@ function ApiReference({ LinkComponent }) {
|
|
|
2027
2054
|
"completed_documents": 1,
|
|
2028
2055
|
"error_documents": 0
|
|
2029
2056
|
},
|
|
2057
|
+
"documents": [
|
|
2058
|
+
{
|
|
2059
|
+
"document_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
|
|
2060
|
+
"filename": "invoice-0847.pdf",
|
|
2061
|
+
"size_bytes": 184320,
|
|
2062
|
+
"source": "file",
|
|
2063
|
+
"deduplicated": false,
|
|
2064
|
+
"status": "completed"
|
|
2065
|
+
}
|
|
2066
|
+
],
|
|
2030
2067
|
"created_at": "2026-07-14T21:04:11.312Z",
|
|
2031
2068
|
"updated_at": "2026-07-14T21:06:48.977Z"
|
|
2032
2069
|
}` })
|
|
@@ -4126,6 +4163,28 @@ function ApiReference({ LinkComponent }) {
|
|
|
4126
4163
|
/* @__PURE__ */ jsxs5("tr", { className: "border-t border-void-border", children: [
|
|
4127
4164
|
/* @__PURE__ */ jsx5("td", { className: "px-4 py-3 font-mono text-[13px]", children: "process.failed" }),
|
|
4128
4165
|
/* @__PURE__ */ jsx5("td", { className: "px-4 py-3 text-void-text-secondary text-[13px]", children: "A document processing run failed. The error payload includes the step name and error detail." })
|
|
4166
|
+
] }),
|
|
4167
|
+
/* @__PURE__ */ jsxs5("tr", { className: "border-t border-void-border", children: [
|
|
4168
|
+
/* @__PURE__ */ jsx5("td", { className: "px-4 py-3 font-mono text-[13px]", children: "run.completed" }),
|
|
4169
|
+
/* @__PURE__ */ jsxs5("td", { className: "px-4 py-3 text-void-text-secondary text-[13px]", children: [
|
|
4170
|
+
"A POST /v1/run Spec pipeline finished; structured output is available (review-held fields null). The payload carries ",
|
|
4171
|
+
/* @__PURE__ */ jsx5(InlineCode, { children: "records[]" }),
|
|
4172
|
+
" \u2014 always an array, one ",
|
|
4173
|
+
/* @__PURE__ */ jsx5(InlineCode, { children: "{document_id, filename, data}" }),
|
|
4174
|
+
" entry per output row \u2014 alongside the legacy ",
|
|
4175
|
+
/* @__PURE__ */ jsx5(InlineCode, { children: "structured_data" }),
|
|
4176
|
+
" field kept for compatibility; prefer ",
|
|
4177
|
+
/* @__PURE__ */ jsx5(InlineCode, { children: "records" }),
|
|
4178
|
+
"."
|
|
4179
|
+
] })
|
|
4180
|
+
] }),
|
|
4181
|
+
/* @__PURE__ */ jsxs5("tr", { className: "border-t border-void-border", children: [
|
|
4182
|
+
/* @__PURE__ */ jsx5("td", { className: "px-4 py-3 font-mono text-[13px]", children: "run.failed" }),
|
|
4183
|
+
/* @__PURE__ */ jsxs5("td", { className: "px-4 py-3 text-void-text-secondary text-[13px]", children: [
|
|
4184
|
+
"A POST /v1/run Spec pipeline failed \u2014 every document errored during ingest or extraction. When the failure occurred at the ingest leg, the error payload includes ",
|
|
4185
|
+
/* @__PURE__ */ jsx5(InlineCode, { children: "document_ids" }),
|
|
4186
|
+
", the best-effort list of documents being ingested."
|
|
4187
|
+
] })
|
|
4129
4188
|
] })
|
|
4130
4189
|
] })
|
|
4131
4190
|
] }) }),
|