@talonic/docs 0.21.14 → 0.21.15
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/seo.js +6 -6
- package/openapi.json +6 -6
- package/package.json +1 -1
package/dist/seo.js
CHANGED
|
@@ -60,7 +60,7 @@ var openapi_default = {
|
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
name: "Delivery",
|
|
63
|
-
description: 'Outbound delivery. Configure destinations (six live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive), create bindings that join signal filters\nto deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n\n## Webhook Contract\n\n**Event payload:**\n```json\n{\n "event": {\n "event_type": "document.extracted",\n "event_id": "42",\n "binding_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",\n "idempotency_key": "c9f3a7e1b2d4f6a8e0c2d4f6a8e0c2d4",\n "attempt": 1,\n "delivered_at": "2026-04-25T14:30:00.000Z"\n },\n "payload": { "document_id": "...", "data": { "...extracted fields..." } }\n}\n```\n\n**Event types:** `document.extracted` (deliver with the `document.capture`\ndeliverable for the raw field map; its payload gains optional `metadata`/\n`batch_id` read from the document\'s own `client_metadata`/`client_batch_id`\ncolumns \u2014 document-scoped, not request-scoped, since this deliverable has\nno run-request context; present only when set),\n`document.extraction_failed`,\n`document.structured` (per-document structured fields from a Spec pipeline / `/v1/run`; deliver with the `pipeline.capture` deliverable \u2014 its payload carries `run_id` (null outside `/v1/run`), `document_id`, `pipeline_id`, `fields` for submission correlation, and optional `metadata`/`batch_id`; for a `/v1/run`-attributed document these read the ATTRIBUTED REQUEST\'s per-input merged bag first \u2014 correct under byte-identical dedup and append, where the canonical documents row can carry a different submission\'s tags \u2014 falling back to the documents row when no request is attributed; present only when set),\n`run.completed` (a `POST /v1/run` pipeline finished; payload adds `records` \u2014\nan array of `{ document_id, filename, data, metadata?, batch_id? }`, one entry\nper output row, ALWAYS an array even for a single document; `metadata`/\n`batch_id` are the submitting request\'s per-input merged bag (echo-sourced,\nso dedup/append never leaks another request\'s tags onto this one\'s records),\npresent only when set; assembled runs attribute each\ncomposed row to its anchor document; `document_id` and `filename` are\nnullable \u2014 null when a row\'s document identity cannot be resolved \u2014\nalongside the legacy `structured_data`,\nstill emitted but considered legacy in favor of `records`),\n`run.failed` (a `POST /v1/run` pipeline failed \u2014 every document errored\nduring ingest or extraction; the `error` object\'s shape varies by failure\nstage and may include `document_ids`, a best-effort array of the input\ndocument ids),\n`run.dataspace.completed`, `run.dataspace.failed`, `result.dataspace.completed`,\n`result.dataspace.failed`, `run.structuring.completed`, `run.structuring.failed`,\n`run.resolution.completed`, `run.resolution.failed`, `run.extraction.completed`,\n`run.extraction.failed`, `result.flagged`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed`.\n\n**Signature verification (HMAC-SHA256):**\n\nHeader: `X-Talonic-Signature: t=1714060200000,v1=abc123...`\n\n```javascript\nconst crypto = require(\'crypto\');\nconst [tPart, vPart] = signature.split(\',\');\nconst timestamp = tPart.split(\'=\')[1];\nconst received = vPart.split(\'=\')[1];\nconst expected = crypto.createHmac(\'sha256\', signingSecret)\n .update(timestamp + \'.\' + rawBody).digest(\'hex\');\nconst valid = crypto.timingSafeEqual(\n Buffer.from(received), Buffer.from(expected));\n```\n\n**Retry policy:** Up to 7 attempts \u2014 0s, 30s, 2m, 8m, 30m, 2h, 8h (~10.5h total).\nHTTP 429/5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue recovery:** When all retries are exhausted, the delivery\nlands in the DLQ. List failed deliveries with `GET /v1/delivery/dlq`\n(filterable by `binding_id` and `error_code`). Inspect a single entry with\n`GET /v1/delivery/dlq/{id}`. Replay with `POST /v1/delivery/dlq/{id}/replay`\n\u2014 this deletes the DLQ entry, re-signs the payload with the current\nsigning secret, resets the retry counter to attempt 1, and re-enqueues\nthe delivery through the full backoff ladder.\n'
|
|
63
|
+
description: 'Outbound delivery. Configure destinations (six live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive), create bindings that join signal filters\nto deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n\n## Webhook Contract\n\n**Event payload:**\n```json\n{\n "event": {\n "event_type": "document.extracted",\n "event_id": "42",\n "binding_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",\n "idempotency_key": "c9f3a7e1b2d4f6a8e0c2d4f6a8e0c2d4",\n "attempt": 1,\n "delivered_at": "2026-04-25T14:30:00.000Z"\n },\n "payload": { "document_id": "...", "data": { "...extracted fields..." } }\n}\n```\n\n**Event types:** `document.extracted` (deliver with the `document.capture`\ndeliverable for the raw field map; its payload gains optional `metadata`/\n`batch_id` read from the document\'s own `client_metadata`/`client_batch_id`\ncolumns \u2014 document-scoped, not request-scoped, since this deliverable has\nno run-request context; present only when set),\n`document.extraction_failed`,\n`document.structured` (per-document structured fields from a Spec pipeline / `/v1/run`; deliver with the `pipeline.capture` deliverable \u2014 its payload carries `run_id` (null outside `/v1/run`), `document_id`, `pipeline_id`, `fields` for submission correlation, and optional `metadata`/`batch_id`; for a `/v1/run`-attributed document these read the ATTRIBUTED REQUEST\'s per-input merged bag first \u2014 correct under byte-identical dedup and append, where the canonical documents row can carry a different submission\'s tags \u2014 falling back to the documents row when no request is attributed; present only when set),\n`run.completed` (a `POST /v1/run` pipeline finished; payload adds `records` \u2014\nan array of `{ document_id, filename, data, metadata?, batch_id? }`, one entry\nper output row, ALWAYS an array even for a single document; `metadata`/\n`batch_id` are the submitting request\'s per-input merged bag (echo-sourced,\nso dedup/append never leaks another request\'s tags onto this one\'s records),\npresent only when set; assembled runs attribute each\ncomposed row to its anchor document; `document_id` and `filename` are\nnullable \u2014 null when a row\'s document identity cannot be resolved \u2014\nalongside the legacy `structured_data`,\nstill emitted but considered legacy in favor of `records`),\n`run.failed` (a `POST /v1/run` pipeline failed \u2014 every document errored\nduring ingest or extraction; the `error` object\'s shape varies by failure\nstage and may include `document_ids`, a best-effort array of the input\ndocument ids),\n`run.dataspace.completed`, `run.dataspace.failed`, `result.dataspace.completed`,\n`result.dataspace.failed`, `run.structuring.completed`, `run.structuring.failed`,\n`run.resolution.completed`, `run.resolution.failed`, `run.extraction.completed`,\n`run.extraction.failed`, `result.flagged`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed`.\n\n**Typed structured values:** `run.completed` and `document.structured`\nemit typed field values natively \u2014 a field backed by a structured\nsubschema arrives as an array of objects (e.g.\n`[{"label":"BoL","value":"123"}]`), not a stringified scalar, and each\nobject\'s subfields are typed per their declared subfield `data_type`. A\nconsumer that assumes every field value is a scalar breaks silently on\nsuch a field; that is the consumer\'s contract violation, not a payload\nchange. `document.extracted` is unaffected \u2014 its arrays are pre-flattened\nat the capture layer.\n\n\nThe same subfield typing applies on `json`/`ndjson` delivery and on the\n`/v1` poll \u2014 `GET /v1/run/{id}/results` and `GET /v1/pipelines/{id}/results`,\nboth the `fields` map and the `?include=cells` `cells[].value` \u2014 so the\npoll and the webhook agree. Per-subfield miss behavior follows the wire\nform of the declared type: a `number` or `boolean` subfield value that\nfails to parse emits `null` (these types have no string wire form, so the\nwire stays strictly number-or-null / boolean-or-null); an `enum` or `date`\nsubfield value that is out-of-vocabulary or unparseable passes through as\nits raw string (these types ARE string-typed on the wire, so a present\nvalue is never dropped). A nested array or object subfield value passes\nthrough raw. The `audit[].value` view is the deliberate raw history view\nand is never type-projected. Every extraction WIRE leaf remains\nstring-typed \u2014 subfield typing is derived at this outbound edge, not\ncarried on the extraction wire.\n\n**Signature verification (HMAC-SHA256):**\n\nHeader: `X-Talonic-Signature: t=1714060200000,v1=abc123...`\n\n```javascript\nconst crypto = require(\'crypto\');\nconst [tPart, vPart] = signature.split(\',\');\nconst timestamp = tPart.split(\'=\')[1];\nconst received = vPart.split(\'=\')[1];\nconst expected = crypto.createHmac(\'sha256\', signingSecret)\n .update(timestamp + \'.\' + rawBody).digest(\'hex\');\nconst valid = crypto.timingSafeEqual(\n Buffer.from(received), Buffer.from(expected));\n```\n\n**Retry policy:** Up to 7 attempts \u2014 0s, 30s, 2m, 8m, 30m, 2h, 8h (~10.5h total).\nHTTP 429/5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue recovery:** When all retries are exhausted, the delivery\nlands in the DLQ. List failed deliveries with `GET /v1/delivery/dlq`\n(filterable by `binding_id` and `error_code`). Inspect a single entry with\n`GET /v1/delivery/dlq/{id}`. Replay with `POST /v1/delivery/dlq/{id}/replay`\n\u2014 this deletes the DLQ entry, re-signs the payload with the current\nsigning secret, resets the retry counter to attempt 1, and re-enqueues\nthe delivery through the full backoff ladder.\n'
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
name: "Filter",
|
|
@@ -17960,7 +17960,7 @@ var openapi_default = {
|
|
|
17960
17960
|
"Pipelines"
|
|
17961
17961
|
],
|
|
17962
17962
|
summary: "Get a pipeline's structured results (poll-able)",
|
|
17963
|
-
description: "The pipeline run's structured rows, poll-able as JSON \u2014 the same governed read (review holdback, demoted-field projection, `__` diagnostics filtering, assembly awareness) that previously existed only as the `run.completed` webhook or a data-product CSV export. The default record shape mirrors the `pipeline.capture` webhook envelope: `document_id`, `filename`, `run_id`, `pipeline_id`, `record_id`, `status`, `completed_at`, optional `metadata`/`batch_id`, and clean `fields`. Held (`pending_approval`) values never leave this surface \u2014 `fields` serializes `null` for them.\n\n`view=composed` (the default when the run has an assembly product set) returns one row per assembled group, the same rows the data product and CSV exports serve; `view=documents` returns one row per pipeline document from the main record set. A non-assembly run only has the documents view \u2014 `view=composed` degrades to it rather than erroring. An **anchor-less composed row** (the product record's anchor could not be resolved \u2014 a known `per_group_jobs` identity-stamp gap) serializes `document_id`/`filename`/`run_id: null`, `status: \"complete\"`, and `completed_at: null`; such rows are excluded by any `document_id`, `status`, `since`, or `until` filter and appear only in unbounded reads.\n\n`since`/`until` filter on `completed_at`, which tracks DOCUMENT PROCESSING completion, not value change: a later review promotion or assembly recompose never advances it, and a phase rerun NULLS the completion stamps for every affected document until it re-processes. Poll unbounded (or by `document_id`) to pick up review outcomes; `pending_review_count` on the page is the signal that held values are outstanding.\n\n`include=cells,provenance,audit` (comma-separated) add shape beyond `fields`. `cells` adds per-field `{ value, status, confidence, source, document_id, filename }` \u2014 `source` is an opaque-but-stable vocabulary; new values may appear over time. `provenance` adds a stable projection of the cell's audit trail (`kind` one of `span`, `assembly_override`, `auto_adjudication`, `human`, `derived`, `legacy`, with an open `derived_reason` enum); a held cell's projection is kind-only \u2014 no displaced/previous values. `audit` adds the full cell-version trail, bounded to `structure_pipeline.results_api.audit_max_records` (default 20) records per page \u2014 a broader page 400s with `audit_include_too_broad`. For any field whose LATEST version is held, every version in its audit trail serializes `value: null` (the hold mechanism copies the value forward, so the prior version is an equal leak).\n\nPagination is house cursor pagination (`pagination.next_cursor`, keyed on `record_id`), never an invented `page` param. Per-record `status` folds ~10 internal states to four public values \u2014 `complete`, `partial`, and `error` pass through, everything else (queue/phase states, `awaiting_ocr`, \u2026) folds to `processing`. This deliberately KEEPS `partial`, unlike `GET /v1/run/{id}`'s 3-state `documents[]` fold, because a partial row's held fields are the reason to keep polling. Poll this envelope's `status` until `completed` for a single-request pipeline; an append pipeline never settles at the pipeline level, so append consumers should loop on per-record `status`/`completed_at` or poll `GET /v1/run/{id}/results` instead, whose run-scoped status does settle. Preview pipelines are served. Requires read scope.\n",
|
|
17963
|
+
description: "The pipeline run's structured rows, poll-able as JSON \u2014 the same governed read (review holdback, demoted-field projection, `__` diagnostics filtering, assembly awareness) that previously existed only as the `run.completed` webhook or a data-product CSV export. The default record shape mirrors the `pipeline.capture` webhook envelope: `document_id`, `filename`, `run_id`, `pipeline_id`, `record_id`, `status`, `completed_at`, optional `metadata`/`batch_id`, and clean `fields`. Held (`pending_approval`) values never leave this surface \u2014 `fields` serializes `null` for them.\n\n`view=composed` (the default when the run has an assembly product set) returns one row per assembled group, the same rows the data product and CSV exports serve; `view=documents` returns one row per pipeline document from the main record set. A non-assembly run only has the documents view \u2014 `view=composed` degrades to it rather than erroring. An **anchor-less composed row** (the product record's anchor could not be resolved \u2014 a known `per_group_jobs` identity-stamp gap) serializes `document_id`/`filename`/`run_id: null`, `status: \"complete\"`, and `completed_at: null`; such rows are excluded by any `document_id`, `status`, `since`, or `until` filter and appear only in unbounded reads.\n\n`since`/`until` filter on `completed_at`, which tracks DOCUMENT PROCESSING completion, not value change: a later review promotion or assembly recompose never advances it, and a phase rerun NULLS the completion stamps for every affected document until it re-processes. Poll unbounded (or by `document_id`) to pick up review outcomes; `pending_review_count` on the page is the signal that held values are outstanding.\n\nA field backed by a structured subschema is projected to its declared subfield types on this poll \u2014 in both the `fields` map and the `?include=cells` `cells[].value` \u2014 matching the `run.completed` webhook; a `number`/`boolean` subfield parse-miss serializes `null` and an `enum`/`date` miss passes through raw (see the `ResultsCell`/`ResultsRecord` schemas and the Webhooks event catalog for the full per-type contract). The `include=audit` trail is the raw history view and is NOT type-projected.\n\n`include=cells,provenance,audit` (comma-separated) add shape beyond `fields`. `cells` adds per-field `{ value, status, confidence, source, document_id, filename }` \u2014 `source` is an opaque-but-stable vocabulary; new values may appear over time. `provenance` adds a stable projection of the cell's audit trail (`kind` one of `span`, `assembly_override`, `auto_adjudication`, `human`, `derived`, `legacy`, with an open `derived_reason` enum); a held cell's projection is kind-only \u2014 no displaced/previous values. `audit` adds the full cell-version trail, bounded to `structure_pipeline.results_api.audit_max_records` (default 20) records per page \u2014 a broader page 400s with `audit_include_too_broad`. For any field whose LATEST version is held, every version in its audit trail serializes `value: null` (the hold mechanism copies the value forward, so the prior version is an equal leak).\n\nPagination is house cursor pagination (`pagination.next_cursor`, keyed on `record_id`), never an invented `page` param. Per-record `status` folds ~10 internal states to four public values \u2014 `complete`, `partial`, and `error` pass through, everything else (queue/phase states, `awaiting_ocr`, \u2026) folds to `processing`. This deliberately KEEPS `partial`, unlike `GET /v1/run/{id}`'s 3-state `documents[]` fold, because a partial row's held fields are the reason to keep polling. Poll this envelope's `status` until `completed` for a single-request pipeline; an append pipeline never settles at the pipeline level, so append consumers should loop on per-record `status`/`completed_at` or poll `GET /v1/run/{id}/results` instead, whose run-scoped status does settle. Preview pipelines are served. Requires read scope.\n",
|
|
17964
17964
|
operationId: "getPipelineResults",
|
|
17965
17965
|
security: [
|
|
17966
17966
|
{
|
|
@@ -18473,7 +18473,7 @@ var openapi_default = {
|
|
|
18473
18473
|
"Run"
|
|
18474
18474
|
],
|
|
18475
18475
|
summary: "Get this run's structured results (poll-able, per-document)",
|
|
18476
|
-
description: "The same governed results read as `GET /v1/pipelines/{id}/results` (review holdback, demoted-field projection, assembly awareness), scoped ALWAYS to this `/v1/run` request's own `documents[]` echo and ALWAYS the per-document view \u2014 \"what did MY submitted documents produce,\" uniform across new/append pipeline modes. This is a deliberate DIVERGENCE from the per-run `run.completed` webhook, which for an unscoped non-append assembly run delivers COMPOSED rows: composed output for an assembly run is `GET /v1/pipelines/{id}/results?view=composed`, surfaced here at `links.composed_results` when a pipeline exists.\n\nOnly `document_id` and `include` filter the rows; `run_id`, `view`, `since`, `until`, and `status` are pipeline-route-only and 400 with `unsupported_filter` here, since the run IS the scope and its window is already bounded. `include=cells,provenance,audit` behave identically to the pipeline route \u2014 see `GET /v1/pipelines/{id}/results` for the full shape and held-value redaction rules.\n\nTwo zero-states return `200` with an empty page and a `scope_note`, never `404`: no compiled pipeline exists yet for this run (still ingesting, or it failed before pipeline creation), or the run predates per-request document tracking (an echo-less legacy row, whose membership is unknowable). The envelope's `status` folds the same three-state vocabulary as `GET /v1/run/{id}` (`processing`/`completed`/`failed`) and DOES settle even for an append pipeline that never settles at the pipeline level \u2014 poll this route for append consumers instead of the pipeline route. Requires read scope.\n",
|
|
18476
|
+
description: "The same governed results read as `GET /v1/pipelines/{id}/results` (review holdback, demoted-field projection, assembly awareness), scoped ALWAYS to this `/v1/run` request's own `documents[]` echo and ALWAYS the per-document view \u2014 \"what did MY submitted documents produce,\" uniform across new/append pipeline modes. This is a deliberate DIVERGENCE from the per-run `run.completed` webhook, which for an unscoped non-append assembly run delivers COMPOSED rows: composed output for an assembly run is `GET /v1/pipelines/{id}/results?view=composed`, surfaced here at `links.composed_results` when a pipeline exists.\n\nOnly `document_id` and `include` filter the rows; `run_id`, `view`, `since`, `until`, and `status` are pipeline-route-only and 400 with `unsupported_filter` here, since the run IS the scope and its window is already bounded. `include=cells,provenance,audit` behave identically to the pipeline route \u2014 including the structured-subfield type projection on `fields`/`cells` and the raw, non-projected `audit` trail \u2014 see `GET /v1/pipelines/{id}/results` for the full shape and held-value redaction rules.\n\nTwo zero-states return `200` with an empty page and a `scope_note`, never `404`: no compiled pipeline exists yet for this run (still ingesting, or it failed before pipeline creation), or the run predates per-request document tracking (an echo-less legacy row, whose membership is unknowable). The envelope's `status` folds the same three-state vocabulary as `GET /v1/run/{id}` (`processing`/`completed`/`failed`) and DOES settle even for an append pipeline that never settles at the pipeline level \u2014 poll this route for append consumers instead of the pipeline route. Requires read scope.\n",
|
|
18477
18477
|
operationId: "getRunResults",
|
|
18478
18478
|
security: [
|
|
18479
18479
|
{
|
|
@@ -26032,7 +26032,7 @@ var openapi_default = {
|
|
|
26032
26032
|
properties: {
|
|
26033
26033
|
value: {
|
|
26034
26034
|
nullable: true,
|
|
26035
|
-
description: "The cell's coalesced value; null for a held (pending_approval) cell."
|
|
26035
|
+
description: "The cell's coalesced value; null for a held (pending_approval) cell. A structured-subschema cell is emitted TYPED \u2014 each object's subfields projected to their declared subfield data_type, matching json/ndjson delivery and the run.completed webhook. A number/boolean subfield parse-miss serializes null (no string wire form); an enum/date miss and any nested array/object subfield value pass through raw."
|
|
26036
26036
|
},
|
|
26037
26037
|
status: {
|
|
26038
26038
|
type: "string",
|
|
@@ -26131,7 +26131,7 @@ var openapi_default = {
|
|
|
26131
26131
|
},
|
|
26132
26132
|
value: {
|
|
26133
26133
|
nullable: true,
|
|
26134
|
-
description: "Redacted (null) for EVERY version in a field's trail when that field's LATEST version is held \u2014 the hold mechanism copies the held value forward, making the prior version an equal leak. Serializes normally once the hold resolves."
|
|
26134
|
+
description: "Redacted (null) for EVERY version in a field's trail when that field's LATEST version is held \u2014 the hold mechanism copies the held value forward, making the prior version an equal leak. Serializes normally once the hold resolves. This audit trail is the deliberate RAW history view \u2014 structured-subschema subfields are NOT type-projected here (unlike fields and cells[].value)."
|
|
26135
26135
|
},
|
|
26136
26136
|
status: {
|
|
26137
26137
|
type: [
|
|
@@ -26234,7 +26234,7 @@ var openapi_default = {
|
|
|
26234
26234
|
fields: {
|
|
26235
26235
|
type: "object",
|
|
26236
26236
|
additionalProperties: true,
|
|
26237
|
-
description: "field_key -> clean value. Held (pending_approval) fields serialize null; demoted fields and __ diagnostics are absent."
|
|
26237
|
+
description: "field_key -> clean value. Held (pending_approval) fields serialize null; demoted fields and __ diagnostics are absent. A structured-subschema field is emitted TYPED (subfields projected to their declared data_type; number/boolean parse-miss -> null, enum/date miss and nested values -> raw), matching the cells[].value projection and the run.completed webhook."
|
|
26238
26238
|
},
|
|
26239
26239
|
cells: {
|
|
26240
26240
|
type: "object",
|
package/openapi.json
CHANGED
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"name": "Delivery",
|
|
62
|
-
"description": "Outbound delivery. Configure destinations (six live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive), create bindings that join signal filters\nto deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n\n## Webhook Contract\n\n**Event payload:**\n```json\n{\n \"event\": {\n \"event_type\": \"document.extracted\",\n \"event_id\": \"42\",\n \"binding_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"idempotency_key\": \"c9f3a7e1b2d4f6a8e0c2d4f6a8e0c2d4\",\n \"attempt\": 1,\n \"delivered_at\": \"2026-04-25T14:30:00.000Z\"\n },\n \"payload\": { \"document_id\": \"...\", \"data\": { \"...extracted fields...\" } }\n}\n```\n\n**Event types:** `document.extracted` (deliver with the `document.capture`\ndeliverable for the raw field map; its payload gains optional `metadata`/\n`batch_id` read from the document's own `client_metadata`/`client_batch_id`\ncolumns — document-scoped, not request-scoped, since this deliverable has\nno run-request context; present only when set),\n`document.extraction_failed`,\n`document.structured` (per-document structured fields from a Spec pipeline / `/v1/run`; deliver with the `pipeline.capture` deliverable — its payload carries `run_id` (null outside `/v1/run`), `document_id`, `pipeline_id`, `fields` for submission correlation, and optional `metadata`/`batch_id`; for a `/v1/run`-attributed document these read the ATTRIBUTED REQUEST's per-input merged bag first — correct under byte-identical dedup and append, where the canonical documents row can carry a different submission's tags — falling back to the documents row when no request is attributed; present only when set),\n`run.completed` (a `POST /v1/run` pipeline finished; payload adds `records` —\nan array of `{ document_id, filename, data, metadata?, batch_id? }`, one entry\nper output row, ALWAYS an array even for a single document; `metadata`/\n`batch_id` are the submitting request's per-input merged bag (echo-sourced,\nso dedup/append never leaks another request's tags onto this one's records),\npresent only when set; assembled runs attribute each\ncomposed row to its anchor document; `document_id` and `filename` are\nnullable — null when a row's document identity cannot be resolved —\nalongside the legacy `structured_data`,\nstill emitted but considered legacy in favor of `records`),\n`run.failed` (a `POST /v1/run` pipeline failed — every document errored\nduring ingest or extraction; the `error` object's shape varies by failure\nstage and may include `document_ids`, a best-effort array of the input\ndocument ids),\n`run.dataspace.completed`, `run.dataspace.failed`, `result.dataspace.completed`,\n`result.dataspace.failed`, `run.structuring.completed`, `run.structuring.failed`,\n`run.resolution.completed`, `run.resolution.failed`, `run.extraction.completed`,\n`run.extraction.failed`, `result.flagged`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed`.\n\n**Signature verification (HMAC-SHA256):**\n\nHeader: `X-Talonic-Signature: t=1714060200000,v1=abc123...`\n\n```javascript\nconst crypto = require('crypto');\nconst [tPart, vPart] = signature.split(',');\nconst timestamp = tPart.split('=')[1];\nconst received = vPart.split('=')[1];\nconst expected = crypto.createHmac('sha256', signingSecret)\n .update(timestamp + '.' + rawBody).digest('hex');\nconst valid = crypto.timingSafeEqual(\n Buffer.from(received), Buffer.from(expected));\n```\n\n**Retry policy:** Up to 7 attempts — 0s, 30s, 2m, 8m, 30m, 2h, 8h (~10.5h total).\nHTTP 429/5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue recovery:** When all retries are exhausted, the delivery\nlands in the DLQ. List failed deliveries with `GET /v1/delivery/dlq`\n(filterable by `binding_id` and `error_code`). Inspect a single entry with\n`GET /v1/delivery/dlq/{id}`. Replay with `POST /v1/delivery/dlq/{id}/replay`\n— this deletes the DLQ entry, re-signs the payload with the current\nsigning secret, resets the retry counter to attempt 1, and re-enqueues\nthe delivery through the full backoff ladder.\n"
|
|
62
|
+
"description": "Outbound delivery. Configure destinations (six live connectors: webhook, sftp,\ns3, azure_blob, google_drive, onedrive), create bindings that join signal filters\nto deliverable types + destinations + serializers, and inspect the\nhistory/DLQ/events log. Every delivery is at-least-once with an idempotency key\non the wire.\n\n## Webhook Contract\n\n**Event payload:**\n```json\n{\n \"event\": {\n \"event_type\": \"document.extracted\",\n \"event_id\": \"42\",\n \"binding_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"idempotency_key\": \"c9f3a7e1b2d4f6a8e0c2d4f6a8e0c2d4\",\n \"attempt\": 1,\n \"delivered_at\": \"2026-04-25T14:30:00.000Z\"\n },\n \"payload\": { \"document_id\": \"...\", \"data\": { \"...extracted fields...\" } }\n}\n```\n\n**Event types:** `document.extracted` (deliver with the `document.capture`\ndeliverable for the raw field map; its payload gains optional `metadata`/\n`batch_id` read from the document's own `client_metadata`/`client_batch_id`\ncolumns — document-scoped, not request-scoped, since this deliverable has\nno run-request context; present only when set),\n`document.extraction_failed`,\n`document.structured` (per-document structured fields from a Spec pipeline / `/v1/run`; deliver with the `pipeline.capture` deliverable — its payload carries `run_id` (null outside `/v1/run`), `document_id`, `pipeline_id`, `fields` for submission correlation, and optional `metadata`/`batch_id`; for a `/v1/run`-attributed document these read the ATTRIBUTED REQUEST's per-input merged bag first — correct under byte-identical dedup and append, where the canonical documents row can carry a different submission's tags — falling back to the documents row when no request is attributed; present only when set),\n`run.completed` (a `POST /v1/run` pipeline finished; payload adds `records` —\nan array of `{ document_id, filename, data, metadata?, batch_id? }`, one entry\nper output row, ALWAYS an array even for a single document; `metadata`/\n`batch_id` are the submitting request's per-input merged bag (echo-sourced,\nso dedup/append never leaks another request's tags onto this one's records),\npresent only when set; assembled runs attribute each\ncomposed row to its anchor document; `document_id` and `filename` are\nnullable — null when a row's document identity cannot be resolved —\nalongside the legacy `structured_data`,\nstill emitted but considered legacy in favor of `records`),\n`run.failed` (a `POST /v1/run` pipeline failed — every document errored\nduring ingest or extraction; the `error` object's shape varies by failure\nstage and may include `document_ids`, a best-effort array of the input\ndocument ids),\n`run.dataspace.completed`, `run.dataspace.failed`, `result.dataspace.completed`,\n`result.dataspace.failed`, `run.structuring.completed`, `run.structuring.failed`,\n`run.resolution.completed`, `run.resolution.failed`, `run.extraction.completed`,\n`run.extraction.failed`, `result.flagged`, `result.approved`, `result.rejected`,\n`delivery.item.completed`, `delivery.item.failed`.\n\n**Typed structured values:** `run.completed` and `document.structured`\nemit typed field values natively — a field backed by a structured\nsubschema arrives as an array of objects (e.g.\n`[{\"label\":\"BoL\",\"value\":\"123\"}]`), not a stringified scalar, and each\nobject's subfields are typed per their declared subfield `data_type`. A\nconsumer that assumes every field value is a scalar breaks silently on\nsuch a field; that is the consumer's contract violation, not a payload\nchange. `document.extracted` is unaffected — its arrays are pre-flattened\nat the capture layer.\n\n\nThe same subfield typing applies on `json`/`ndjson` delivery and on the\n`/v1` poll — `GET /v1/run/{id}/results` and `GET /v1/pipelines/{id}/results`,\nboth the `fields` map and the `?include=cells` `cells[].value` — so the\npoll and the webhook agree. Per-subfield miss behavior follows the wire\nform of the declared type: a `number` or `boolean` subfield value that\nfails to parse emits `null` (these types have no string wire form, so the\nwire stays strictly number-or-null / boolean-or-null); an `enum` or `date`\nsubfield value that is out-of-vocabulary or unparseable passes through as\nits raw string (these types ARE string-typed on the wire, so a present\nvalue is never dropped). A nested array or object subfield value passes\nthrough raw. The `audit[].value` view is the deliberate raw history view\nand is never type-projected. Every extraction WIRE leaf remains\nstring-typed — subfield typing is derived at this outbound edge, not\ncarried on the extraction wire.\n\n**Signature verification (HMAC-SHA256):**\n\nHeader: `X-Talonic-Signature: t=1714060200000,v1=abc123...`\n\n```javascript\nconst crypto = require('crypto');\nconst [tPart, vPart] = signature.split(',');\nconst timestamp = tPart.split('=')[1];\nconst received = vPart.split('=')[1];\nconst expected = crypto.createHmac('sha256', signingSecret)\n .update(timestamp + '.' + rawBody).digest('hex');\nconst valid = crypto.timingSafeEqual(\n Buffer.from(received), Buffer.from(expected));\n```\n\n**Retry policy:** Up to 7 attempts — 0s, 30s, 2m, 8m, 30m, 2h, 8h (~10.5h total).\nHTTP 429/5xx are retryable. HTTP 4xx (except 408) goes to DLQ immediately.\n\n**Dead-letter queue recovery:** When all retries are exhausted, the delivery\nlands in the DLQ. List failed deliveries with `GET /v1/delivery/dlq`\n(filterable by `binding_id` and `error_code`). Inspect a single entry with\n`GET /v1/delivery/dlq/{id}`. Replay with `POST /v1/delivery/dlq/{id}/replay`\n— this deletes the DLQ entry, re-signs the payload with the current\nsigning secret, resets the retry counter to attempt 1, and re-enqueues\nthe delivery through the full backoff ladder.\n"
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
"name": "Filter",
|
|
@@ -17940,7 +17940,7 @@
|
|
|
17940
17940
|
"Pipelines"
|
|
17941
17941
|
],
|
|
17942
17942
|
"summary": "Get a pipeline's structured results (poll-able)",
|
|
17943
|
-
"description": "The pipeline run's structured rows, poll-able as JSON — the same governed read (review holdback, demoted-field projection, `__` diagnostics filtering, assembly awareness) that previously existed only as the `run.completed` webhook or a data-product CSV export. The default record shape mirrors the `pipeline.capture` webhook envelope: `document_id`, `filename`, `run_id`, `pipeline_id`, `record_id`, `status`, `completed_at`, optional `metadata`/`batch_id`, and clean `fields`. Held (`pending_approval`) values never leave this surface — `fields` serializes `null` for them.\n\n`view=composed` (the default when the run has an assembly product set) returns one row per assembled group, the same rows the data product and CSV exports serve; `view=documents` returns one row per pipeline document from the main record set. A non-assembly run only has the documents view — `view=composed` degrades to it rather than erroring. An **anchor-less composed row** (the product record's anchor could not be resolved — a known `per_group_jobs` identity-stamp gap) serializes `document_id`/`filename`/`run_id: null`, `status: \"complete\"`, and `completed_at: null`; such rows are excluded by any `document_id`, `status`, `since`, or `until` filter and appear only in unbounded reads.\n\n`since`/`until` filter on `completed_at`, which tracks DOCUMENT PROCESSING completion, not value change: a later review promotion or assembly recompose never advances it, and a phase rerun NULLS the completion stamps for every affected document until it re-processes. Poll unbounded (or by `document_id`) to pick up review outcomes; `pending_review_count` on the page is the signal that held values are outstanding.\n\n`include=cells,provenance,audit` (comma-separated) add shape beyond `fields`. `cells` adds per-field `{ value, status, confidence, source, document_id, filename }` — `source` is an opaque-but-stable vocabulary; new values may appear over time. `provenance` adds a stable projection of the cell's audit trail (`kind` one of `span`, `assembly_override`, `auto_adjudication`, `human`, `derived`, `legacy`, with an open `derived_reason` enum); a held cell's projection is kind-only — no displaced/previous values. `audit` adds the full cell-version trail, bounded to `structure_pipeline.results_api.audit_max_records` (default 20) records per page — a broader page 400s with `audit_include_too_broad`. For any field whose LATEST version is held, every version in its audit trail serializes `value: null` (the hold mechanism copies the value forward, so the prior version is an equal leak).\n\nPagination is house cursor pagination (`pagination.next_cursor`, keyed on `record_id`), never an invented `page` param. Per-record `status` folds ~10 internal states to four public values — `complete`, `partial`, and `error` pass through, everything else (queue/phase states, `awaiting_ocr`, …) folds to `processing`. This deliberately KEEPS `partial`, unlike `GET /v1/run/{id}`'s 3-state `documents[]` fold, because a partial row's held fields are the reason to keep polling. Poll this envelope's `status` until `completed` for a single-request pipeline; an append pipeline never settles at the pipeline level, so append consumers should loop on per-record `status`/`completed_at` or poll `GET /v1/run/{id}/results` instead, whose run-scoped status does settle. Preview pipelines are served. Requires read scope.\n",
|
|
17943
|
+
"description": "The pipeline run's structured rows, poll-able as JSON — the same governed read (review holdback, demoted-field projection, `__` diagnostics filtering, assembly awareness) that previously existed only as the `run.completed` webhook or a data-product CSV export. The default record shape mirrors the `pipeline.capture` webhook envelope: `document_id`, `filename`, `run_id`, `pipeline_id`, `record_id`, `status`, `completed_at`, optional `metadata`/`batch_id`, and clean `fields`. Held (`pending_approval`) values never leave this surface — `fields` serializes `null` for them.\n\n`view=composed` (the default when the run has an assembly product set) returns one row per assembled group, the same rows the data product and CSV exports serve; `view=documents` returns one row per pipeline document from the main record set. A non-assembly run only has the documents view — `view=composed` degrades to it rather than erroring. An **anchor-less composed row** (the product record's anchor could not be resolved — a known `per_group_jobs` identity-stamp gap) serializes `document_id`/`filename`/`run_id: null`, `status: \"complete\"`, and `completed_at: null`; such rows are excluded by any `document_id`, `status`, `since`, or `until` filter and appear only in unbounded reads.\n\n`since`/`until` filter on `completed_at`, which tracks DOCUMENT PROCESSING completion, not value change: a later review promotion or assembly recompose never advances it, and a phase rerun NULLS the completion stamps for every affected document until it re-processes. Poll unbounded (or by `document_id`) to pick up review outcomes; `pending_review_count` on the page is the signal that held values are outstanding.\n\nA field backed by a structured subschema is projected to its declared subfield types on this poll — in both the `fields` map and the `?include=cells` `cells[].value` — matching the `run.completed` webhook; a `number`/`boolean` subfield parse-miss serializes `null` and an `enum`/`date` miss passes through raw (see the `ResultsCell`/`ResultsRecord` schemas and the Webhooks event catalog for the full per-type contract). The `include=audit` trail is the raw history view and is NOT type-projected.\n\n`include=cells,provenance,audit` (comma-separated) add shape beyond `fields`. `cells` adds per-field `{ value, status, confidence, source, document_id, filename }` — `source` is an opaque-but-stable vocabulary; new values may appear over time. `provenance` adds a stable projection of the cell's audit trail (`kind` one of `span`, `assembly_override`, `auto_adjudication`, `human`, `derived`, `legacy`, with an open `derived_reason` enum); a held cell's projection is kind-only — no displaced/previous values. `audit` adds the full cell-version trail, bounded to `structure_pipeline.results_api.audit_max_records` (default 20) records per page — a broader page 400s with `audit_include_too_broad`. For any field whose LATEST version is held, every version in its audit trail serializes `value: null` (the hold mechanism copies the value forward, so the prior version is an equal leak).\n\nPagination is house cursor pagination (`pagination.next_cursor`, keyed on `record_id`), never an invented `page` param. Per-record `status` folds ~10 internal states to four public values — `complete`, `partial`, and `error` pass through, everything else (queue/phase states, `awaiting_ocr`, …) folds to `processing`. This deliberately KEEPS `partial`, unlike `GET /v1/run/{id}`'s 3-state `documents[]` fold, because a partial row's held fields are the reason to keep polling. Poll this envelope's `status` until `completed` for a single-request pipeline; an append pipeline never settles at the pipeline level, so append consumers should loop on per-record `status`/`completed_at` or poll `GET /v1/run/{id}/results` instead, whose run-scoped status does settle. Preview pipelines are served. Requires read scope.\n",
|
|
17944
17944
|
"operationId": "getPipelineResults",
|
|
17945
17945
|
"security": [
|
|
17946
17946
|
{
|
|
@@ -18453,7 +18453,7 @@
|
|
|
18453
18453
|
"Run"
|
|
18454
18454
|
],
|
|
18455
18455
|
"summary": "Get this run's structured results (poll-able, per-document)",
|
|
18456
|
-
"description": "The same governed results read as `GET /v1/pipelines/{id}/results` (review holdback, demoted-field projection, assembly awareness), scoped ALWAYS to this `/v1/run` request's own `documents[]` echo and ALWAYS the per-document view — \"what did MY submitted documents produce,\" uniform across new/append pipeline modes. This is a deliberate DIVERGENCE from the per-run `run.completed` webhook, which for an unscoped non-append assembly run delivers COMPOSED rows: composed output for an assembly run is `GET /v1/pipelines/{id}/results?view=composed`, surfaced here at `links.composed_results` when a pipeline exists.\n\nOnly `document_id` and `include` filter the rows; `run_id`, `view`, `since`, `until`, and `status` are pipeline-route-only and 400 with `unsupported_filter` here, since the run IS the scope and its window is already bounded. `include=cells,provenance,audit` behave identically to the pipeline route — see `GET /v1/pipelines/{id}/results` for the full shape and held-value redaction rules.\n\nTwo zero-states return `200` with an empty page and a `scope_note`, never `404`: no compiled pipeline exists yet for this run (still ingesting, or it failed before pipeline creation), or the run predates per-request document tracking (an echo-less legacy row, whose membership is unknowable). The envelope's `status` folds the same three-state vocabulary as `GET /v1/run/{id}` (`processing`/`completed`/`failed`) and DOES settle even for an append pipeline that never settles at the pipeline level — poll this route for append consumers instead of the pipeline route. Requires read scope.\n",
|
|
18456
|
+
"description": "The same governed results read as `GET /v1/pipelines/{id}/results` (review holdback, demoted-field projection, assembly awareness), scoped ALWAYS to this `/v1/run` request's own `documents[]` echo and ALWAYS the per-document view — \"what did MY submitted documents produce,\" uniform across new/append pipeline modes. This is a deliberate DIVERGENCE from the per-run `run.completed` webhook, which for an unscoped non-append assembly run delivers COMPOSED rows: composed output for an assembly run is `GET /v1/pipelines/{id}/results?view=composed`, surfaced here at `links.composed_results` when a pipeline exists.\n\nOnly `document_id` and `include` filter the rows; `run_id`, `view`, `since`, `until`, and `status` are pipeline-route-only and 400 with `unsupported_filter` here, since the run IS the scope and its window is already bounded. `include=cells,provenance,audit` behave identically to the pipeline route — including the structured-subfield type projection on `fields`/`cells` and the raw, non-projected `audit` trail — see `GET /v1/pipelines/{id}/results` for the full shape and held-value redaction rules.\n\nTwo zero-states return `200` with an empty page and a `scope_note`, never `404`: no compiled pipeline exists yet for this run (still ingesting, or it failed before pipeline creation), or the run predates per-request document tracking (an echo-less legacy row, whose membership is unknowable). The envelope's `status` folds the same three-state vocabulary as `GET /v1/run/{id}` (`processing`/`completed`/`failed`) and DOES settle even for an append pipeline that never settles at the pipeline level — poll this route for append consumers instead of the pipeline route. Requires read scope.\n",
|
|
18457
18457
|
"operationId": "getRunResults",
|
|
18458
18458
|
"security": [
|
|
18459
18459
|
{
|
|
@@ -26012,7 +26012,7 @@
|
|
|
26012
26012
|
"properties": {
|
|
26013
26013
|
"value": {
|
|
26014
26014
|
"nullable": true,
|
|
26015
|
-
"description": "The cell's coalesced value; null for a held (pending_approval) cell."
|
|
26015
|
+
"description": "The cell's coalesced value; null for a held (pending_approval) cell. A structured-subschema cell is emitted TYPED — each object's subfields projected to their declared subfield data_type, matching json/ndjson delivery and the run.completed webhook. A number/boolean subfield parse-miss serializes null (no string wire form); an enum/date miss and any nested array/object subfield value pass through raw."
|
|
26016
26016
|
},
|
|
26017
26017
|
"status": {
|
|
26018
26018
|
"type": "string",
|
|
@@ -26111,7 +26111,7 @@
|
|
|
26111
26111
|
},
|
|
26112
26112
|
"value": {
|
|
26113
26113
|
"nullable": true,
|
|
26114
|
-
"description": "Redacted (null) for EVERY version in a field's trail when that field's LATEST version is held — the hold mechanism copies the held value forward, making the prior version an equal leak. Serializes normally once the hold resolves."
|
|
26114
|
+
"description": "Redacted (null) for EVERY version in a field's trail when that field's LATEST version is held — the hold mechanism copies the held value forward, making the prior version an equal leak. Serializes normally once the hold resolves. This audit trail is the deliberate RAW history view — structured-subschema subfields are NOT type-projected here (unlike fields and cells[].value)."
|
|
26115
26115
|
},
|
|
26116
26116
|
"status": {
|
|
26117
26117
|
"type": [
|
|
@@ -26214,7 +26214,7 @@
|
|
|
26214
26214
|
"fields": {
|
|
26215
26215
|
"type": "object",
|
|
26216
26216
|
"additionalProperties": true,
|
|
26217
|
-
"description": "field_key -> clean value. Held (pending_approval) fields serialize null; demoted fields and __ diagnostics are absent."
|
|
26217
|
+
"description": "field_key -> clean value. Held (pending_approval) fields serialize null; demoted fields and __ diagnostics are absent. A structured-subschema field is emitted TYPED (subfields projected to their declared data_type; number/boolean parse-miss -> null, enum/date miss and nested values -> raw), matching the cells[].value projection and the run.completed webhook."
|
|
26218
26218
|
},
|
|
26219
26219
|
"cells": {
|
|
26220
26220
|
"type": "object",
|