@talonic/docs 0.21.77 → 0.21.79

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 CHANGED
@@ -12155,11 +12155,11 @@ curl -s "https://api.talonic.com/v1/batches?status=accumulating" \\
12155
12155
  parentSlug: "batch-inference",
12156
12156
  title: "Monitoring Batches",
12157
12157
  seoTitle: "Monitoring Batches \u2014 Status Tracking \u2014 Talonic Docs",
12158
- description: "Track batches on the Batches page or via GET /v1/batches: accumulating, submitted, in progress, completed, failed, or expired, with per-item error detail.",
12158
+ description: "Track batches on the Batches page or via GET /v1/batches: accumulating, submitting, submitted, in progress, completed, failed, or expired, with per-item error detail.",
12159
12159
  content: [
12160
12160
  {
12161
12161
  type: "paragraph",
12162
- text: "The Batches page at `/sources/batches` shows the status of all batches with real-time updates. On the happy path a batch progresses through **accumulating** (items collecting in the queue), **submitted** (sent to the provider's batch API), **in progress** (the provider is working through the items), and **completed** (results received and applied to the corresponding documents). Two terminal states cover problems: **failed** and **expired**. The page live-syncs with the provider so you can monitor progress without manual refreshing. Click any batch to see the detail view with individual items, their processing state, and any errors."
12162
+ text: "The Batches page at `/sources/batches` shows the status of all batches with real-time updates. On the happy path a batch progresses through **accumulating** (items collecting in the queue), **submitting** (being sent to the provider; cancel answers 400 meanwhile), **submitted** (sent to the provider's batch API), **in progress** (the provider is working through the items), and **completed** (results received and applied to the corresponding documents). Three terminal states cover problems and stops: **failed**, **expired** and **cancelled** (a batch cancelled through `POST /v1/batches/{id}/cancel`). The page live-syncs with the provider so you can monitor progress without manual refreshing. Click any batch to see the detail view with individual items, their processing state, and any errors."
12163
12163
  },
12164
12164
  {
12165
12165
  type: "paragraph",
@@ -12186,6 +12186,11 @@ curl -s "https://api.talonic.com/v1/batches?status=accumulating" \\
12186
12186
  type: "status",
12187
12187
  description: "Items are being collected. The batch has not yet been submitted to the provider."
12188
12188
  },
12189
+ {
12190
+ name: "submitting",
12191
+ type: "status",
12192
+ description: "The batch is being sent to the provider. Cancelling answers 400 while it is in this status."
12193
+ },
12189
12194
  {
12190
12195
  name: "submitted",
12191
12196
  type: "status",
@@ -12271,7 +12276,7 @@ curl -s https://api.talonic.com/v1/batches/a1b2c3d4-e5f6-7890-abcd-ef1234567890
12271
12276
  },
12272
12277
  {
12273
12278
  question: "What are the batch statuses?",
12274
- answer: "Six lifecycle statuses: accumulating (items collecting), submitted (sent to the provider, polled hourly), in_progress (the provider is processing), completed (results received and applied), failed (submission or provider failure, see error_message), and expired (the provider closed the batch before all items finished)."
12279
+ answer: "Seven lifecycle statuses: accumulating (items collecting), submitting (being sent to the provider; cancel answers 400 meanwhile), submitted (sent to the provider, polled hourly), in_progress (the provider is processing), completed (results received and applied), failed (submission or provider failure, see error_message), and expired (the provider closed the batch before all items finished)."
12275
12280
  },
12276
12281
  {
12277
12282
  question: "How often are batches submitted to the provider?",
@@ -31313,18 +31318,18 @@ var sections46 = [
31313
31318
  parentSlug: "batches",
31314
31319
  title: "Cancel Batch",
31315
31320
  seoTitle: "Cancel an In-Flight Extraction Batch \u2014 Talonic Docs",
31316
- description: "Cancel an in-flight extraction batch while it is accumulating or submitted. Documents revert to batch_queued status and can be reprocessed in realtime mode.",
31321
+ description: "Cancel an in-flight extraction batch while it is accumulating, submitted or processing. Documents of an accumulating batch become extraction_failed and can be re-uploaded in realtime mode.",
31317
31322
  content: [
31318
- { type: "paragraph", text: "**Cancel a batch** that is still `accumulating` or `submitted` to stop deferred extraction for its documents. Cancellation sends a stop request to the provider if the batch was already submitted. Documents in the cancelled batch revert to `batch_queued` status and can be resubmitted or processed via realtime extraction." },
31323
+ { type: "paragraph", text: '**Cancel a batch** that is still `accumulating`, `submitted` or `processing` to stop deferred extraction for its documents. Cancelling an `accumulating` batch cancels its items and marks its documents `extraction_failed` (error: "Batch cancelled before submission. Re-upload with batch mode disabled to process now."), with a `document.extraction_failed` event per document. A batch in `submitting` (being sent to the provider) answers `400`.' },
31319
31324
  { type: "paragraph", text: "Use cancellation when you need to abort a batch \u2014 for example, if documents were submitted with an incorrect schema or you need results faster via realtime extraction. Cancel as early as possible; items already processed by the provider before the cancellation lands may still have their results applied." },
31320
- { type: "paragraph", text: "The response returns the batch with `status: cancelled`. The `succeeded_count` may be non-zero if some items were processed before cancellation took effect. Documents revert to `batch_queued` status and can be re-processed by updating their `processing_mode` to `realtime` or by including them in a new batch." },
31321
- { type: "paragraph", text: "Only batches in `accumulating` or `submitted` status can be cancelled: calling cancel on a `completed`, `failed`, or already `cancelled` batch returns `409 Conflict`. Pair with `GET /v1/batches/{id}` after cancellation to inspect which items were processed before the stop request landed." },
31325
+ { type: "paragraph", text: "The response returns the batch with `status: cancelled`. The `succeeded_count` may be non-zero if some items were processed before cancellation took effect. Documents of a cancelled `accumulating` batch are `extraction_failed`; re-upload them with batch mode disabled to process them in realtime." },
31326
+ { type: "paragraph", text: "Only batches in `accumulating`, `submitted` or `processing` status can be cancelled: calling cancel on a `submitting`, `completed`, `failed`, `expired`, `partial` or already `cancelled` batch returns `400`. Pair with `GET /v1/batches/{id}` after cancellation to inspect which items were processed before the stop request landed." },
31322
31327
  {
31323
31328
  type: "endpoint",
31324
31329
  method: "POST",
31325
31330
  path: "/v1/batches/{id}/cancel",
31326
31331
  summary: "Cancel a batch.",
31327
- description: "Requires write scope. Cancels the batch and notifies the provider if already submitted. Documents in the batch revert to `batch_queued` status and can be reprocessed.",
31332
+ description: "Requires write scope. Cancels the batch and notifies the provider if already submitted. Documents of an `accumulating` batch become `extraction_failed` and can be re-uploaded with batch mode disabled.",
31328
31333
  blocks: [
31329
31334
  {
31330
31335
  type: "param-table",
@@ -31386,9 +31391,9 @@ var sections46 = [
31386
31391
  type: "param-table",
31387
31392
  title: "Error responses",
31388
31393
  params: [
31394
+ { name: "400", type: "VALIDATION_ERROR", description: "Batch is not in a cancellable status. Only accumulating, submitted or processing batches can be cancelled." },
31389
31395
  { name: "401", type: "unauthorized", description: "Missing or invalid API key." },
31390
31396
  { name: "404", type: "not_found", description: "No batch with this ID exists for your organization." },
31391
- { name: "409", type: "conflict", description: "Batch is not in a cancellable status. Only accumulating or submitted batches can be cancelled." },
31392
31397
  { name: "429", type: "rate_limited", description: "Too many requests. Retry after the period indicated in the Retry-After header." }
31393
31398
  ]
31394
31399
  }
@@ -31399,11 +31404,11 @@ var sections46 = [
31399
31404
  { label: "Sync Batch", slug: "sync-batch" }
31400
31405
  ],
31401
31406
  faq: [
31402
- { question: "Can I cancel a completed batch?", answer: "No. Only batches in accumulating or submitted status can be cancelled. Completed, failed, and already-cancelled batches return a 409 Conflict error." },
31403
- { question: "What happens to documents after cancellation?", answer: "Documents revert to batch_queued status. You can resubmit them in a new batch or process them via realtime extraction by updating their processing_mode." },
31407
+ { question: "Can I cancel a completed batch?", answer: "No. Only batches in accumulating, submitted or processing status can be cancelled. Completed, failed, expired, partial and already-cancelled batches return a 400 error." },
31408
+ { question: "What happens to documents after cancellation?", answer: 'Documents of a cancelled accumulating batch become extraction_failed with the message "Batch cancelled before submission. Re-upload with batch mode disabled to process now." and a document.extraction_failed event. Re-upload them with batch mode disabled to process them in realtime.' },
31404
31409
  { question: "Will cancellation stop items the provider already processed?", answer: "No. Items the provider finished before the stop request landed may still have their results applied, so succeeded_count can be non-zero on a cancelled batch. Cancel as early as possible." }
31405
31410
  ],
31406
- mentions: ["batch cancellation", "batch_queued", "realtime extraction", "stop request"]
31411
+ mentions: ["batch cancellation", "extraction_failed", "realtime extraction", "stop request"]
31407
31412
  }
31408
31413
  ];
31409
31414
 
package/dist/index.js CHANGED
@@ -4288,7 +4288,7 @@ function ApiReference({ LinkComponent }) {
4288
4288
  method: "POST",
4289
4289
  path: "/v1/batches/{id}/cancel",
4290
4290
  summary: "Cancel a batch inference run.",
4291
- description: "Cancel an in-flight batch. Only batches in accumulating or submitted status can be cancelled."
4291
+ description: "Cancel an in-flight batch. Only batches in accumulating, submitted or processing status can be cancelled; any other status, including submitting (being sent to the provider), answers 400."
4292
4292
  }
4293
4293
  ) }),
4294
4294
  /* @__PURE__ */ jsx5(SectionHeading, { id: "usage", children: "Usage" }),