@llamaindex/llama-cloud 2.0.0 → 2.2.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 (75) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +5 -2
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +5 -2
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/beta/parse-configurations.d.mts +7 -9
  12. package/resources/beta/parse-configurations.d.mts.map +1 -1
  13. package/resources/beta/parse-configurations.d.ts +7 -9
  14. package/resources/beta/parse-configurations.d.ts.map +1 -1
  15. package/resources/beta/parse-configurations.js +7 -9
  16. package/resources/beta/parse-configurations.js.map +1 -1
  17. package/resources/beta/parse-configurations.mjs +7 -9
  18. package/resources/beta/parse-configurations.mjs.map +1 -1
  19. package/resources/beta/sheets.d.mts +2 -2
  20. package/resources/beta/sheets.d.ts +2 -2
  21. package/resources/beta/split.d.mts +2 -2
  22. package/resources/beta/split.d.ts +2 -2
  23. package/resources/classify.d.mts +22 -14
  24. package/resources/classify.d.mts.map +1 -1
  25. package/resources/classify.d.ts +22 -14
  26. package/resources/classify.d.ts.map +1 -1
  27. package/resources/classify.js +3 -3
  28. package/resources/classify.mjs +3 -3
  29. package/resources/configurations.d.mts +1095 -0
  30. package/resources/configurations.d.mts.map +1 -0
  31. package/resources/configurations.d.ts +1095 -0
  32. package/resources/configurations.d.ts.map +1 -0
  33. package/resources/configurations.js +63 -0
  34. package/resources/configurations.js.map +1 -0
  35. package/resources/configurations.mjs +59 -0
  36. package/resources/configurations.mjs.map +1 -0
  37. package/resources/extract.d.mts +29 -992
  38. package/resources/extract.d.mts.map +1 -1
  39. package/resources/extract.d.ts +29 -992
  40. package/resources/extract.d.ts.map +1 -1
  41. package/resources/extract.js +7 -8
  42. package/resources/extract.js.map +1 -1
  43. package/resources/extract.mjs +7 -8
  44. package/resources/extract.mjs.map +1 -1
  45. package/resources/files.d.mts +1 -1
  46. package/resources/files.d.ts +1 -1
  47. package/resources/files.js +1 -1
  48. package/resources/files.mjs +1 -1
  49. package/resources/index.d.mts +2 -1
  50. package/resources/index.d.mts.map +1 -1
  51. package/resources/index.d.ts +2 -1
  52. package/resources/index.d.ts.map +1 -1
  53. package/resources/index.js +3 -1
  54. package/resources/index.js.map +1 -1
  55. package/resources/index.mjs +1 -0
  56. package/resources/index.mjs.map +1 -1
  57. package/resources/parsing.d.mts +4 -4
  58. package/resources/parsing.d.mts.map +1 -1
  59. package/resources/parsing.d.ts +4 -4
  60. package/resources/parsing.d.ts.map +1 -1
  61. package/src/client.ts +35 -2
  62. package/src/resources/beta/parse-configurations.ts +7 -9
  63. package/src/resources/beta/sheets.ts +2 -2
  64. package/src/resources/beta/split.ts +2 -2
  65. package/src/resources/classify.ts +24 -14
  66. package/src/resources/configurations.ts +1443 -0
  67. package/src/resources/extract.ts +29 -1229
  68. package/src/resources/files.ts +1 -1
  69. package/src/resources/index.ts +16 -1
  70. package/src/resources/parsing.ts +6 -2
  71. package/src/version.ts +1 -1
  72. package/version.d.mts +1 -1
  73. package/version.d.ts +1 -1
  74. package/version.js +1 -1
  75. package/version.mjs +1 -1
@@ -0,0 +1,1443 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import * as ParsingAPI from './parsing';
5
+ import * as SplitAPI from './beta/split';
6
+ import { APIPromise } from '../core/api-promise';
7
+ import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from '../core/pagination';
8
+ import { buildHeaders } from '../internal/headers';
9
+ import { RequestOptions } from '../internal/request-options';
10
+ import { path } from '../internal/utils/path';
11
+
12
+ export class Configurations extends APIResource {
13
+ /**
14
+ * Create or update a product configuration.
15
+ *
16
+ * If a configuration with the same name already exists for this product type and
17
+ * project, it will be updated (upsert semantics).
18
+ */
19
+ create(params: ConfigurationCreateParams, options?: RequestOptions): APIPromise<ConfigurationResponse> {
20
+ const { organization_id, project_id, ...body } = params;
21
+ return this._client.post('/api/v1/beta/configurations', {
22
+ query: { organization_id, project_id },
23
+ body,
24
+ ...options,
25
+ });
26
+ }
27
+
28
+ /**
29
+ * Get a single product configuration by ID.
30
+ */
31
+ retrieve(
32
+ configID: string,
33
+ query: ConfigurationRetrieveParams | null | undefined = {},
34
+ options?: RequestOptions,
35
+ ): APIPromise<ConfigurationResponse> {
36
+ return this._client.get(path`/api/v1/beta/configurations/${configID}`, { query, ...options });
37
+ }
38
+
39
+ /**
40
+ * Update an existing product configuration.
41
+ */
42
+ update(
43
+ configID: string,
44
+ params: ConfigurationUpdateParams,
45
+ options?: RequestOptions,
46
+ ): APIPromise<ConfigurationResponse> {
47
+ const { organization_id, project_id, ...body } = params;
48
+ return this._client.put(path`/api/v1/beta/configurations/${configID}`, {
49
+ query: { organization_id, project_id },
50
+ body,
51
+ ...options,
52
+ });
53
+ }
54
+
55
+ /**
56
+ * List product configurations for the current project.
57
+ */
58
+ list(
59
+ query: ConfigurationListParams | null | undefined = {},
60
+ options?: RequestOptions,
61
+ ): PagePromise<ConfigurationResponsesPaginatedCursor, ConfigurationResponse> {
62
+ return this._client.getAPIList('/api/v1/beta/configurations', PaginatedCursor<ConfigurationResponse>, {
63
+ query,
64
+ ...options,
65
+ });
66
+ }
67
+
68
+ /**
69
+ * Delete a product configuration.
70
+ */
71
+ delete(
72
+ configID: string,
73
+ params: ConfigurationDeleteParams | null | undefined = {},
74
+ options?: RequestOptions,
75
+ ): APIPromise<void> {
76
+ const { organization_id, project_id } = params ?? {};
77
+ return this._client.delete(path`/api/v1/beta/configurations/${configID}`, {
78
+ query: { organization_id, project_id },
79
+ ...options,
80
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
81
+ });
82
+ }
83
+ }
84
+
85
+ export type ConfigurationResponsesPaginatedCursor = PaginatedCursor<ConfigurationResponse>;
86
+
87
+ /**
88
+ * Typed parameters for a _classify v2_ product configuration.
89
+ */
90
+ export interface ClassifyV2Parameters {
91
+ /**
92
+ * Product type.
93
+ */
94
+ product_type: 'classify_v2';
95
+
96
+ /**
97
+ * Classify rules to evaluate against the document (at least one required)
98
+ */
99
+ rules: Array<ClassifyV2Parameters.Rule>;
100
+
101
+ /**
102
+ * Classify execution mode
103
+ */
104
+ mode?: 'FAST';
105
+
106
+ /**
107
+ * Parsing configuration for classify jobs.
108
+ */
109
+ parsing_configuration?: ClassifyV2Parameters.ParsingConfiguration | null;
110
+ }
111
+
112
+ export namespace ClassifyV2Parameters {
113
+ /**
114
+ * A rule for classifying documents.
115
+ */
116
+ export interface Rule {
117
+ /**
118
+ * Natural language criteria for matching this rule
119
+ */
120
+ description: string;
121
+
122
+ /**
123
+ * Document type to assign when rule matches
124
+ */
125
+ type: string;
126
+ }
127
+
128
+ /**
129
+ * Parsing configuration for classify jobs.
130
+ */
131
+ export interface ParsingConfiguration {
132
+ /**
133
+ * ISO 639-1 language code for the document
134
+ */
135
+ lang?: string;
136
+
137
+ /**
138
+ * Maximum number of pages to process. Omit for no limit.
139
+ */
140
+ max_pages?: number | null;
141
+
142
+ /**
143
+ * Comma-separated page numbers or ranges to process (1-based). Omit to process all
144
+ * pages.
145
+ */
146
+ target_pages?: string | null;
147
+ }
148
+ }
149
+
150
+ /**
151
+ * Request body for creating a product configuration.
152
+ */
153
+ export interface ConfigurationCreate {
154
+ /**
155
+ * Human-readable name for this configuration.
156
+ */
157
+ name: string;
158
+
159
+ /**
160
+ * Product-specific configuration parameters.
161
+ */
162
+ parameters:
163
+ | SplitV1Parameters
164
+ | ExtractV2Parameters
165
+ | ClassifyV2Parameters
166
+ | ParseV2Parameters
167
+ | UntypedParameters;
168
+ }
169
+
170
+ /**
171
+ * Response schema for a single product configuration.
172
+ */
173
+ export interface ConfigurationResponse {
174
+ /**
175
+ * Unique configuration ID.
176
+ */
177
+ id: string;
178
+
179
+ /**
180
+ * Configuration name.
181
+ */
182
+ name: string;
183
+
184
+ /**
185
+ * Product-specific configuration parameters.
186
+ */
187
+ parameters:
188
+ | SplitV1Parameters
189
+ | ExtractV2Parameters
190
+ | ClassifyV2Parameters
191
+ | ParseV2Parameters
192
+ | UntypedParameters;
193
+
194
+ /**
195
+ * Product type.
196
+ */
197
+ product_type: 'split_v1' | 'extract_v2' | 'classify_v2' | 'parse_v2' | 'unknown';
198
+
199
+ /**
200
+ * Version identifier (datetime string).
201
+ */
202
+ version: string;
203
+
204
+ /**
205
+ * Creation timestamp.
206
+ */
207
+ created_at?: string | null;
208
+
209
+ /**
210
+ * Last update timestamp.
211
+ */
212
+ updated_at?: string | null;
213
+ }
214
+
215
+ /**
216
+ * Typed parameters for an _extract v2_ product configuration.
217
+ */
218
+ export interface ExtractV2Parameters {
219
+ /**
220
+ * JSON Schema defining the fields to extract. Validate with the /schema/validate
221
+ * endpoint first.
222
+ */
223
+ data_schema: {
224
+ [key: string]: { [key: string]: unknown } | Array<unknown> | string | number | boolean | null;
225
+ };
226
+
227
+ /**
228
+ * Product type.
229
+ */
230
+ product_type: 'extract_v2';
231
+
232
+ /**
233
+ * Include citations in results
234
+ */
235
+ cite_sources?: boolean;
236
+
237
+ /**
238
+ * Include confidence scores in results
239
+ */
240
+ confidence_scores?: boolean;
241
+
242
+ /**
243
+ * Extract algorithm version. Use 'latest' or a date string.
244
+ */
245
+ extract_version?: string;
246
+
247
+ /**
248
+ * Granularity of extraction: per_doc returns one object per document, per_page
249
+ * returns one object per page, per_table_row returns one object per table row
250
+ */
251
+ extraction_target?: 'per_doc' | 'per_page' | 'per_table_row';
252
+
253
+ /**
254
+ * ISO 639-1 language code for the document
255
+ */
256
+ lang?: string;
257
+
258
+ /**
259
+ * Maximum number of pages to process. Omit for no limit.
260
+ */
261
+ max_pages?: number | null;
262
+
263
+ /**
264
+ * Saved parse configuration ID to control how the document is parsed before
265
+ * extraction
266
+ */
267
+ parse_config_id?: string | null;
268
+
269
+ /**
270
+ * Parse tier to use before extraction (fast, cost_effective, or agentic)
271
+ */
272
+ parse_tier?: string | null;
273
+
274
+ /**
275
+ * Custom system prompt to guide extraction behavior
276
+ */
277
+ system_prompt?: string | null;
278
+
279
+ /**
280
+ * Comma-separated page numbers or ranges to process (1-based). Omit to process all
281
+ * pages.
282
+ */
283
+ target_pages?: string | null;
284
+
285
+ /**
286
+ * Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
287
+ */
288
+ tier?: 'cost_effective' | 'agentic';
289
+ }
290
+
291
+ /**
292
+ * Configuration for LlamaParse v2 document parsing.
293
+ *
294
+ * Includes tier selection, processing options, output formatting, page targeting,
295
+ * and webhook delivery. Refer to the LlamaParse documentation for details on each
296
+ * field.
297
+ */
298
+ export interface ParseV2Parameters {
299
+ /**
300
+ * Product type.
301
+ */
302
+ product_type: 'parse_v2';
303
+
304
+ /**
305
+ * Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced),
306
+ * 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with
307
+ * highest accuracy)
308
+ */
309
+ tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus';
310
+
311
+ /**
312
+ * Tier version. Use 'latest' for the current stable version, or specify a specific
313
+ * version (e.g., '1.0', '2.0') for reproducible results
314
+ */
315
+ version:
316
+ | '2025-12-11'
317
+ | '2025-12-18'
318
+ | '2025-12-31'
319
+ | '2026-01-08'
320
+ | '2026-01-09'
321
+ | '2026-01-16'
322
+ | '2026-01-21'
323
+ | '2026-01-22'
324
+ | '2026-01-24'
325
+ | '2026-01-29'
326
+ | '2026-01-30'
327
+ | '2026-02-03'
328
+ | '2026-02-18'
329
+ | '2026-02-20'
330
+ | '2026-02-24'
331
+ | '2026-02-26'
332
+ | '2026-03-02'
333
+ | '2026-03-03'
334
+ | '2026-03-04'
335
+ | '2026-03-05'
336
+ | '2026-03-09'
337
+ | '2026-03-10'
338
+ | '2026-03-11'
339
+ | '2026-03-12'
340
+ | '2026-03-17'
341
+ | '2026-03-19'
342
+ | '2026-03-20'
343
+ | '2026-03-22'
344
+ | '2026-03-23'
345
+ | '2026-03-24'
346
+ | '2026-03-25'
347
+ | '2026-03-26'
348
+ | '2026-03-27'
349
+ | '2026-03-30'
350
+ | '2026-03-31'
351
+ | 'latest'
352
+ | (string & {});
353
+
354
+ /**
355
+ * Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
356
+ *
357
+ * These options customize how the AI processes and interprets document content.
358
+ * Only applicable when using non-fast tiers.
359
+ */
360
+ agentic_options?: ParseV2Parameters.AgenticOptions | null;
361
+
362
+ /**
363
+ * Identifier for the client/application making the request. Used for analytics and
364
+ * debugging. Example: 'my-app-v2'
365
+ */
366
+ client_name?: string | null;
367
+
368
+ /**
369
+ * Crop boundaries to process only a portion of each page. Values are ratios 0-1
370
+ * from page edges
371
+ */
372
+ crop_box?: ParseV2Parameters.CropBox;
373
+
374
+ /**
375
+ * Bypass result caching and force re-parsing. Use when document content may have
376
+ * changed or you need fresh results
377
+ */
378
+ disable_cache?: boolean | null;
379
+
380
+ /**
381
+ * Options for fast tier parsing (rule-based, no AI).
382
+ *
383
+ * Fast tier uses deterministic algorithms for text extraction without AI
384
+ * enhancement. It's the fastest and most cost-effective option, best suited for
385
+ * simple documents with standard layouts. Currently has no configurable options
386
+ * but reserved for future expansion.
387
+ */
388
+ fast_options?: unknown | null;
389
+
390
+ /**
391
+ * Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on
392
+ * detected input file type
393
+ */
394
+ input_options?: ParseV2Parameters.InputOptions;
395
+
396
+ /**
397
+ * Output formatting options for markdown, text, and extracted images
398
+ */
399
+ output_options?: ParseV2Parameters.OutputOptions;
400
+
401
+ /**
402
+ * Page selection: limit total pages or specify exact pages to process
403
+ */
404
+ page_ranges?: ParseV2Parameters.PageRanges;
405
+
406
+ /**
407
+ * Job execution controls including timeouts and failure thresholds
408
+ */
409
+ processing_control?: ParseV2Parameters.ProcessingControl;
410
+
411
+ /**
412
+ * Document processing options including OCR, table extraction, and chart parsing
413
+ */
414
+ processing_options?: ParseV2Parameters.ProcessingOptions;
415
+
416
+ /**
417
+ * Webhook endpoints for job status notifications. Multiple webhooks can be
418
+ * configured for different events or services
419
+ */
420
+ webhook_configurations?: Array<ParseV2Parameters.WebhookConfiguration>;
421
+ }
422
+
423
+ export namespace ParseV2Parameters {
424
+ /**
425
+ * Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
426
+ *
427
+ * These options customize how the AI processes and interprets document content.
428
+ * Only applicable when using non-fast tiers.
429
+ */
430
+ export interface AgenticOptions {
431
+ /**
432
+ * Custom instructions for the AI parser. Use to guide extraction behavior, specify
433
+ * output formatting, or provide domain-specific context. Example: 'Extract
434
+ * financial tables with currency symbols. Format dates as YYYY-MM-DD.'
435
+ */
436
+ custom_prompt?: string | null;
437
+ }
438
+
439
+ /**
440
+ * Crop boundaries to process only a portion of each page. Values are ratios 0-1
441
+ * from page edges
442
+ */
443
+ export interface CropBox {
444
+ /**
445
+ * Bottom boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content below this
446
+ * line is excluded
447
+ */
448
+ bottom?: number | null;
449
+
450
+ /**
451
+ * Left boundary as ratio (0-1). 0=left edge, 1=right edge. Content left of this
452
+ * line is excluded
453
+ */
454
+ left?: number | null;
455
+
456
+ /**
457
+ * Right boundary as ratio (0-1). 0=left edge, 1=right edge. Content right of this
458
+ * line is excluded
459
+ */
460
+ right?: number | null;
461
+
462
+ /**
463
+ * Top boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content above this line
464
+ * is excluded
465
+ */
466
+ top?: number | null;
467
+ }
468
+
469
+ /**
470
+ * Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on
471
+ * detected input file type
472
+ */
473
+ export interface InputOptions {
474
+ /**
475
+ * HTML/web page parsing options (applies to .html, .htm files)
476
+ */
477
+ html?: InputOptions.HTML;
478
+
479
+ /**
480
+ * PDF-specific parsing options (applies to .pdf files)
481
+ */
482
+ pdf?: unknown;
483
+
484
+ /**
485
+ * Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
486
+ */
487
+ presentation?: InputOptions.Presentation;
488
+
489
+ /**
490
+ * Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
491
+ */
492
+ spreadsheet?: InputOptions.Spreadsheet;
493
+ }
494
+
495
+ export namespace InputOptions {
496
+ /**
497
+ * HTML/web page parsing options (applies to .html, .htm files)
498
+ */
499
+ export interface HTML {
500
+ /**
501
+ * Force all HTML elements to be visible by overriding CSS display/visibility
502
+ * properties. Useful for parsing pages with hidden content or collapsed sections
503
+ */
504
+ make_all_elements_visible?: boolean | null;
505
+
506
+ /**
507
+ * Remove fixed-position elements (headers, footers, floating buttons) that appear
508
+ * on every page render
509
+ */
510
+ remove_fixed_elements?: boolean | null;
511
+
512
+ /**
513
+ * Remove navigation elements (nav bars, sidebars, menus) to focus on main content
514
+ */
515
+ remove_navigation_elements?: boolean | null;
516
+ }
517
+
518
+ /**
519
+ * Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
520
+ */
521
+ export interface Presentation {
522
+ /**
523
+ * Extract content positioned outside the visible slide area. Some presentations
524
+ * have hidden notes or content that extends beyond slide boundaries
525
+ */
526
+ out_of_bounds_content?: boolean | null;
527
+
528
+ /**
529
+ * Skip extraction of embedded chart data tables. When true, only the visual
530
+ * representation of charts is captured, not the underlying data
531
+ */
532
+ skip_embedded_data?: boolean | null;
533
+ }
534
+
535
+ /**
536
+ * Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
537
+ */
538
+ export interface Spreadsheet {
539
+ /**
540
+ * Detect and extract multiple tables within a single sheet. Useful when
541
+ * spreadsheets contain several data regions separated by blank rows/columns
542
+ */
543
+ detect_sub_tables_in_sheets?: boolean | null;
544
+
545
+ /**
546
+ * Compute formula results instead of extracting formula text. Use when you need
547
+ * calculated values rather than formula definitions
548
+ */
549
+ force_formula_computation_in_sheets?: boolean | null;
550
+
551
+ /**
552
+ * Parse hidden sheets in addition to visible ones. By default, hidden sheets are
553
+ * skipped
554
+ */
555
+ include_hidden_sheets?: boolean | null;
556
+ }
557
+ }
558
+
559
+ /**
560
+ * Output formatting options for markdown, text, and extracted images
561
+ */
562
+ export interface OutputOptions {
563
+ /**
564
+ * Extract the printed page number as it appears in the document (e.g., 'Page 5 of
565
+ * 10', 'v', 'A-3'). Useful for referencing original page numbers
566
+ */
567
+ extract_printed_page_number?: boolean | null;
568
+
569
+ /**
570
+ * Image categories to extract and save. Options: 'screenshot' (full page renders
571
+ * useful for visual QA), 'embedded' (images found within the document), 'layout'
572
+ * (cropped regions from layout detection like figures and diagrams). Empty list
573
+ * saves no images
574
+ */
575
+ images_to_save?: Array<'screenshot' | 'embedded' | 'layout'>;
576
+
577
+ /**
578
+ * Markdown formatting options including table styles and link annotations
579
+ */
580
+ markdown?: OutputOptions.Markdown;
581
+
582
+ /**
583
+ * Spatial text output options for preserving document layout structure
584
+ */
585
+ spatial_text?: OutputOptions.SpatialText;
586
+
587
+ /**
588
+ * Options for exporting tables as XLSX spreadsheets
589
+ */
590
+ tables_as_spreadsheet?: OutputOptions.TablesAsSpreadsheet;
591
+ }
592
+
593
+ export namespace OutputOptions {
594
+ /**
595
+ * Markdown formatting options including table styles and link annotations
596
+ */
597
+ export interface Markdown {
598
+ /**
599
+ * Add link annotations to markdown output in the format [text](url). When false,
600
+ * only the link text is included
601
+ */
602
+ annotate_links?: boolean | null;
603
+
604
+ /**
605
+ * Embed images directly in markdown as base64 data URIs instead of extracting them
606
+ * as separate files. Useful for self-contained markdown output
607
+ */
608
+ inline_images?: boolean | null;
609
+
610
+ /**
611
+ * Table formatting options including markdown vs HTML format and merging behavior
612
+ */
613
+ tables?: Markdown.Tables;
614
+ }
615
+
616
+ export namespace Markdown {
617
+ /**
618
+ * Table formatting options including markdown vs HTML format and merging behavior
619
+ */
620
+ export interface Tables {
621
+ /**
622
+ * Remove extra whitespace padding in markdown table cells for more compact output
623
+ */
624
+ compact_markdown_tables?: boolean | null;
625
+
626
+ /**
627
+ * Separator string for multiline cell content in markdown tables. Example:
628
+ * '&lt;br&gt;' to preserve line breaks, ' ' to join with spaces
629
+ */
630
+ markdown_table_multiline_separator?: string | null;
631
+
632
+ /**
633
+ * Automatically merge tables that span multiple pages into a single table. The
634
+ * merged table appears on the first page with merged_from_pages metadata
635
+ */
636
+ merge_continued_tables?: boolean | null;
637
+
638
+ /**
639
+ * Output tables as markdown pipe tables instead of HTML &lt;table&gt; tags.
640
+ * Markdown tables are simpler but cannot represent complex structures like merged
641
+ * cells
642
+ */
643
+ output_tables_as_markdown?: boolean | null;
644
+ }
645
+ }
646
+
647
+ /**
648
+ * Spatial text output options for preserving document layout structure
649
+ */
650
+ export interface SpatialText {
651
+ /**
652
+ * Keep multi-column layouts intact instead of linearizing columns into sequential
653
+ * text. Automatically enabled for non-fast tiers
654
+ */
655
+ do_not_unroll_columns?: boolean | null;
656
+
657
+ /**
658
+ * Maintain consistent text column alignment across page boundaries. Automatically
659
+ * enabled for document-level parsing modes
660
+ */
661
+ preserve_layout_alignment_across_pages?: boolean | null;
662
+
663
+ /**
664
+ * Include text below the normal size threshold. Useful for footnotes, watermarks,
665
+ * or fine print that might otherwise be filtered out
666
+ */
667
+ preserve_very_small_text?: boolean | null;
668
+ }
669
+
670
+ /**
671
+ * Options for exporting tables as XLSX spreadsheets
672
+ */
673
+ export interface TablesAsSpreadsheet {
674
+ /**
675
+ * Whether this option is enabled
676
+ */
677
+ enable?: boolean | null;
678
+
679
+ /**
680
+ * Automatically generate descriptive sheet names from table context (headers,
681
+ * surrounding text) instead of using generic names like 'Table_1'
682
+ */
683
+ guess_sheet_name?: boolean;
684
+ }
685
+ }
686
+
687
+ /**
688
+ * Page selection: limit total pages or specify exact pages to process
689
+ */
690
+ export interface PageRanges {
691
+ /**
692
+ * Maximum number of pages to process. Pages are processed in order starting from
693
+ * page 1. If both max_pages and target_pages are set, target_pages takes
694
+ * precedence
695
+ */
696
+ max_pages?: number | null;
697
+
698
+ /**
699
+ * Comma-separated list of specific pages to process using 1-based indexing.
700
+ * Supports individual pages and ranges. Examples: '1,3,5' (pages 1, 3, 5), '1-5'
701
+ * (pages 1 through 5 inclusive), '1,3,5-8,10' (pages 1, 3, 5-8, and 10). Pages are
702
+ * sorted and deduplicated automatically. Duplicate pages cause an error
703
+ */
704
+ target_pages?: string | null;
705
+ }
706
+
707
+ /**
708
+ * Job execution controls including timeouts and failure thresholds
709
+ */
710
+ export interface ProcessingControl {
711
+ /**
712
+ * Quality thresholds that determine when a job should fail vs complete with
713
+ * partial results
714
+ */
715
+ job_failure_conditions?: ProcessingControl.JobFailureConditions;
716
+
717
+ /**
718
+ * Timeout settings for job execution. Increase for large or complex documents
719
+ */
720
+ timeouts?: ProcessingControl.Timeouts;
721
+ }
722
+
723
+ export namespace ProcessingControl {
724
+ /**
725
+ * Quality thresholds that determine when a job should fail vs complete with
726
+ * partial results
727
+ */
728
+ export interface JobFailureConditions {
729
+ /**
730
+ * Maximum ratio of pages allowed to fail before the job fails (0-1). Example: 0.1
731
+ * means job fails if more than 10% of pages fail. Default is 0.05 (5%)
732
+ */
733
+ allowed_page_failure_ratio?: number | null;
734
+
735
+ /**
736
+ * Fail the job if a problematic font is detected that may cause incorrect text
737
+ * extraction. Buggy fonts can produce garbled or missing characters
738
+ */
739
+ fail_on_buggy_font?: boolean | null;
740
+
741
+ /**
742
+ * Fail the entire job if any embedded image cannot be extracted. By default, image
743
+ * extraction errors are logged but don't fail the job
744
+ */
745
+ fail_on_image_extraction_error?: boolean | null;
746
+
747
+ /**
748
+ * Fail the entire job if OCR fails on any image. By default, OCR errors result in
749
+ * empty text for that image
750
+ */
751
+ fail_on_image_ocr_error?: boolean | null;
752
+
753
+ /**
754
+ * Fail the entire job if markdown cannot be reconstructed for any page. By
755
+ * default, failed pages use fallback text extraction
756
+ */
757
+ fail_on_markdown_reconstruction_error?: boolean | null;
758
+ }
759
+
760
+ /**
761
+ * Timeout settings for job execution. Increase for large or complex documents
762
+ */
763
+ export interface Timeouts {
764
+ /**
765
+ * Base timeout for the job in seconds (max 1800 = 30 minutes). This is the minimum
766
+ * time allowed regardless of document size
767
+ */
768
+ base_in_seconds?: number | null;
769
+
770
+ /**
771
+ * Additional timeout per page in seconds (max 300 = 5 minutes). Total timeout =
772
+ * base + (this value × page count)
773
+ */
774
+ extra_time_per_page_in_seconds?: number | null;
775
+ }
776
+ }
777
+
778
+ /**
779
+ * Document processing options including OCR, table extraction, and chart parsing
780
+ */
781
+ export interface ProcessingOptions {
782
+ /**
783
+ * Use aggressive heuristics to detect table boundaries, even without visible
784
+ * borders. Useful for documents with borderless or complex tables
785
+ */
786
+ aggressive_table_extraction?: boolean | null;
787
+
788
+ /**
789
+ * Conditional processing rules that apply different parsing options based on page
790
+ * content, document structure, or filename patterns. Each entry defines trigger
791
+ * conditions and the parsing configuration to apply when triggered
792
+ */
793
+ auto_mode_configuration?: Array<ProcessingOptions.AutoModeConfiguration> | null;
794
+
795
+ /**
796
+ * Cost optimizer configuration for reducing parsing costs on simpler pages.
797
+ *
798
+ * When enabled, the parser analyzes each page and routes simpler pages to faster,
799
+ * cheaper processing while preserving quality for complex pages. Only works with
800
+ * 'agentic' or 'agentic_plus' tiers.
801
+ */
802
+ cost_optimizer?: ProcessingOptions.CostOptimizer | null;
803
+
804
+ /**
805
+ * Disable automatic heuristics including outlined table extraction and adaptive
806
+ * long table handling. Use when heuristics produce incorrect results
807
+ */
808
+ disable_heuristics?: boolean | null;
809
+
810
+ /**
811
+ * Options for ignoring specific text types (diagonal, hidden, text in images)
812
+ */
813
+ ignore?: ProcessingOptions.Ignore;
814
+
815
+ /**
816
+ * OCR configuration including language detection settings
817
+ */
818
+ ocr_parameters?: ProcessingOptions.OcrParameters;
819
+
820
+ /**
821
+ * Enable AI-powered chart analysis. Modes: 'efficient' (fast, lower cost),
822
+ * 'agentic' (balanced), 'agentic_plus' (highest accuracy). Automatically enables
823
+ * extract_layout and precise_bounding_box when set
824
+ */
825
+ specialized_chart_parsing?: 'agentic_plus' | 'agentic' | 'efficient' | null;
826
+ }
827
+
828
+ export namespace ProcessingOptions {
829
+ /**
830
+ * A single auto mode rule with trigger conditions and parsing configuration.
831
+ *
832
+ * Auto mode allows conditional parsing where different configurations are applied
833
+ * based on page content, structure, or filename. When triggers match, the
834
+ * parsing_conf overrides default settings for that page.
835
+ */
836
+ export interface AutoModeConfiguration {
837
+ /**
838
+ * Parsing configuration to apply when trigger conditions are met
839
+ */
840
+ parsing_conf: AutoModeConfiguration.ParsingConf;
841
+
842
+ /**
843
+ * Single glob pattern to match against filename
844
+ */
845
+ filename_match_glob?: string | null;
846
+
847
+ /**
848
+ * List of glob patterns to match against filename
849
+ */
850
+ filename_match_glob_list?: Array<string> | null;
851
+
852
+ /**
853
+ * Regex pattern to match against filename
854
+ */
855
+ filename_regexp?: string | null;
856
+
857
+ /**
858
+ * Regex mode flags (e.g., 'i' for case-insensitive)
859
+ */
860
+ filename_regexp_mode?: string | null;
861
+
862
+ /**
863
+ * Trigger if page contains a full-page image (scanned page detection)
864
+ */
865
+ full_page_image_in_page?: boolean | null;
866
+
867
+ /**
868
+ * Threshold for full page image detection (0.0-1.0, default 0.8)
869
+ */
870
+ full_page_image_in_page_threshold?: number | string | null;
871
+
872
+ /**
873
+ * Trigger if page contains non-screenshot images
874
+ */
875
+ image_in_page?: boolean | null;
876
+
877
+ /**
878
+ * Trigger if page contains this layout element type
879
+ */
880
+ layout_element_in_page?: string | null;
881
+
882
+ /**
883
+ * Confidence threshold for layout element detection
884
+ */
885
+ layout_element_in_page_confidence_threshold?: number | string | null;
886
+
887
+ /**
888
+ * Trigger if page has more than N charts
889
+ */
890
+ page_contains_at_least_n_charts?: number | string | null;
891
+
892
+ /**
893
+ * Trigger if page has more than N images
894
+ */
895
+ page_contains_at_least_n_images?: number | string | null;
896
+
897
+ /**
898
+ * Trigger if page has more than N layout elements
899
+ */
900
+ page_contains_at_least_n_layout_elements?: number | string | null;
901
+
902
+ /**
903
+ * Trigger if page has more than N lines
904
+ */
905
+ page_contains_at_least_n_lines?: number | string | null;
906
+
907
+ /**
908
+ * Trigger if page has more than N links
909
+ */
910
+ page_contains_at_least_n_links?: number | string | null;
911
+
912
+ /**
913
+ * Trigger if page has more than N numeric words
914
+ */
915
+ page_contains_at_least_n_numbers?: number | string | null;
916
+
917
+ /**
918
+ * Trigger if page has more than N% numeric words
919
+ */
920
+ page_contains_at_least_n_percent_numbers?: number | string | null;
921
+
922
+ /**
923
+ * Trigger if page has more than N tables
924
+ */
925
+ page_contains_at_least_n_tables?: number | string | null;
926
+
927
+ /**
928
+ * Trigger if page has more than N words
929
+ */
930
+ page_contains_at_least_n_words?: number | string | null;
931
+
932
+ /**
933
+ * Trigger if page has fewer than N charts
934
+ */
935
+ page_contains_at_most_n_charts?: number | string | null;
936
+
937
+ /**
938
+ * Trigger if page has fewer than N images
939
+ */
940
+ page_contains_at_most_n_images?: number | string | null;
941
+
942
+ /**
943
+ * Trigger if page has fewer than N layout elements
944
+ */
945
+ page_contains_at_most_n_layout_elements?: number | string | null;
946
+
947
+ /**
948
+ * Trigger if page has fewer than N lines
949
+ */
950
+ page_contains_at_most_n_lines?: number | string | null;
951
+
952
+ /**
953
+ * Trigger if page has fewer than N links
954
+ */
955
+ page_contains_at_most_n_links?: number | string | null;
956
+
957
+ /**
958
+ * Trigger if page has fewer than N numeric words
959
+ */
960
+ page_contains_at_most_n_numbers?: number | string | null;
961
+
962
+ /**
963
+ * Trigger if page has fewer than N% numeric words
964
+ */
965
+ page_contains_at_most_n_percent_numbers?: number | string | null;
966
+
967
+ /**
968
+ * Trigger if page has fewer than N tables
969
+ */
970
+ page_contains_at_most_n_tables?: number | string | null;
971
+
972
+ /**
973
+ * Trigger if page has fewer than N words
974
+ */
975
+ page_contains_at_most_n_words?: number | string | null;
976
+
977
+ /**
978
+ * Trigger if page has more than N characters
979
+ */
980
+ page_longer_than_n_chars?: number | string | null;
981
+
982
+ /**
983
+ * Trigger on pages with markdown extraction errors
984
+ */
985
+ page_md_error?: boolean | null;
986
+
987
+ /**
988
+ * Trigger if page has fewer than N characters
989
+ */
990
+ page_shorter_than_n_chars?: number | string | null;
991
+
992
+ /**
993
+ * Regex pattern to match in page content
994
+ */
995
+ regexp_in_page?: string | null;
996
+
997
+ /**
998
+ * Regex mode flags for regexp_in_page
999
+ */
1000
+ regexp_in_page_mode?: string | null;
1001
+
1002
+ /**
1003
+ * Trigger if page contains a table
1004
+ */
1005
+ table_in_page?: boolean | null;
1006
+
1007
+ /**
1008
+ * Trigger if page text/markdown contains this string
1009
+ */
1010
+ text_in_page?: string | null;
1011
+
1012
+ /**
1013
+ * How to combine multiple trigger conditions: 'and' (all conditions must match,
1014
+ * this is the default) or 'or' (any single condition can trigger)
1015
+ */
1016
+ trigger_mode?: string | null;
1017
+ }
1018
+
1019
+ export namespace AutoModeConfiguration {
1020
+ /**
1021
+ * Parsing configuration to apply when trigger conditions are met
1022
+ */
1023
+ export interface ParsingConf {
1024
+ /**
1025
+ * Whether to use adaptive long table handling
1026
+ */
1027
+ adaptive_long_table?: boolean | null;
1028
+
1029
+ /**
1030
+ * Whether to use aggressive table extraction
1031
+ */
1032
+ aggressive_table_extraction?: boolean | null;
1033
+
1034
+ /**
1035
+ * Crop box options for auto mode parsing configuration.
1036
+ */
1037
+ crop_box?: ParsingConf.CropBox | null;
1038
+
1039
+ /**
1040
+ * Custom AI instructions for matched pages. Overrides the base custom_prompt
1041
+ */
1042
+ custom_prompt?: string | null;
1043
+
1044
+ /**
1045
+ * Whether to extract layout information
1046
+ */
1047
+ extract_layout?: boolean | null;
1048
+
1049
+ /**
1050
+ * Whether to use high resolution OCR
1051
+ */
1052
+ high_res_ocr?: boolean | null;
1053
+
1054
+ /**
1055
+ * Ignore options for auto mode parsing configuration.
1056
+ */
1057
+ ignore?: ParsingConf.Ignore | null;
1058
+
1059
+ /**
1060
+ * Primary language of the document
1061
+ */
1062
+ language?: string | null;
1063
+
1064
+ /**
1065
+ * Whether to use outlined table extraction
1066
+ */
1067
+ outlined_table_extraction?: boolean | null;
1068
+
1069
+ /**
1070
+ * Presentation-specific options for auto mode parsing configuration.
1071
+ */
1072
+ presentation?: ParsingConf.Presentation | null;
1073
+
1074
+ /**
1075
+ * Spatial text options for auto mode parsing configuration.
1076
+ */
1077
+ spatial_text?: ParsingConf.SpatialText | null;
1078
+
1079
+ /**
1080
+ * Enable specialized chart parsing with the specified mode
1081
+ */
1082
+ specialized_chart_parsing?: 'agentic_plus' | 'agentic' | 'efficient' | null;
1083
+
1084
+ /**
1085
+ * Override the parsing tier for matched pages. Must be paired with version
1086
+ */
1087
+ tier?: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | null;
1088
+
1089
+ /**
1090
+ * Tier version when overriding tier. Required when tier is specified
1091
+ */
1092
+ version?:
1093
+ | '2025-12-11'
1094
+ | '2025-12-18'
1095
+ | '2025-12-31'
1096
+ | '2026-01-08'
1097
+ | '2026-01-09'
1098
+ | '2026-01-16'
1099
+ | '2026-01-21'
1100
+ | '2026-01-22'
1101
+ | '2026-01-24'
1102
+ | '2026-01-29'
1103
+ | '2026-01-30'
1104
+ | '2026-02-03'
1105
+ | '2026-02-18'
1106
+ | '2026-02-20'
1107
+ | '2026-02-24'
1108
+ | '2026-02-26'
1109
+ | '2026-03-02'
1110
+ | '2026-03-03'
1111
+ | '2026-03-04'
1112
+ | '2026-03-05'
1113
+ | '2026-03-09'
1114
+ | '2026-03-10'
1115
+ | '2026-03-11'
1116
+ | '2026-03-12'
1117
+ | '2026-03-17'
1118
+ | '2026-03-19'
1119
+ | '2026-03-20'
1120
+ | '2026-03-22'
1121
+ | '2026-03-23'
1122
+ | '2026-03-24'
1123
+ | '2026-03-25'
1124
+ | '2026-03-26'
1125
+ | '2026-03-27'
1126
+ | '2026-03-30'
1127
+ | '2026-03-31'
1128
+ | 'latest'
1129
+ | (string & {})
1130
+ | null;
1131
+ }
1132
+
1133
+ export namespace ParsingConf {
1134
+ /**
1135
+ * Crop box options for auto mode parsing configuration.
1136
+ */
1137
+ export interface CropBox {
1138
+ /**
1139
+ * Bottom boundary of crop box as ratio (0-1)
1140
+ */
1141
+ bottom?: number | null;
1142
+
1143
+ /**
1144
+ * Left boundary of crop box as ratio (0-1)
1145
+ */
1146
+ left?: number | null;
1147
+
1148
+ /**
1149
+ * Right boundary of crop box as ratio (0-1)
1150
+ */
1151
+ right?: number | null;
1152
+
1153
+ /**
1154
+ * Top boundary of crop box as ratio (0-1)
1155
+ */
1156
+ top?: number | null;
1157
+ }
1158
+
1159
+ /**
1160
+ * Ignore options for auto mode parsing configuration.
1161
+ */
1162
+ export interface Ignore {
1163
+ /**
1164
+ * Whether to ignore diagonal text in the document
1165
+ */
1166
+ ignore_diagonal_text?: boolean | null;
1167
+
1168
+ /**
1169
+ * Whether to ignore hidden text in the document
1170
+ */
1171
+ ignore_hidden_text?: boolean | null;
1172
+ }
1173
+
1174
+ /**
1175
+ * Presentation-specific options for auto mode parsing configuration.
1176
+ */
1177
+ export interface Presentation {
1178
+ /**
1179
+ * Extract out of bounds content in presentation slides
1180
+ */
1181
+ out_of_bounds_content?: boolean | null;
1182
+
1183
+ /**
1184
+ * Skip extraction of embedded data for charts in presentation slides
1185
+ */
1186
+ skip_embedded_data?: boolean | null;
1187
+ }
1188
+
1189
+ /**
1190
+ * Spatial text options for auto mode parsing configuration.
1191
+ */
1192
+ export interface SpatialText {
1193
+ /**
1194
+ * Keep column structure intact without unrolling
1195
+ */
1196
+ do_not_unroll_columns?: boolean | null;
1197
+
1198
+ /**
1199
+ * Preserve text alignment across page boundaries
1200
+ */
1201
+ preserve_layout_alignment_across_pages?: boolean | null;
1202
+
1203
+ /**
1204
+ * Include very small text in spatial output
1205
+ */
1206
+ preserve_very_small_text?: boolean | null;
1207
+ }
1208
+ }
1209
+ }
1210
+
1211
+ /**
1212
+ * Cost optimizer configuration for reducing parsing costs on simpler pages.
1213
+ *
1214
+ * When enabled, the parser analyzes each page and routes simpler pages to faster,
1215
+ * cheaper processing while preserving quality for complex pages. Only works with
1216
+ * 'agentic' or 'agentic_plus' tiers.
1217
+ */
1218
+ export interface CostOptimizer {
1219
+ /**
1220
+ * Enable cost-optimized parsing. Routes simpler pages to faster processing while
1221
+ * complex pages use full AI analysis. May reduce speed on some documents.
1222
+ * IMPORTANT: Only available with 'agentic' or 'agentic_plus' tiers
1223
+ */
1224
+ enable?: boolean | null;
1225
+ }
1226
+
1227
+ /**
1228
+ * Options for ignoring specific text types (diagonal, hidden, text in images)
1229
+ */
1230
+ export interface Ignore {
1231
+ /**
1232
+ * Skip text rotated at an angle (not horizontal/vertical). Useful for ignoring
1233
+ * watermarks or decorative angled text
1234
+ */
1235
+ ignore_diagonal_text?: boolean | null;
1236
+
1237
+ /**
1238
+ * Skip text marked as hidden in the document structure. Some PDFs contain
1239
+ * invisible text layers used for accessibility or search indexing
1240
+ */
1241
+ ignore_hidden_text?: boolean | null;
1242
+
1243
+ /**
1244
+ * Skip OCR text extraction from embedded images. Use when images contain
1245
+ * irrelevant text (watermarks, logos) that shouldn't be in the output
1246
+ */
1247
+ ignore_text_in_image?: boolean | null;
1248
+ }
1249
+
1250
+ /**
1251
+ * OCR configuration including language detection settings
1252
+ */
1253
+ export interface OcrParameters {
1254
+ /**
1255
+ * Languages to use for OCR text recognition. Specify multiple languages if
1256
+ * document contains mixed-language content. Order matters - put primary language
1257
+ * first. Example: ['en', 'es'] for English with Spanish
1258
+ */
1259
+ languages?: Array<ParsingAPI.ParsingLanguages> | null;
1260
+ }
1261
+ }
1262
+
1263
+ /**
1264
+ * Webhook configuration for receiving parsing job notifications.
1265
+ *
1266
+ * Webhooks are called when specified events occur during job processing. Configure
1267
+ * multiple webhook configurations to send to different endpoints.
1268
+ */
1269
+ export interface WebhookConfiguration {
1270
+ /**
1271
+ * Events that trigger this webhook. Options: 'parse.success' (job completed),
1272
+ * 'parse.failure' (job failed), 'parse.partial' (some pages failed). If not
1273
+ * specified, webhook fires for all events
1274
+ */
1275
+ webhook_events?: Array<string> | null;
1276
+
1277
+ /**
1278
+ * Custom HTTP headers to include in webhook requests. Use for authentication
1279
+ * tokens or custom routing. Example: {'Authorization': 'Bearer xyz'}
1280
+ */
1281
+ webhook_headers?: { [key: string]: unknown } | null;
1282
+
1283
+ /**
1284
+ * HTTPS URL to receive webhook POST requests. Must be publicly accessible
1285
+ */
1286
+ webhook_url?: string | null;
1287
+ }
1288
+ }
1289
+
1290
+ /**
1291
+ * Typed parameters for a _split v1_ product configuration.
1292
+ */
1293
+ export interface SplitV1Parameters {
1294
+ /**
1295
+ * Categories to split documents into.
1296
+ */
1297
+ categories: Array<SplitAPI.SplitCategory>;
1298
+
1299
+ /**
1300
+ * Product type.
1301
+ */
1302
+ product_type: 'split_v1';
1303
+
1304
+ /**
1305
+ * Strategy for splitting documents.
1306
+ */
1307
+ splitting_strategy?: SplitV1Parameters.SplittingStrategy;
1308
+ }
1309
+
1310
+ export namespace SplitV1Parameters {
1311
+ /**
1312
+ * Strategy for splitting documents.
1313
+ */
1314
+ export interface SplittingStrategy {
1315
+ /**
1316
+ * Controls handling of pages that don't match any category. 'include': pages can
1317
+ * be grouped as 'uncategorized' and included in results. 'forbid': all pages must
1318
+ * be assigned to a defined category. 'omit': pages can be classified as
1319
+ * 'uncategorized' but are excluded from results.
1320
+ */
1321
+ allow_uncategorized?: 'include' | 'forbid' | 'omit';
1322
+ }
1323
+ }
1324
+
1325
+ /**
1326
+ * Catch-all for configurations without a dedicated typed schema.
1327
+ *
1328
+ * Accepts arbitrary JSON fields alongside `product_type`.
1329
+ */
1330
+ export interface UntypedParameters {
1331
+ /**
1332
+ * Product type.
1333
+ */
1334
+ product_type: 'unknown';
1335
+
1336
+ [k: string]: unknown;
1337
+ }
1338
+
1339
+ export interface ConfigurationCreateParams {
1340
+ /**
1341
+ * Body param: Human-readable name for this configuration.
1342
+ */
1343
+ name: string;
1344
+
1345
+ /**
1346
+ * Body param: Product-specific configuration parameters.
1347
+ */
1348
+ parameters:
1349
+ | SplitV1Parameters
1350
+ | ExtractV2Parameters
1351
+ | ClassifyV2Parameters
1352
+ | ParseV2Parameters
1353
+ | UntypedParameters;
1354
+
1355
+ /**
1356
+ * Query param
1357
+ */
1358
+ organization_id?: string | null;
1359
+
1360
+ /**
1361
+ * Query param
1362
+ */
1363
+ project_id?: string | null;
1364
+ }
1365
+
1366
+ export interface ConfigurationRetrieveParams {
1367
+ organization_id?: string | null;
1368
+
1369
+ project_id?: string | null;
1370
+ }
1371
+
1372
+ export interface ConfigurationUpdateParams {
1373
+ /**
1374
+ * Query param
1375
+ */
1376
+ organization_id?: string | null;
1377
+
1378
+ /**
1379
+ * Query param
1380
+ */
1381
+ project_id?: string | null;
1382
+
1383
+ /**
1384
+ * Body param: Updated name (omit to leave unchanged).
1385
+ */
1386
+ name?: string | null;
1387
+
1388
+ /**
1389
+ * Body param: Updated parameters (omit to leave unchanged).
1390
+ */
1391
+ parameters?:
1392
+ | SplitV1Parameters
1393
+ | ExtractV2Parameters
1394
+ | ClassifyV2Parameters
1395
+ | ParseV2Parameters
1396
+ | UntypedParameters
1397
+ | null;
1398
+ }
1399
+
1400
+ export interface ConfigurationListParams extends PaginatedCursorParams {
1401
+ /**
1402
+ * Return only the latest version per configuration name.
1403
+ */
1404
+ latest_only?: boolean;
1405
+
1406
+ /**
1407
+ * Filter by configuration name.
1408
+ */
1409
+ name?: string | null;
1410
+
1411
+ organization_id?: string | null;
1412
+
1413
+ /**
1414
+ * Filter by one or more product types. Repeat the parameter for multiple values.
1415
+ */
1416
+ product_type?: Array<'split_v1' | 'extract_v2' | 'classify_v2' | 'parse_v2' | 'unknown'> | null;
1417
+
1418
+ project_id?: string | null;
1419
+ }
1420
+
1421
+ export interface ConfigurationDeleteParams {
1422
+ organization_id?: string | null;
1423
+
1424
+ project_id?: string | null;
1425
+ }
1426
+
1427
+ export declare namespace Configurations {
1428
+ export {
1429
+ type ClassifyV2Parameters as ClassifyV2Parameters,
1430
+ type ConfigurationCreate as ConfigurationCreate,
1431
+ type ConfigurationResponse as ConfigurationResponse,
1432
+ type ExtractV2Parameters as ExtractV2Parameters,
1433
+ type ParseV2Parameters as ParseV2Parameters,
1434
+ type SplitV1Parameters as SplitV1Parameters,
1435
+ type UntypedParameters as UntypedParameters,
1436
+ type ConfigurationResponsesPaginatedCursor as ConfigurationResponsesPaginatedCursor,
1437
+ type ConfigurationCreateParams as ConfigurationCreateParams,
1438
+ type ConfigurationRetrieveParams as ConfigurationRetrieveParams,
1439
+ type ConfigurationUpdateParams as ConfigurationUpdateParams,
1440
+ type ConfigurationListParams as ConfigurationListParams,
1441
+ type ConfigurationDeleteParams as ConfigurationDeleteParams,
1442
+ };
1443
+ }