@llamaindex/llama-cloud 1.8.0 → 2.1.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 (214) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +10 -8
  3. package/client.d.mts +4 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +4 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +7 -6
  8. package/client.js.map +1 -1
  9. package/client.mjs +7 -6
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +0 -23
  12. package/core/pagination.d.mts.map +1 -1
  13. package/core/pagination.d.ts +0 -23
  14. package/core/pagination.d.ts.map +1 -1
  15. package/core/pagination.js +1 -32
  16. package/core/pagination.js.map +1 -1
  17. package/core/pagination.mjs +0 -30
  18. package/core/pagination.mjs.map +1 -1
  19. package/package.json +12 -1
  20. package/resources/beta/batch/batch.d.mts +55 -30
  21. package/resources/beta/batch/batch.d.mts.map +1 -1
  22. package/resources/beta/batch/batch.d.ts +55 -30
  23. package/resources/beta/batch/batch.d.ts.map +1 -1
  24. package/resources/beta/batch/batch.js +14 -11
  25. package/resources/beta/batch/batch.js.map +1 -1
  26. package/resources/beta/batch/batch.mjs +14 -11
  27. package/resources/beta/batch/batch.mjs.map +1 -1
  28. package/resources/beta/batch/job-items.d.mts +36 -13
  29. package/resources/beta/batch/job-items.d.mts.map +1 -1
  30. package/resources/beta/batch/job-items.d.ts +36 -13
  31. package/resources/beta/batch/job-items.d.ts.map +1 -1
  32. package/resources/beta/batch/job-items.js +6 -8
  33. package/resources/beta/batch/job-items.js.map +1 -1
  34. package/resources/beta/batch/job-items.mjs +6 -8
  35. package/resources/beta/batch/job-items.mjs.map +1 -1
  36. package/resources/beta/parse-configurations.d.mts +7 -9
  37. package/resources/beta/parse-configurations.d.mts.map +1 -1
  38. package/resources/beta/parse-configurations.d.ts +7 -9
  39. package/resources/beta/parse-configurations.d.ts.map +1 -1
  40. package/resources/beta/parse-configurations.js +7 -9
  41. package/resources/beta/parse-configurations.js.map +1 -1
  42. package/resources/beta/parse-configurations.mjs +7 -9
  43. package/resources/beta/parse-configurations.mjs.map +1 -1
  44. package/resources/beta/sheets.d.mts +16 -0
  45. package/resources/beta/sheets.d.mts.map +1 -1
  46. package/resources/beta/sheets.d.ts +16 -0
  47. package/resources/beta/sheets.d.ts.map +1 -1
  48. package/resources/beta/split.d.mts +60 -16
  49. package/resources/beta/split.d.mts.map +1 -1
  50. package/resources/beta/split.d.ts +60 -16
  51. package/resources/beta/split.d.ts.map +1 -1
  52. package/resources/beta/split.js.map +1 -1
  53. package/resources/beta/split.mjs.map +1 -1
  54. package/resources/classifier/jobs.d.mts +12 -3
  55. package/resources/classifier/jobs.d.mts.map +1 -1
  56. package/resources/classifier/jobs.d.ts +12 -3
  57. package/resources/classifier/jobs.d.ts.map +1 -1
  58. package/resources/classify.d.mts +93 -38
  59. package/resources/classify.d.mts.map +1 -1
  60. package/resources/classify.d.ts +93 -38
  61. package/resources/classify.d.ts.map +1 -1
  62. package/resources/classify.js +19 -2
  63. package/resources/classify.js.map +1 -1
  64. package/resources/classify.mjs +19 -2
  65. package/resources/classify.mjs.map +1 -1
  66. package/resources/extract.d.mts +1593 -0
  67. package/resources/extract.d.mts.map +1 -0
  68. package/resources/extract.d.ts +1593 -0
  69. package/resources/extract.d.ts.map +1 -0
  70. package/resources/extract.js +215 -0
  71. package/resources/extract.js.map +1 -0
  72. package/resources/extract.mjs +211 -0
  73. package/resources/extract.mjs.map +1 -0
  74. package/resources/files.d.mts +53 -39
  75. package/resources/files.d.mts.map +1 -1
  76. package/resources/files.d.ts +53 -39
  77. package/resources/files.d.ts.map +1 -1
  78. package/resources/files.js +11 -10
  79. package/resources/files.js.map +1 -1
  80. package/resources/files.mjs +11 -10
  81. package/resources/files.mjs.map +1 -1
  82. package/resources/index.d.mts +1 -1
  83. package/resources/index.d.mts.map +1 -1
  84. package/resources/index.d.ts +1 -1
  85. package/resources/index.d.ts.map +1 -1
  86. package/resources/index.js +3 -3
  87. package/resources/index.js.map +1 -1
  88. package/resources/index.mjs +1 -1
  89. package/resources/index.mjs.map +1 -1
  90. package/resources/parsing.d.mts +292 -138
  91. package/resources/parsing.d.mts.map +1 -1
  92. package/resources/parsing.d.ts +292 -138
  93. package/resources/parsing.d.ts.map +1 -1
  94. package/resources/parsing.js +30 -4
  95. package/resources/parsing.js.map +1 -1
  96. package/resources/parsing.mjs +30 -4
  97. package/resources/parsing.mjs.map +1 -1
  98. package/resources/pipelines/pipelines.d.mts +59 -13
  99. package/resources/pipelines/pipelines.d.mts.map +1 -1
  100. package/resources/pipelines/pipelines.d.ts +59 -13
  101. package/resources/pipelines/pipelines.d.ts.map +1 -1
  102. package/resources/pipelines/pipelines.js +24 -9
  103. package/resources/pipelines/pipelines.js.map +1 -1
  104. package/resources/pipelines/pipelines.mjs +24 -9
  105. package/resources/pipelines/pipelines.mjs.map +1 -1
  106. package/resources/pipelines/sync.d.mts +5 -3
  107. package/resources/pipelines/sync.d.mts.map +1 -1
  108. package/resources/pipelines/sync.d.ts +5 -3
  109. package/resources/pipelines/sync.d.ts.map +1 -1
  110. package/resources/pipelines/sync.js +5 -3
  111. package/resources/pipelines/sync.js.map +1 -1
  112. package/resources/pipelines/sync.mjs +5 -3
  113. package/resources/pipelines/sync.mjs.map +1 -1
  114. package/src/client.ts +50 -15
  115. package/src/core/pagination.ts +0 -71
  116. package/src/resources/beta/batch/batch.ts +75 -30
  117. package/src/resources/beta/batch/job-items.ts +56 -13
  118. package/src/resources/beta/parse-configurations.ts +7 -9
  119. package/src/resources/beta/sheets.ts +20 -0
  120. package/src/resources/beta/split.ts +70 -17
  121. package/src/resources/classifier/jobs.ts +12 -3
  122. package/src/resources/classify.ts +101 -38
  123. package/src/resources/extract.ts +2055 -0
  124. package/src/resources/files.ts +53 -39
  125. package/src/resources/index.ts +22 -1
  126. package/src/resources/parsing.ts +327 -136
  127. package/src/resources/pipelines/pipelines.ts +80 -14
  128. package/src/resources/pipelines/sync.ts +5 -3
  129. package/src/version.ts +1 -1
  130. package/version.d.mts +1 -1
  131. package/version.d.ts +1 -1
  132. package/version.js +1 -1
  133. package/version.mjs +1 -1
  134. package/resources/extraction/extraction-agents/extraction-agents.d.mts +0 -126
  135. package/resources/extraction/extraction-agents/extraction-agents.d.mts.map +0 -1
  136. package/resources/extraction/extraction-agents/extraction-agents.d.ts +0 -126
  137. package/resources/extraction/extraction-agents/extraction-agents.d.ts.map +0 -1
  138. package/resources/extraction/extraction-agents/extraction-agents.js +0 -56
  139. package/resources/extraction/extraction-agents/extraction-agents.js.map +0 -1
  140. package/resources/extraction/extraction-agents/extraction-agents.mjs +0 -51
  141. package/resources/extraction/extraction-agents/extraction-agents.mjs.map +0 -1
  142. package/resources/extraction/extraction-agents/index.d.mts +0 -3
  143. package/resources/extraction/extraction-agents/index.d.mts.map +0 -1
  144. package/resources/extraction/extraction-agents/index.d.ts +0 -3
  145. package/resources/extraction/extraction-agents/index.d.ts.map +0 -1
  146. package/resources/extraction/extraction-agents/index.js +0 -9
  147. package/resources/extraction/extraction-agents/index.js.map +0 -1
  148. package/resources/extraction/extraction-agents/index.mjs +0 -4
  149. package/resources/extraction/extraction-agents/index.mjs.map +0 -1
  150. package/resources/extraction/extraction-agents/schema.d.mts +0 -75
  151. package/resources/extraction/extraction-agents/schema.d.mts.map +0 -1
  152. package/resources/extraction/extraction-agents/schema.d.ts +0 -75
  153. package/resources/extraction/extraction-agents/schema.d.ts.map +0 -1
  154. package/resources/extraction/extraction-agents/schema.js +0 -28
  155. package/resources/extraction/extraction-agents/schema.js.map +0 -1
  156. package/resources/extraction/extraction-agents/schema.mjs +0 -24
  157. package/resources/extraction/extraction-agents/schema.mjs.map +0 -1
  158. package/resources/extraction/extraction-agents.d.mts +0 -2
  159. package/resources/extraction/extraction-agents.d.mts.map +0 -1
  160. package/resources/extraction/extraction-agents.d.ts +0 -2
  161. package/resources/extraction/extraction-agents.d.ts.map +0 -1
  162. package/resources/extraction/extraction-agents.js +0 -6
  163. package/resources/extraction/extraction-agents.js.map +0 -1
  164. package/resources/extraction/extraction-agents.mjs +0 -3
  165. package/resources/extraction/extraction-agents.mjs.map +0 -1
  166. package/resources/extraction/extraction.d.mts +0 -118
  167. package/resources/extraction/extraction.d.mts.map +0 -1
  168. package/resources/extraction/extraction.d.ts +0 -118
  169. package/resources/extraction/extraction.d.ts.map +0 -1
  170. package/resources/extraction/extraction.js +0 -91
  171. package/resources/extraction/extraction.js.map +0 -1
  172. package/resources/extraction/extraction.mjs +0 -86
  173. package/resources/extraction/extraction.mjs.map +0 -1
  174. package/resources/extraction/index.d.mts +0 -5
  175. package/resources/extraction/index.d.mts.map +0 -1
  176. package/resources/extraction/index.d.ts +0 -5
  177. package/resources/extraction/index.d.ts.map +0 -1
  178. package/resources/extraction/index.js +0 -13
  179. package/resources/extraction/index.js.map +0 -1
  180. package/resources/extraction/index.mjs +0 -6
  181. package/resources/extraction/index.mjs.map +0 -1
  182. package/resources/extraction/jobs.d.mts +0 -280
  183. package/resources/extraction/jobs.d.mts.map +0 -1
  184. package/resources/extraction/jobs.d.ts +0 -280
  185. package/resources/extraction/jobs.d.ts.map +0 -1
  186. package/resources/extraction/jobs.js +0 -179
  187. package/resources/extraction/jobs.js.map +0 -1
  188. package/resources/extraction/jobs.mjs +0 -175
  189. package/resources/extraction/jobs.mjs.map +0 -1
  190. package/resources/extraction/runs.d.mts +0 -198
  191. package/resources/extraction/runs.d.mts.map +0 -1
  192. package/resources/extraction/runs.d.ts +0 -198
  193. package/resources/extraction/runs.d.ts.map +0 -1
  194. package/resources/extraction/runs.js +0 -42
  195. package/resources/extraction/runs.js.map +0 -1
  196. package/resources/extraction/runs.mjs +0 -38
  197. package/resources/extraction/runs.mjs.map +0 -1
  198. package/resources/extraction.d.mts +0 -2
  199. package/resources/extraction.d.mts.map +0 -1
  200. package/resources/extraction.d.ts +0 -2
  201. package/resources/extraction.d.ts.map +0 -1
  202. package/resources/extraction.js +0 -6
  203. package/resources/extraction.js.map +0 -1
  204. package/resources/extraction.mjs +0 -3
  205. package/resources/extraction.mjs.map +0 -1
  206. package/src/resources/extraction/extraction-agents/extraction-agents.ts +0 -196
  207. package/src/resources/extraction/extraction-agents/index.ts +0 -18
  208. package/src/resources/extraction/extraction-agents/schema.ts +0 -100
  209. package/src/resources/extraction/extraction-agents.ts +0 -3
  210. package/src/resources/extraction/extraction.ts +0 -224
  211. package/src/resources/extraction/index.ts +0 -34
  212. package/src/resources/extraction/jobs.ts +0 -414
  213. package/src/resources/extraction/runs.ts +0 -315
  214. package/src/resources/extraction.ts +0 -3
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as SplitAPI from './split';
4
5
  import { APIPromise } from '../../core/api-promise';
5
6
  import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from '../../core/pagination';
6
7
  import { RequestOptions } from '../../internal/request-options';
@@ -279,7 +280,7 @@ export interface SplitCreateResponse {
279
280
 
280
281
  /**
281
282
  * Current status of the job. Valid values are: pending, processing, completed,
282
- * failed.
283
+ * failed, cancelled.
283
284
  */
284
285
  status: string;
285
286
 
@@ -288,6 +289,11 @@ export interface SplitCreateResponse {
288
289
  */
289
290
  user_id: string;
290
291
 
292
+ /**
293
+ * Split configuration ID used for this job.
294
+ */
295
+ configuration_id?: string | null;
296
+
291
297
  /**
292
298
  * Creation datetime
293
299
  */
@@ -335,7 +341,7 @@ export interface SplitListResponse {
335
341
 
336
342
  /**
337
343
  * Current status of the job. Valid values are: pending, processing, completed,
338
- * failed.
344
+ * failed, cancelled.
339
345
  */
340
346
  status: string;
341
347
 
@@ -344,6 +350,11 @@ export interface SplitListResponse {
344
350
  */
345
351
  user_id: string;
346
352
 
353
+ /**
354
+ * Split configuration ID used for this job.
355
+ */
356
+ configuration_id?: string | null;
357
+
347
358
  /**
348
359
  * Creation datetime
349
360
  */
@@ -391,7 +402,7 @@ export interface SplitGetResponse {
391
402
 
392
403
  /**
393
404
  * Current status of the job. Valid values are: pending, processing, completed,
394
- * failed.
405
+ * failed, cancelled.
395
406
  */
396
407
  status: string;
397
408
 
@@ -400,6 +411,11 @@ export interface SplitGetResponse {
400
411
  */
401
412
  user_id: string;
402
413
 
414
+ /**
415
+ * Split configuration ID used for this job.
416
+ */
417
+ configuration_id?: string | null;
418
+
403
419
  /**
404
420
  * Creation datetime
405
421
  */
@@ -422,11 +438,6 @@ export interface SplitGetResponse {
422
438
  }
423
439
 
424
440
  export interface SplitCreateParams {
425
- /**
426
- * Body param: Categories to split documents into.
427
- */
428
- categories: Array<SplitCategory>;
429
-
430
441
  /**
431
442
  * Body param: Document to be split.
432
443
  */
@@ -443,30 +454,72 @@ export interface SplitCreateParams {
443
454
  project_id?: string | null;
444
455
 
445
456
  /**
446
- * Body param: Strategy for splitting documents.
457
+ * Body param: Split configuration with categories and splitting strategy.
447
458
  */
448
- splitting_strategy?: SplitCreateParams.SplittingStrategy;
459
+ configuration?: SplitCreateParams.Configuration | null;
460
+
461
+ /**
462
+ * Body param: Saved split configuration ID.
463
+ */
464
+ configuration_id?: string | null;
449
465
  }
450
466
 
451
467
  export namespace SplitCreateParams {
452
468
  /**
453
- * Strategy for splitting documents.
469
+ * Split configuration with categories and splitting strategy.
454
470
  */
455
- export interface SplittingStrategy {
471
+ export interface Configuration {
456
472
  /**
457
- * Controls handling of pages that don't match any category. 'include': pages can
458
- * be grouped as 'uncategorized' and included in results. 'forbid': all pages must
459
- * be assigned to a defined category. 'omit': pages can be classified as
460
- * 'uncategorized' but are excluded from results.
473
+ * Categories to split documents into.
461
474
  */
462
- allow_uncategorized?: 'include' | 'forbid' | 'omit';
475
+ categories: Array<SplitAPI.SplitCategory>;
476
+
477
+ /**
478
+ * Strategy for splitting documents.
479
+ */
480
+ splitting_strategy?: Configuration.SplittingStrategy;
481
+ }
482
+
483
+ export namespace Configuration {
484
+ /**
485
+ * Strategy for splitting documents.
486
+ */
487
+ export interface SplittingStrategy {
488
+ /**
489
+ * Controls handling of pages that don't match any category. 'include': pages can
490
+ * be grouped as 'uncategorized' and included in results. 'forbid': all pages must
491
+ * be assigned to a defined category. 'omit': pages can be classified as
492
+ * 'uncategorized' but are excluded from results.
493
+ */
494
+ allow_uncategorized?: 'include' | 'forbid' | 'omit';
495
+ }
463
496
  }
464
497
  }
465
498
 
466
499
  export interface SplitListParams extends PaginatedCursorParams {
500
+ /**
501
+ * Include items created at or after this timestamp (inclusive)
502
+ */
503
+ created_at_on_or_after?: string | null;
504
+
505
+ /**
506
+ * Include items created at or before this timestamp (inclusive)
507
+ */
508
+ created_at_on_or_before?: string | null;
509
+
510
+ /**
511
+ * Filter by specific job IDs
512
+ */
513
+ job_ids?: Array<string> | null;
514
+
467
515
  organization_id?: string | null;
468
516
 
469
517
  project_id?: string | null;
518
+
519
+ /**
520
+ * Filter by job status (pending, processing, completed, failed, cancelled)
521
+ */
522
+ status?: 'pending' | 'processing' | 'completed' | 'failed' | 'cancelled' | null;
470
523
  }
471
524
 
472
525
  export interface SplitGetParams {
@@ -367,19 +367,28 @@ export interface JobCreateParams {
367
367
  }
368
368
 
369
369
  export namespace JobCreateParams {
370
+ /**
371
+ * Webhook configuration for receiving parsing job notifications.
372
+ *
373
+ * Webhooks are called when specified events occur during job processing. Configure
374
+ * multiple webhook configurations to send to different endpoints.
375
+ */
370
376
  export interface WebhookConfiguration {
371
377
  /**
372
- * List of events that trigger webhook notifications
378
+ * Events that trigger this webhook. Options: 'parse.success' (job completed),
379
+ * 'parse.failure' (job failed), 'parse.partial' (some pages failed). If not
380
+ * specified, webhook fires for all events
373
381
  */
374
382
  webhook_events?: Array<string> | null;
375
383
 
376
384
  /**
377
- * Custom headers to include in webhook requests
385
+ * Custom HTTP headers to include in webhook requests. Use for authentication
386
+ * tokens or custom routing. Example: {'Authorization': 'Bearer xyz'}
378
387
  */
379
388
  webhook_headers?: { [key: string]: unknown } | null;
380
389
 
381
390
  /**
382
- * Webhook URL for receiving parsing notifications
391
+ * HTTPS URL to receive webhook POST requests. Must be publicly accessible
383
392
  */
384
393
  webhook_url?: string | null;
385
394
  }
@@ -9,6 +9,17 @@ import { path } from '../internal/utils/path';
9
9
  export class Classify extends APIResource {
10
10
  /**
11
11
  * Create a classify job.
12
+ *
13
+ * Classifies a document against a set of rules. Set `file_input` to a file ID
14
+ * (`dfl-...`) or parse job ID (`pjb-...`), and provide either inline
15
+ * `configuration` with rules or a `configuration_id` referencing a saved preset.
16
+ *
17
+ * Each rule has a `type` (the label to assign) and a `description` (natural
18
+ * language criteria). The classifier returns the best matching rule with a
19
+ * confidence score.
20
+ *
21
+ * The job runs asynchronously. Poll `GET /classify/{job_id}` to check status and
22
+ * retrieve results.
12
23
  */
13
24
  create(params: ClassifyCreateParams, options?: RequestOptions): APIPromise<ClassifyCreateResponse> {
14
25
  const { organization_id, project_id, ...body } = params;
@@ -20,7 +31,10 @@ export class Classify extends APIResource {
20
31
  }
21
32
 
22
33
  /**
23
- * List classify jobs.
34
+ * List classify jobs with optional filtering and pagination.
35
+ *
36
+ * Filter by `status`, `configuration_id`, specific `job_ids`, or creation date
37
+ * range.
24
38
  */
25
39
  list(
26
40
  query: ClassifyListParams | null | undefined = {},
@@ -33,7 +47,10 @@ export class Classify extends APIResource {
33
47
  }
34
48
 
35
49
  /**
36
- * Retrieve classify job by ID.
50
+ * Get a classify job by ID.
51
+ *
52
+ * Returns the job status, configuration, and classify result when complete. The
53
+ * result includes the matched document type, confidence score, and reasoning.
37
54
  */
38
55
  get(
39
56
  jobID: string,
@@ -47,18 +64,23 @@ export class Classify extends APIResource {
47
64
  export type ClassifyListResponsesPaginatedCursor = PaginatedCursor<ClassifyListResponse>;
48
65
 
49
66
  /**
50
- * Configuration for classification.
67
+ * Configuration for a classify job.
51
68
  */
52
69
  export interface ClassifyConfiguration {
53
70
  /**
54
- * Classification rules to apply (at least one required)
71
+ * Classify rules to evaluate against the document (at least one required)
55
72
  */
56
73
  rules: Array<ClassifyConfiguration.Rule>;
57
74
 
58
75
  /**
59
- * Classification execution mode
76
+ * Classify execution mode
60
77
  */
61
78
  mode?: 'FAST';
79
+
80
+ /**
81
+ * Parsing configuration for classify jobs.
82
+ */
83
+ parsing_configuration?: ClassifyConfiguration.ParsingConfiguration | null;
62
84
  }
63
85
 
64
86
  export namespace ClassifyConfiguration {
@@ -67,7 +89,7 @@ export namespace ClassifyConfiguration {
67
89
  */
68
90
  export interface Rule {
69
91
  /**
70
- * Natural language description of what to classify
92
+ * Natural language criteria for matching this rule
71
93
  */
72
94
  description: string;
73
95
 
@@ -76,6 +98,27 @@ export namespace ClassifyConfiguration {
76
98
  */
77
99
  type: string;
78
100
  }
101
+
102
+ /**
103
+ * Parsing configuration for classify jobs.
104
+ */
105
+ export interface ParsingConfiguration {
106
+ /**
107
+ * ISO 639-1 language code for the document
108
+ */
109
+ lang?: string;
110
+
111
+ /**
112
+ * Maximum number of pages to process. Omit for no limit.
113
+ */
114
+ max_pages?: number | null;
115
+
116
+ /**
117
+ * Comma-separated page numbers or ranges to process (1-based). Omit to process all
118
+ * pages.
119
+ */
120
+ target_pages?: string | null;
121
+ }
79
122
  }
80
123
 
81
124
  /**
@@ -83,22 +126,27 @@ export namespace ClassifyConfiguration {
83
126
  */
84
127
  export interface ClassifyCreateRequest {
85
128
  /**
86
- * Configuration for classification.
129
+ * Configuration for a classify job.
87
130
  */
88
131
  configuration?: ClassifyConfiguration | null;
89
132
 
90
133
  /**
91
- * Product configuration ID for reusable presets
134
+ * Saved configuration ID
92
135
  */
93
136
  configuration_id?: string | null;
94
137
 
95
138
  /**
96
- * File ID to classify
139
+ * @deprecated Deprecated: use file_input instead
97
140
  */
98
141
  file_id?: string | null;
99
142
 
100
143
  /**
101
- * Parse job ID to classify
144
+ * File ID or parse job ID to classify
145
+ */
146
+ file_input?: string | null;
147
+
148
+ /**
149
+ * @deprecated Deprecated: use file_input instead
102
150
  */
103
151
  parse_job_id?: string | null;
104
152
 
@@ -113,17 +161,17 @@ export interface ClassifyCreateRequest {
113
161
  */
114
162
  export interface ClassifyResult {
115
163
  /**
116
- * Confidence score (0.0-1.0)
164
+ * Confidence score between 0.0 and 1.0
117
165
  */
118
166
  confidence: number;
119
167
 
120
168
  /**
121
- * Explanation of classification decision
169
+ * Why the document matched (or didn't match) the returned rule
122
170
  */
123
171
  reasoning: string;
124
172
 
125
173
  /**
126
- * Document type that matches, or None
174
+ * Matched rule type, or null if no rule matched
127
175
  */
128
176
  type: string | null;
129
177
  }
@@ -138,32 +186,32 @@ export interface ClassifyCreateResponse {
138
186
  id: string;
139
187
 
140
188
  /**
141
- * Classification configuration
189
+ * Classify configuration used for this job
142
190
  */
143
191
  configuration: ClassifyConfiguration;
144
192
 
145
193
  /**
146
- * Type of document input
194
+ * Whether the input was a file or parse job (FILE or PARSE_JOB)
147
195
  */
148
196
  document_input_type: 'url' | 'file_id' | 'parse_job_id';
149
197
 
150
198
  /**
151
- * Document identifier
199
+ * ID of the input file or parse job
152
200
  */
153
- document_input_value: string;
201
+ file_input: string;
154
202
 
155
203
  /**
156
- * Project ID
204
+ * Project this job belongs to
157
205
  */
158
206
  project_id: string;
159
207
 
160
208
  /**
161
- * Job status
209
+ * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
162
210
  */
163
211
  status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
164
212
 
165
213
  /**
166
- * User ID
214
+ * User who created this job
167
215
  */
168
216
  user_id: string;
169
217
 
@@ -213,32 +261,32 @@ export interface ClassifyListResponse {
213
261
  id: string;
214
262
 
215
263
  /**
216
- * Classification configuration
264
+ * Classify configuration used for this job
217
265
  */
218
266
  configuration: ClassifyConfiguration;
219
267
 
220
268
  /**
221
- * Type of document input
269
+ * Whether the input was a file or parse job (FILE or PARSE_JOB)
222
270
  */
223
271
  document_input_type: 'url' | 'file_id' | 'parse_job_id';
224
272
 
225
273
  /**
226
- * Document identifier
274
+ * ID of the input file or parse job
227
275
  */
228
- document_input_value: string;
276
+ file_input: string;
229
277
 
230
278
  /**
231
- * Project ID
279
+ * Project this job belongs to
232
280
  */
233
281
  project_id: string;
234
282
 
235
283
  /**
236
- * Job status
284
+ * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
237
285
  */
238
286
  status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
239
287
 
240
288
  /**
241
- * User ID
289
+ * User who created this job
242
290
  */
243
291
  user_id: string;
244
292
 
@@ -288,32 +336,32 @@ export interface ClassifyGetResponse {
288
336
  id: string;
289
337
 
290
338
  /**
291
- * Classification configuration
339
+ * Classify configuration used for this job
292
340
  */
293
341
  configuration: ClassifyConfiguration;
294
342
 
295
343
  /**
296
- * Type of document input
344
+ * Whether the input was a file or parse job (FILE or PARSE_JOB)
297
345
  */
298
346
  document_input_type: 'url' | 'file_id' | 'parse_job_id';
299
347
 
300
348
  /**
301
- * Document identifier
349
+ * ID of the input file or parse job
302
350
  */
303
- document_input_value: string;
351
+ file_input: string;
304
352
 
305
353
  /**
306
- * Project ID
354
+ * Project this job belongs to
307
355
  */
308
356
  project_id: string;
309
357
 
310
358
  /**
311
- * Job status
359
+ * Current job status: PENDING, RUNNING, COMPLETED, or FAILED
312
360
  */
313
361
  status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
314
362
 
315
363
  /**
316
- * User ID
364
+ * User who created this job
317
365
  */
318
366
  user_id: string;
319
367
 
@@ -365,22 +413,27 @@ export interface ClassifyCreateParams {
365
413
  project_id?: string | null;
366
414
 
367
415
  /**
368
- * Body param: Configuration for classification.
416
+ * Body param: Configuration for a classify job.
369
417
  */
370
418
  configuration?: ClassifyConfiguration | null;
371
419
 
372
420
  /**
373
- * Body param: Product configuration ID for reusable presets
421
+ * Body param: Saved configuration ID
374
422
  */
375
423
  configuration_id?: string | null;
376
424
 
377
425
  /**
378
- * Body param: File ID to classify
426
+ * @deprecated Body param: Deprecated: use file_input instead
379
427
  */
380
428
  file_id?: string | null;
381
429
 
382
430
  /**
383
- * Body param: Parse job ID to classify
431
+ * Body param: File ID or parse job ID to classify
432
+ */
433
+ file_input?: string | null;
434
+
435
+ /**
436
+ * @deprecated Body param: Deprecated: use file_input instead
384
437
  */
385
438
  parse_job_id?: string | null;
386
439
 
@@ -396,6 +449,16 @@ export interface ClassifyListParams extends PaginatedCursorParams {
396
449
  */
397
450
  configuration_id?: string | null;
398
451
 
452
+ /**
453
+ * Include items created at or after this timestamp (inclusive)
454
+ */
455
+ created_at_on_or_after?: string | null;
456
+
457
+ /**
458
+ * Include items created at or before this timestamp (inclusive)
459
+ */
460
+ created_at_on_or_before?: string | null;
461
+
399
462
  /**
400
463
  * Filter by specific job IDs
401
464
  */