@llamaindex/llama-cloud 2.8.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/package.json +1 -1
  3. package/resources/batches.d.mts +20 -21
  4. package/resources/batches.d.mts.map +1 -1
  5. package/resources/batches.d.ts +20 -21
  6. package/resources/batches.d.ts.map +1 -1
  7. package/resources/batches.js +1 -2
  8. package/resources/batches.js.map +1 -1
  9. package/resources/batches.mjs +1 -2
  10. package/resources/batches.mjs.map +1 -1
  11. package/resources/beta/batch/batch.d.mts +1 -1
  12. package/resources/beta/batch/batch.d.mts.map +1 -1
  13. package/resources/beta/batch/batch.d.ts +1 -1
  14. package/resources/beta/batch/batch.d.ts.map +1 -1
  15. package/resources/beta/batch/batch.js.map +1 -1
  16. package/resources/beta/batch/batch.mjs.map +1 -1
  17. package/resources/beta/batch/job-items.d.mts +1 -1
  18. package/resources/beta/batch/job-items.d.mts.map +1 -1
  19. package/resources/beta/batch/job-items.d.ts +1 -1
  20. package/resources/beta/batch/job-items.d.ts.map +1 -1
  21. package/resources/beta/directories/files.d.mts +7 -7
  22. package/resources/beta/directories/files.d.mts.map +1 -1
  23. package/resources/beta/directories/files.d.ts +7 -7
  24. package/resources/beta/directories/files.d.ts.map +1 -1
  25. package/resources/beta/retrieval.d.mts +1 -1
  26. package/resources/beta/retrieval.d.mts.map +1 -1
  27. package/resources/beta/retrieval.d.ts +1 -1
  28. package/resources/beta/retrieval.d.ts.map +1 -1
  29. package/resources/beta/sheets.d.mts +117 -10
  30. package/resources/beta/sheets.d.mts.map +1 -1
  31. package/resources/beta/sheets.d.ts +117 -10
  32. package/resources/beta/sheets.d.ts.map +1 -1
  33. package/resources/beta/sheets.js +8 -2
  34. package/resources/beta/sheets.js.map +1 -1
  35. package/resources/beta/sheets.mjs +8 -2
  36. package/resources/beta/sheets.mjs.map +1 -1
  37. package/resources/classifier/jobs.d.mts +8 -2
  38. package/resources/classifier/jobs.d.mts.map +1 -1
  39. package/resources/classifier/jobs.d.ts +8 -2
  40. package/resources/classifier/jobs.d.ts.map +1 -1
  41. package/resources/classify.d.mts +60 -0
  42. package/resources/classify.d.mts.map +1 -1
  43. package/resources/classify.d.ts +60 -0
  44. package/resources/classify.d.ts.map +1 -1
  45. package/resources/configurations.d.mts +49 -13
  46. package/resources/configurations.d.mts.map +1 -1
  47. package/resources/configurations.d.ts +49 -13
  48. package/resources/configurations.d.ts.map +1 -1
  49. package/resources/extract.d.mts +7 -7
  50. package/resources/extract.d.mts.map +1 -1
  51. package/resources/extract.d.ts +7 -7
  52. package/resources/extract.d.ts.map +1 -1
  53. package/resources/parsing.d.mts +44 -8
  54. package/resources/parsing.d.mts.map +1 -1
  55. package/resources/parsing.d.ts +44 -8
  56. package/resources/parsing.d.ts.map +1 -1
  57. package/resources/pipelines/pipelines.d.mts +1 -1
  58. package/resources/pipelines/pipelines.d.mts.map +1 -1
  59. package/resources/pipelines/pipelines.d.ts +1 -1
  60. package/resources/pipelines/pipelines.d.ts.map +1 -1
  61. package/resources/pipelines/pipelines.js.map +1 -1
  62. package/resources/pipelines/pipelines.mjs.map +1 -1
  63. package/resources/shared.d.mts +1 -1
  64. package/resources/shared.d.mts.map +1 -1
  65. package/resources/shared.d.ts +1 -1
  66. package/resources/shared.d.ts.map +1 -1
  67. package/src/resources/batches.ts +20 -21
  68. package/src/resources/beta/batch/batch.ts +6 -0
  69. package/src/resources/beta/batch/job-items.ts +6 -0
  70. package/src/resources/beta/directories/files.ts +7 -7
  71. package/src/resources/beta/retrieval.ts +1 -1
  72. package/src/resources/beta/sheets.ts +177 -10
  73. package/src/resources/classifier/jobs.ts +9 -2
  74. package/src/resources/classify.ts +114 -0
  75. package/src/resources/configurations.ts +52 -14
  76. package/src/resources/extract.ts +18 -6
  77. package/src/resources/parsing.ts +46 -8
  78. package/src/resources/pipelines/pipelines.ts +6 -0
  79. package/src/resources/shared.ts +1 -1
  80. package/src/version.ts +1 -1
  81. package/version.d.mts +1 -1
  82. package/version.d.ts +1 -1
  83. package/version.js +1 -1
  84. package/version.mjs +1 -1
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as FilesAPI from '../files';
5
- import * as ParsingAPI from '../parsing';
6
5
  import { APIPromise } from '../../core/api-promise';
7
6
  import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from '../../core/pagination';
8
7
  import { RequestOptions } from '../../internal/request-options';
@@ -11,8 +10,14 @@ import { pollUntilComplete, PollingOptions, DEFAULT_TIMEOUT } from '../../core/p
11
10
 
12
11
  export class Sheets extends APIResource {
13
12
  /**
14
- * Create a spreadsheet parsing job. Experimental: not production-ready and subject
15
- * to change.
13
+ * Create a spreadsheet parsing job.
14
+ *
15
+ * Provide at most one of `configuration` (an inline parsing configuration) or
16
+ * `configuration_id` (a saved configuration preset). If neither is provided, a
17
+ * default configuration is used. Optionally include `webhook_configurations` to
18
+ * receive `sheets.*` status notifications.
19
+ *
20
+ * Experimental: not production-ready and subject to change.
16
21
  *
17
22
  * @example
18
23
  * ```ts
@@ -244,7 +249,7 @@ export class Sheets extends APIResource {
244
249
  export type SheetsJobsPaginatedCursor = PaginatedCursor<SheetsJob>;
245
250
 
246
251
  /**
247
- * A spreadsheet parsing job
252
+ * A spreadsheet parsing job.
248
253
  */
249
254
  export interface SheetsJob {
250
255
  /**
@@ -253,9 +258,10 @@ export interface SheetsJob {
253
258
  id: string;
254
259
 
255
260
  /**
256
- * Configuration for the parsing job
261
+ * Configuration applied to the parsing job (inline or resolved from a saved
262
+ * preset).
257
263
  */
258
- config: SheetsParsingConfig;
264
+ configuration: SheetsParsingConfig;
259
265
 
260
266
  /**
261
267
  * When the job was created
@@ -275,7 +281,7 @@ export interface SheetsJob {
275
281
  /**
276
282
  * The status of the parsing job
277
283
  */
278
- status: ParsingAPI.StatusEnum;
284
+ status: 'PENDING' | 'SUCCESS' | 'ERROR' | 'PARTIAL_SUCCESS' | 'CANCELLED';
279
285
 
280
286
  /**
281
287
  * When the job was last updated
@@ -287,6 +293,16 @@ export interface SheetsJob {
287
293
  */
288
294
  user_id: string;
289
295
 
296
+ /**
297
+ * @deprecated Configuration for spreadsheet parsing and region extraction
298
+ */
299
+ config?: SheetsParsingConfig | null;
300
+
301
+ /**
302
+ * The saved product configuration ID used at create time, if any.
303
+ */
304
+ configuration_id?: string | null;
305
+
290
306
  /**
291
307
  * Any errors encountered
292
308
  */
@@ -297,6 +313,17 @@ export interface SheetsJob {
297
313
  */
298
314
  file?: FilesAPI.File | null;
299
315
 
316
+ /**
317
+ * Per-status entry timestamps. Returned only when requested via
318
+ * `?expand=metadata_state_transitions`.
319
+ */
320
+ metadata_state_transitions?: { [key: string]: unknown } | null;
321
+
322
+ /**
323
+ * Job-time parameters such as webhook configurations.
324
+ */
325
+ parameters?: SheetsJob.Parameters;
326
+
300
327
  /**
301
328
  * All extracted regions (populated when job is complete)
302
329
  */
@@ -314,6 +341,68 @@ export interface SheetsJob {
314
341
  }
315
342
 
316
343
  export namespace SheetsJob {
344
+ /**
345
+ * Job-time parameters such as webhook configurations.
346
+ */
347
+ export interface Parameters {
348
+ /**
349
+ * Webhook configurations for job status notifications.
350
+ */
351
+ webhook_configurations?: Array<Parameters.WebhookConfiguration> | null;
352
+ }
353
+
354
+ export namespace Parameters {
355
+ /**
356
+ * Configuration for a single outbound webhook endpoint.
357
+ */
358
+ export interface WebhookConfiguration {
359
+ /**
360
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
361
+ * events are delivered.
362
+ */
363
+ webhook_events?: Array<
364
+ | 'extract.pending'
365
+ | 'extract.success'
366
+ | 'extract.error'
367
+ | 'extract.partial_success'
368
+ | 'extract.cancelled'
369
+ | 'parse.pending'
370
+ | 'parse.running'
371
+ | 'parse.success'
372
+ | 'parse.error'
373
+ | 'parse.partial_success'
374
+ | 'parse.cancelled'
375
+ | 'classify.pending'
376
+ | 'classify.running'
377
+ | 'classify.success'
378
+ | 'classify.error'
379
+ | 'classify.partial_success'
380
+ | 'classify.cancelled'
381
+ | 'sheets.pending'
382
+ | 'sheets.success'
383
+ | 'sheets.error'
384
+ | 'sheets.partial_success'
385
+ | 'sheets.cancelled'
386
+ | 'unmapped_event'
387
+ > | null;
388
+
389
+ /**
390
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
391
+ */
392
+ webhook_headers?: { [key: string]: string } | null;
393
+
394
+ /**
395
+ * Response format sent to the webhook: 'string' (default) or 'json'
396
+ */
397
+ webhook_output_format?: string | null;
398
+
399
+ /**
400
+ * URL to receive webhook POST notifications
401
+ */
402
+ webhook_url?: string | null;
403
+ }
404
+ }
405
+
317
406
  /**
318
407
  * A summary of a single extracted region from a spreadsheet
319
408
  */
@@ -442,12 +531,84 @@ export interface SheetCreateParams {
442
531
  project_id?: string | null;
443
532
 
444
533
  /**
445
- * Body param: Configuration for the parsing job
534
+ * Body param: Configuration for spreadsheet parsing and region extraction
446
535
  */
447
- config?: SheetsParsingConfig;
536
+ config?: SheetsParsingConfig | null;
537
+
538
+ /**
539
+ * Body param: Configuration for spreadsheet parsing and region extraction
540
+ */
541
+ configuration?: SheetsParsingConfig | null;
542
+
543
+ /**
544
+ * Body param: Saved configuration ID
545
+ */
546
+ configuration_id?: string | null;
547
+
548
+ /**
549
+ * Body param: Outbound webhook endpoints to notify on job status changes
550
+ */
551
+ webhook_configurations?: Array<SheetCreateParams.WebhookConfiguration> | null;
552
+ }
553
+
554
+ export namespace SheetCreateParams {
555
+ /**
556
+ * Configuration for a single outbound webhook endpoint.
557
+ */
558
+ export interface WebhookConfiguration {
559
+ /**
560
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
561
+ * events are delivered.
562
+ */
563
+ webhook_events?: Array<
564
+ | 'extract.pending'
565
+ | 'extract.success'
566
+ | 'extract.error'
567
+ | 'extract.partial_success'
568
+ | 'extract.cancelled'
569
+ | 'parse.pending'
570
+ | 'parse.running'
571
+ | 'parse.success'
572
+ | 'parse.error'
573
+ | 'parse.partial_success'
574
+ | 'parse.cancelled'
575
+ | 'classify.pending'
576
+ | 'classify.running'
577
+ | 'classify.success'
578
+ | 'classify.error'
579
+ | 'classify.partial_success'
580
+ | 'classify.cancelled'
581
+ | 'sheets.pending'
582
+ | 'sheets.success'
583
+ | 'sheets.error'
584
+ | 'sheets.partial_success'
585
+ | 'sheets.cancelled'
586
+ | 'unmapped_event'
587
+ > | null;
588
+
589
+ /**
590
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
591
+ */
592
+ webhook_headers?: { [key: string]: string } | null;
593
+
594
+ /**
595
+ * Response format sent to the webhook: 'string' (default) or 'json'
596
+ */
597
+ webhook_output_format?: string | null;
598
+
599
+ /**
600
+ * URL to receive webhook POST notifications
601
+ */
602
+ webhook_url?: string | null;
603
+ }
448
604
  }
449
605
 
450
606
  export interface SheetListParams extends PaginatedCursorParams {
607
+ /**
608
+ * Filter by saved configuration ID
609
+ */
610
+ configuration_id?: string | null;
611
+
451
612
  /**
452
613
  * Include items created at or after this timestamp (inclusive)
453
614
  */
@@ -472,7 +633,7 @@ export interface SheetListParams extends PaginatedCursorParams {
472
633
  /**
473
634
  * Filter by job status
474
635
  */
475
- status?: ParsingAPI.StatusEnum | null;
636
+ status?: 'PENDING' | 'SUCCESS' | 'ERROR' | 'PARTIAL_SUCCESS' | 'CANCELLED' | null;
476
637
  }
477
638
 
478
639
  export interface SheetDeleteJobParams {
@@ -482,6 +643,12 @@ export interface SheetDeleteJobParams {
482
643
  }
483
644
 
484
645
  export interface SheetGetParams {
646
+ /**
647
+ * Optional fields to populate on the response. Valid values:
648
+ * metadata_state_transitions.
649
+ */
650
+ expand?: Array<string>;
651
+
485
652
  include_results?: boolean;
486
653
 
487
654
  organization_id?: string | null;
@@ -373,8 +373,9 @@ export namespace JobCreateParams {
373
373
  export interface WebhookConfiguration {
374
374
  /**
375
375
  * Events that trigger this webhook. Options: 'parse.success' (job completed),
376
- * 'parse.failure' (job failed), 'parse.partial' (some pages failed). If not
377
- * specified, webhook fires for all events
376
+ * 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
377
+ * 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
378
+ * fires for all events
378
379
  */
379
380
  webhook_events?: Array<string> | null;
380
381
 
@@ -384,6 +385,12 @@ export namespace JobCreateParams {
384
385
  */
385
386
  webhook_headers?: { [key: string]: unknown } | null;
386
387
 
388
+ /**
389
+ * Format of the webhook payload body. 'string' (default) sends the payload as a
390
+ * JSON-encoded string; 'json' sends it as a JSON object.
391
+ */
392
+ webhook_output_format?: 'string' | 'json' | null;
393
+
387
394
  /**
388
395
  * HTTPS URL to receive webhook POST requests. Must be publicly accessible
389
396
  */
@@ -284,6 +284,63 @@ export interface ClassifyCreateRequest {
284
284
  * Idempotency key scoped to the project
285
285
  */
286
286
  transaction_id?: string | null;
287
+
288
+ /**
289
+ * Outbound webhook endpoints to notify on job status changes
290
+ */
291
+ webhook_configurations?: Array<ClassifyCreateRequest.WebhookConfiguration> | null;
292
+ }
293
+
294
+ export namespace ClassifyCreateRequest {
295
+ /**
296
+ * Configuration for a single outbound webhook endpoint.
297
+ */
298
+ export interface WebhookConfiguration {
299
+ /**
300
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
301
+ * events are delivered.
302
+ */
303
+ webhook_events?: Array<
304
+ | 'extract.pending'
305
+ | 'extract.success'
306
+ | 'extract.error'
307
+ | 'extract.partial_success'
308
+ | 'extract.cancelled'
309
+ | 'parse.pending'
310
+ | 'parse.running'
311
+ | 'parse.success'
312
+ | 'parse.error'
313
+ | 'parse.partial_success'
314
+ | 'parse.cancelled'
315
+ | 'classify.pending'
316
+ | 'classify.running'
317
+ | 'classify.success'
318
+ | 'classify.error'
319
+ | 'classify.partial_success'
320
+ | 'classify.cancelled'
321
+ | 'sheets.pending'
322
+ | 'sheets.success'
323
+ | 'sheets.error'
324
+ | 'sheets.partial_success'
325
+ | 'sheets.cancelled'
326
+ | 'unmapped_event'
327
+ > | null;
328
+
329
+ /**
330
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
331
+ */
332
+ webhook_headers?: { [key: string]: string } | null;
333
+
334
+ /**
335
+ * Response format sent to the webhook: 'string' (default) or 'json'
336
+ */
337
+ webhook_output_format?: string | null;
338
+
339
+ /**
340
+ * URL to receive webhook POST notifications
341
+ */
342
+ webhook_url?: string | null;
343
+ }
287
344
  }
288
345
 
289
346
  /**
@@ -571,6 +628,63 @@ export interface ClassifyCreateParams {
571
628
  * Body param: Idempotency key scoped to the project
572
629
  */
573
630
  transaction_id?: string | null;
631
+
632
+ /**
633
+ * Body param: Outbound webhook endpoints to notify on job status changes
634
+ */
635
+ webhook_configurations?: Array<ClassifyCreateParams.WebhookConfiguration> | null;
636
+ }
637
+
638
+ export namespace ClassifyCreateParams {
639
+ /**
640
+ * Configuration for a single outbound webhook endpoint.
641
+ */
642
+ export interface WebhookConfiguration {
643
+ /**
644
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
645
+ * events are delivered.
646
+ */
647
+ webhook_events?: Array<
648
+ | 'extract.pending'
649
+ | 'extract.success'
650
+ | 'extract.error'
651
+ | 'extract.partial_success'
652
+ | 'extract.cancelled'
653
+ | 'parse.pending'
654
+ | 'parse.running'
655
+ | 'parse.success'
656
+ | 'parse.error'
657
+ | 'parse.partial_success'
658
+ | 'parse.cancelled'
659
+ | 'classify.pending'
660
+ | 'classify.running'
661
+ | 'classify.success'
662
+ | 'classify.error'
663
+ | 'classify.partial_success'
664
+ | 'classify.cancelled'
665
+ | 'sheets.pending'
666
+ | 'sheets.success'
667
+ | 'sheets.error'
668
+ | 'sheets.partial_success'
669
+ | 'sheets.cancelled'
670
+ | 'unmapped_event'
671
+ > | null;
672
+
673
+ /**
674
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
675
+ */
676
+ webhook_headers?: { [key: string]: string } | null;
677
+
678
+ /**
679
+ * Response format sent to the webhook: 'string' (default) or 'json'
680
+ */
681
+ webhook_output_format?: string | null;
682
+
683
+ /**
684
+ * URL to receive webhook POST notifications
685
+ */
686
+ webhook_url?: string | null;
687
+ }
574
688
  }
575
689
 
576
690
  export interface ClassifyListParams extends PaginatedCursorParams {
@@ -359,12 +359,6 @@ export interface ExtractV2Parameters {
359
359
  */
360
360
  confidence_scores?: boolean;
361
361
 
362
- /**
363
- * Extract algorithm version. Use 'latest' for the default pipeline or a date
364
- * string (e.g. '2026-01-08') to pin to a specific release.
365
- */
366
- extract_version?: string;
367
-
368
362
  /**
369
363
  * Granularity of extraction: per_doc returns one object per document, per_page
370
364
  * returns one object per page, per_table_row returns one object per table row
@@ -403,6 +397,12 @@ export interface ExtractV2Parameters {
403
397
  * Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
404
398
  */
405
399
  tier?: 'cost_effective' | 'agentic';
400
+
401
+ /**
402
+ * Use 'latest' for the latest release for the selected tier or a date string
403
+ * (YYYY-MM-DD format) to pin to the nearest release at or before that date.
404
+ */
405
+ version?: string;
406
406
  }
407
407
 
408
408
  /**
@@ -426,11 +426,19 @@ export interface ParseV2Parameters {
426
426
  tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus';
427
427
 
428
428
  /**
429
- * Tier version. Use 'latest' for the current stable version, or pin a dated
430
- * version for reproducible results. See GET /api/v2/parse/versions for the
431
- * per-tier list.
429
+ * Version for the selected tier. Use `latest`, or pin one of that tier's dated
430
+ * versions.
431
+ *
432
+ * Current `latest` by tier:
433
+ *
434
+ * - `fast`: `2025-12-11`
435
+ * - `cost_effective`: `2026-06-05`
436
+ * - `agentic`: `2026-06-04`
437
+ * - `agentic_plus`: `2026-06-04`
438
+ *
439
+ * Full list: `GET /api/v2/parse/versions`.
432
440
  */
433
- version: 'latest' | '2026-05-21' | '2026-04-09' | '2025-12-11' | (string & {});
441
+ version: 'latest' | '2026-06-05' | '2026-06-04' | '2025-12-11' | (string & {});
434
442
 
435
443
  /**
436
444
  * Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
@@ -665,6 +673,19 @@ export namespace ParseV2Parameters {
665
673
  */
666
674
  extract_printed_page_number?: boolean | null;
667
675
 
676
+ /**
677
+ * Bounding-box granularity levels to compute for the parse. 'word' computes one
678
+ * bounding box per detected word; 'line' computes one per text line; 'cell'
679
+ * computes one per table cell. Multiple levels can be requested. Empty list
680
+ * (default) disables granular bboxes — only item-level layout boxes are returned
681
+ * on the result. When set, the computed boxes are not inlined on the result items;
682
+ * they are written to a separate `grounded_items` sidecar (JSONL, one row per
683
+ * page) and exposed as `result_content_metadata.grounded_items` (a presigned
684
+ * download URL) on the parse result. Each row matches the `GroundedJsonItem`
685
+ * shape.
686
+ */
687
+ granular_bboxes?: Array<'cell' | 'line' | 'word'>;
688
+
668
689
  /**
669
690
  * Image categories to extract and save. Options: 'screenshot' (full page renders
670
691
  * useful for visual QA), 'embedded' (images found within the document), 'layout'
@@ -1186,9 +1207,19 @@ export namespace ParseV2Parameters {
1186
1207
  tier?: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | null;
1187
1208
 
1188
1209
  /**
1189
- * Tier version when overriding tier. Required when tier is specified
1210
+ * Version for the override tier. Required when `tier` is set. Use `latest`, or pin
1211
+ * one of that tier's dated versions.
1212
+ *
1213
+ * Current `latest` by tier:
1214
+ *
1215
+ * - `fast`: `2025-12-11`
1216
+ * - `cost_effective`: `2026-06-05`
1217
+ * - `agentic`: `2026-06-04`
1218
+ * - `agentic_plus`: `2026-06-04`
1219
+ *
1220
+ * Full list: `GET /api/v2/parse/versions`.
1190
1221
  */
1191
- version?: 'latest' | '2026-05-21' | '2026-04-09' | '2025-12-11' | (string & {}) | null;
1222
+ version?: 'latest' | '2026-06-05' | '2026-06-04' | '2025-12-11' | (string & {}) | null;
1192
1223
  }
1193
1224
 
1194
1225
  export namespace ParsingConf {
@@ -1330,8 +1361,9 @@ export namespace ParseV2Parameters {
1330
1361
  export interface WebhookConfiguration {
1331
1362
  /**
1332
1363
  * Events that trigger this webhook. Options: 'parse.success' (job completed),
1333
- * 'parse.failure' (job failed), 'parse.partial' (some pages failed). If not
1334
- * specified, webhook fires for all events
1364
+ * 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
1365
+ * 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
1366
+ * fires for all events
1335
1367
  */
1336
1368
  webhook_events?: Array<string> | null;
1337
1369
 
@@ -1341,6 +1373,12 @@ export namespace ParseV2Parameters {
1341
1373
  */
1342
1374
  webhook_headers?: { [key: string]: unknown } | null;
1343
1375
 
1376
+ /**
1377
+ * Format of the webhook payload body. 'string' (default) sends the payload as a
1378
+ * JSON-encoded string; 'json' sends it as a JSON object.
1379
+ */
1380
+ webhook_output_format?: 'string' | 'json' | null;
1381
+
1344
1382
  /**
1345
1383
  * HTTPS URL to receive webhook POST requests. Must be publicly accessible
1346
1384
  */
@@ -289,12 +289,6 @@ export interface ExtractConfiguration {
289
289
  */
290
290
  confidence_scores?: boolean;
291
291
 
292
- /**
293
- * Extract algorithm version. Use 'latest' for the default pipeline or a date
294
- * string (e.g. '2026-01-08') to pin to a specific release.
295
- */
296
- extract_version?: string;
297
-
298
292
  /**
299
293
  * Granularity of extraction: per_doc returns one object per document, per_page
300
294
  * returns one object per page, per_table_row returns one object per table row
@@ -333,6 +327,12 @@ export interface ExtractConfiguration {
333
327
  * Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
334
328
  */
335
329
  tier?: 'cost_effective' | 'agentic';
330
+
331
+ /**
332
+ * Use 'latest' for the latest release for the selected tier or a date string
333
+ * (YYYY-MM-DD format) to pin to the nearest release at or before that date.
334
+ */
335
+ version?: string;
336
336
  }
337
337
 
338
338
  /**
@@ -502,10 +502,16 @@ export namespace ExtractV2JobCreate {
502
502
  | 'parse.partial_success'
503
503
  | 'parse.cancelled'
504
504
  | 'classify.pending'
505
+ | 'classify.running'
505
506
  | 'classify.success'
506
507
  | 'classify.error'
507
508
  | 'classify.partial_success'
508
509
  | 'classify.cancelled'
510
+ | 'sheets.pending'
511
+ | 'sheets.success'
512
+ | 'sheets.error'
513
+ | 'sheets.partial_success'
514
+ | 'sheets.cancelled'
509
515
  | 'unmapped_event'
510
516
  > | null;
511
517
 
@@ -686,10 +692,16 @@ export namespace ExtractCreateParams {
686
692
  | 'parse.partial_success'
687
693
  | 'parse.cancelled'
688
694
  | 'classify.pending'
695
+ | 'classify.running'
689
696
  | 'classify.success'
690
697
  | 'classify.error'
691
698
  | 'classify.partial_success'
692
699
  | 'classify.cancelled'
700
+ | 'sheets.pending'
701
+ | 'sheets.success'
702
+ | 'sheets.error'
703
+ | 'sheets.partial_success'
704
+ | 'sheets.cancelled'
693
705
  | 'unmapped_event'
694
706
  > | null;
695
707
 
@@ -1368,11 +1368,19 @@ export interface ParsingCreateParams {
1368
1368
  tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus';
1369
1369
 
1370
1370
  /**
1371
- * Body param: Tier version. Use 'latest' for the current stable version, or pin a
1372
- * dated version for reproducible results. See GET /api/v2/parse/versions for the
1373
- * per-tier list.
1371
+ * Body param: Version for the selected tier. Use `latest`, or pin one of that
1372
+ * tier's dated versions.
1373
+ *
1374
+ * Current `latest` by tier:
1375
+ *
1376
+ * - `fast`: `2025-12-11`
1377
+ * - `cost_effective`: `2026-06-05`
1378
+ * - `agentic`: `2026-06-04`
1379
+ * - `agentic_plus`: `2026-06-04`
1380
+ *
1381
+ * Full list: `GET /api/v2/parse/versions`.
1374
1382
  */
1375
- version: 'latest' | '2026-05-21' | '2026-04-09' | '2025-12-11' | (string & {});
1383
+ version: 'latest' | '2026-06-05' | '2026-06-04' | '2025-12-11' | (string & {});
1376
1384
 
1377
1385
  /**
1378
1386
  * Query param
@@ -1635,6 +1643,19 @@ export namespace ParsingCreateParams {
1635
1643
  */
1636
1644
  extract_printed_page_number?: boolean | null;
1637
1645
 
1646
+ /**
1647
+ * Bounding-box granularity levels to compute for the parse. 'word' computes one
1648
+ * bounding box per detected word; 'line' computes one per text line; 'cell'
1649
+ * computes one per table cell. Multiple levels can be requested. Empty list
1650
+ * (default) disables granular bboxes — only item-level layout boxes are returned
1651
+ * on the result. When set, the computed boxes are not inlined on the result items;
1652
+ * they are written to a separate `grounded_items` sidecar (JSONL, one row per
1653
+ * page) and exposed as `result_content_metadata.grounded_items` (a presigned
1654
+ * download URL) on the parse result. Each row matches the `GroundedJsonItem`
1655
+ * shape.
1656
+ */
1657
+ granular_bboxes?: Array<'cell' | 'line' | 'word'>;
1658
+
1638
1659
  /**
1639
1660
  * Image categories to extract and save. Options: 'screenshot' (full page renders
1640
1661
  * useful for visual QA), 'embedded' (images found within the document), 'layout'
@@ -2156,9 +2177,19 @@ export namespace ParsingCreateParams {
2156
2177
  tier?: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | null;
2157
2178
 
2158
2179
  /**
2159
- * Tier version when overriding tier. Required when tier is specified
2180
+ * Version for the override tier. Required when `tier` is set. Use `latest`, or pin
2181
+ * one of that tier's dated versions.
2182
+ *
2183
+ * Current `latest` by tier:
2184
+ *
2185
+ * - `fast`: `2025-12-11`
2186
+ * - `cost_effective`: `2026-06-05`
2187
+ * - `agentic`: `2026-06-04`
2188
+ * - `agentic_plus`: `2026-06-04`
2189
+ *
2190
+ * Full list: `GET /api/v2/parse/versions`.
2160
2191
  */
2161
- version?: 'latest' | '2026-05-21' | '2026-04-09' | '2025-12-11' | (string & {}) | null;
2192
+ version?: 'latest' | '2026-06-05' | '2026-06-04' | '2025-12-11' | (string & {}) | null;
2162
2193
  }
2163
2194
 
2164
2195
  export namespace ParsingConf {
@@ -2300,8 +2331,9 @@ export namespace ParsingCreateParams {
2300
2331
  export interface WebhookConfiguration {
2301
2332
  /**
2302
2333
  * Events that trigger this webhook. Options: 'parse.success' (job completed),
2303
- * 'parse.failure' (job failed), 'parse.partial' (some pages failed). If not
2304
- * specified, webhook fires for all events
2334
+ * 'parse.error' (job failed), 'parse.partial_success' (some pages failed),
2335
+ * 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook
2336
+ * fires for all events
2305
2337
  */
2306
2338
  webhook_events?: Array<string> | null;
2307
2339
 
@@ -2311,6 +2343,12 @@ export namespace ParsingCreateParams {
2311
2343
  */
2312
2344
  webhook_headers?: { [key: string]: unknown } | null;
2313
2345
 
2346
+ /**
2347
+ * Format of the webhook payload body. 'string' (default) sends the payload as a
2348
+ * JSON-encoded string; 'json' sends it as a JSON object.
2349
+ */
2350
+ webhook_output_format?: 'string' | 'json' | null;
2351
+
2314
2352
  /**
2315
2353
  * HTTPS URL to receive webhook POST requests. Must be publicly accessible
2316
2354
  */