@llamaindex/llama-cloud 1.8.0 → 2.0.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.
- package/CHANGELOG.md +58 -0
- package/README.md +10 -8
- package/client.d.mts +4 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -6
- package/client.d.ts.map +1 -1
- package/client.js +7 -6
- package/client.js.map +1 -1
- package/client.mjs +7 -6
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +0 -23
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +0 -23
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +1 -32
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +0 -30
- package/core/pagination.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/beta/batch/batch.d.mts +55 -30
- package/resources/beta/batch/batch.d.mts.map +1 -1
- package/resources/beta/batch/batch.d.ts +55 -30
- package/resources/beta/batch/batch.d.ts.map +1 -1
- package/resources/beta/batch/batch.js +14 -11
- package/resources/beta/batch/batch.js.map +1 -1
- package/resources/beta/batch/batch.mjs +14 -11
- package/resources/beta/batch/batch.mjs.map +1 -1
- package/resources/beta/batch/job-items.d.mts +36 -13
- package/resources/beta/batch/job-items.d.mts.map +1 -1
- package/resources/beta/batch/job-items.d.ts +36 -13
- package/resources/beta/batch/job-items.d.ts.map +1 -1
- package/resources/beta/batch/job-items.js +6 -8
- package/resources/beta/batch/job-items.js.map +1 -1
- package/resources/beta/batch/job-items.mjs +6 -8
- package/resources/beta/batch/job-items.mjs.map +1 -1
- package/resources/beta/sheets.d.mts +16 -0
- package/resources/beta/sheets.d.mts.map +1 -1
- package/resources/beta/sheets.d.ts +16 -0
- package/resources/beta/sheets.d.ts.map +1 -1
- package/resources/beta/split.d.mts +60 -16
- package/resources/beta/split.d.mts.map +1 -1
- package/resources/beta/split.d.ts +60 -16
- package/resources/beta/split.d.ts.map +1 -1
- package/resources/beta/split.js.map +1 -1
- package/resources/beta/split.mjs.map +1 -1
- package/resources/classifier/jobs.d.mts +12 -3
- package/resources/classifier/jobs.d.mts.map +1 -1
- package/resources/classifier/jobs.d.ts +12 -3
- package/resources/classifier/jobs.d.ts.map +1 -1
- package/resources/classify.d.mts +76 -29
- package/resources/classify.d.mts.map +1 -1
- package/resources/classify.d.ts +76 -29
- package/resources/classify.d.ts.map +1 -1
- package/resources/classify.js +19 -2
- package/resources/classify.js.map +1 -1
- package/resources/classify.mjs +19 -2
- package/resources/classify.mjs.map +1 -1
- package/resources/extract.d.mts +1588 -0
- package/resources/extract.d.mts.map +1 -0
- package/resources/extract.d.ts +1588 -0
- package/resources/extract.d.ts.map +1 -0
- package/resources/extract.js +217 -0
- package/resources/extract.js.map +1 -0
- package/resources/extract.mjs +213 -0
- package/resources/extract.mjs.map +1 -0
- package/resources/files.d.mts +52 -38
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +52 -38
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +10 -9
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +10 -9
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/parsing.d.mts +292 -138
- package/resources/parsing.d.mts.map +1 -1
- package/resources/parsing.d.ts +292 -138
- package/resources/parsing.d.ts.map +1 -1
- package/resources/parsing.js +30 -4
- package/resources/parsing.js.map +1 -1
- package/resources/parsing.mjs +30 -4
- package/resources/parsing.mjs.map +1 -1
- package/resources/pipelines/pipelines.d.mts +59 -13
- package/resources/pipelines/pipelines.d.mts.map +1 -1
- package/resources/pipelines/pipelines.d.ts +59 -13
- package/resources/pipelines/pipelines.d.ts.map +1 -1
- package/resources/pipelines/pipelines.js +24 -9
- package/resources/pipelines/pipelines.js.map +1 -1
- package/resources/pipelines/pipelines.mjs +24 -9
- package/resources/pipelines/pipelines.mjs.map +1 -1
- package/resources/pipelines/sync.d.mts +5 -3
- package/resources/pipelines/sync.d.mts.map +1 -1
- package/resources/pipelines/sync.d.ts +5 -3
- package/resources/pipelines/sync.d.ts.map +1 -1
- package/resources/pipelines/sync.js +5 -3
- package/resources/pipelines/sync.js.map +1 -1
- package/resources/pipelines/sync.mjs +5 -3
- package/resources/pipelines/sync.mjs.map +1 -1
- package/src/client.ts +50 -15
- package/src/core/pagination.ts +0 -71
- package/src/resources/beta/batch/batch.ts +75 -30
- package/src/resources/beta/batch/job-items.ts +56 -13
- package/src/resources/beta/sheets.ts +20 -0
- package/src/resources/beta/split.ts +70 -17
- package/src/resources/classifier/jobs.ts +12 -3
- package/src/resources/classify.ts +82 -29
- package/src/resources/extract.ts +2045 -0
- package/src/resources/files.ts +52 -38
- package/src/resources/index.ts +22 -1
- package/src/resources/parsing.ts +323 -136
- package/src/resources/pipelines/pipelines.ts +80 -14
- package/src/resources/pipelines/sync.ts +5 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/extraction/extraction-agents/extraction-agents.d.mts +0 -126
- package/resources/extraction/extraction-agents/extraction-agents.d.mts.map +0 -1
- package/resources/extraction/extraction-agents/extraction-agents.d.ts +0 -126
- package/resources/extraction/extraction-agents/extraction-agents.d.ts.map +0 -1
- package/resources/extraction/extraction-agents/extraction-agents.js +0 -56
- package/resources/extraction/extraction-agents/extraction-agents.js.map +0 -1
- package/resources/extraction/extraction-agents/extraction-agents.mjs +0 -51
- package/resources/extraction/extraction-agents/extraction-agents.mjs.map +0 -1
- package/resources/extraction/extraction-agents/index.d.mts +0 -3
- package/resources/extraction/extraction-agents/index.d.mts.map +0 -1
- package/resources/extraction/extraction-agents/index.d.ts +0 -3
- package/resources/extraction/extraction-agents/index.d.ts.map +0 -1
- package/resources/extraction/extraction-agents/index.js +0 -9
- package/resources/extraction/extraction-agents/index.js.map +0 -1
- package/resources/extraction/extraction-agents/index.mjs +0 -4
- package/resources/extraction/extraction-agents/index.mjs.map +0 -1
- package/resources/extraction/extraction-agents/schema.d.mts +0 -75
- package/resources/extraction/extraction-agents/schema.d.mts.map +0 -1
- package/resources/extraction/extraction-agents/schema.d.ts +0 -75
- package/resources/extraction/extraction-agents/schema.d.ts.map +0 -1
- package/resources/extraction/extraction-agents/schema.js +0 -28
- package/resources/extraction/extraction-agents/schema.js.map +0 -1
- package/resources/extraction/extraction-agents/schema.mjs +0 -24
- package/resources/extraction/extraction-agents/schema.mjs.map +0 -1
- package/resources/extraction/extraction-agents.d.mts +0 -2
- package/resources/extraction/extraction-agents.d.mts.map +0 -1
- package/resources/extraction/extraction-agents.d.ts +0 -2
- package/resources/extraction/extraction-agents.d.ts.map +0 -1
- package/resources/extraction/extraction-agents.js +0 -6
- package/resources/extraction/extraction-agents.js.map +0 -1
- package/resources/extraction/extraction-agents.mjs +0 -3
- package/resources/extraction/extraction-agents.mjs.map +0 -1
- package/resources/extraction/extraction.d.mts +0 -118
- package/resources/extraction/extraction.d.mts.map +0 -1
- package/resources/extraction/extraction.d.ts +0 -118
- package/resources/extraction/extraction.d.ts.map +0 -1
- package/resources/extraction/extraction.js +0 -91
- package/resources/extraction/extraction.js.map +0 -1
- package/resources/extraction/extraction.mjs +0 -86
- package/resources/extraction/extraction.mjs.map +0 -1
- package/resources/extraction/index.d.mts +0 -5
- package/resources/extraction/index.d.mts.map +0 -1
- package/resources/extraction/index.d.ts +0 -5
- package/resources/extraction/index.d.ts.map +0 -1
- package/resources/extraction/index.js +0 -13
- package/resources/extraction/index.js.map +0 -1
- package/resources/extraction/index.mjs +0 -6
- package/resources/extraction/index.mjs.map +0 -1
- package/resources/extraction/jobs.d.mts +0 -280
- package/resources/extraction/jobs.d.mts.map +0 -1
- package/resources/extraction/jobs.d.ts +0 -280
- package/resources/extraction/jobs.d.ts.map +0 -1
- package/resources/extraction/jobs.js +0 -179
- package/resources/extraction/jobs.js.map +0 -1
- package/resources/extraction/jobs.mjs +0 -175
- package/resources/extraction/jobs.mjs.map +0 -1
- package/resources/extraction/runs.d.mts +0 -198
- package/resources/extraction/runs.d.mts.map +0 -1
- package/resources/extraction/runs.d.ts +0 -198
- package/resources/extraction/runs.d.ts.map +0 -1
- package/resources/extraction/runs.js +0 -42
- package/resources/extraction/runs.js.map +0 -1
- package/resources/extraction/runs.mjs +0 -38
- package/resources/extraction/runs.mjs.map +0 -1
- package/resources/extraction.d.mts +0 -2
- package/resources/extraction.d.mts.map +0 -1
- package/resources/extraction.d.ts +0 -2
- package/resources/extraction.d.ts.map +0 -1
- package/resources/extraction.js +0 -6
- package/resources/extraction.js.map +0 -1
- package/resources/extraction.mjs +0 -3
- package/resources/extraction.mjs.map +0 -1
- package/src/resources/extraction/extraction-agents/extraction-agents.ts +0 -196
- package/src/resources/extraction/extraction-agents/index.ts +0 -18
- package/src/resources/extraction/extraction-agents/schema.ts +0 -100
- package/src/resources/extraction/extraction-agents.ts +0 -3
- package/src/resources/extraction/extraction.ts +0 -224
- package/src/resources/extraction/index.ts +0 -34
- package/src/resources/extraction/jobs.ts +0 -414
- package/src/resources/extraction/runs.ts +0 -315
- 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:
|
|
457
|
+
* Body param: Split configuration with categories and splitting strategy.
|
|
447
458
|
*/
|
|
448
|
-
|
|
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
|
-
*
|
|
469
|
+
* Split configuration with categories and splitting strategy.
|
|
454
470
|
*/
|
|
455
|
-
export interface
|
|
471
|
+
export interface Configuration {
|
|
456
472
|
/**
|
|
457
|
-
*
|
|
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
|
-
|
|
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 jobs created at or after this timestamp (inclusive)
|
|
502
|
+
*/
|
|
503
|
+
created_at_on_or_after?: string | null;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Include jobs 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
|
-
*
|
|
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
|
-
*
|
|
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. Provide either `file_id` or
|
|
14
|
+
* `parse_job_id` as the document input, and either inline `configuration` with
|
|
15
|
+
* 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
|
-
*
|
|
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
|
|
67
|
+
* Configuration for a classify job.
|
|
51
68
|
*/
|
|
52
69
|
export interface ClassifyConfiguration {
|
|
53
70
|
/**
|
|
54
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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,7 +126,7 @@ export namespace ClassifyConfiguration {
|
|
|
83
126
|
*/
|
|
84
127
|
export interface ClassifyCreateRequest {
|
|
85
128
|
/**
|
|
86
|
-
* Configuration for
|
|
129
|
+
* Configuration for a classify job.
|
|
87
130
|
*/
|
|
88
131
|
configuration?: ClassifyConfiguration | null;
|
|
89
132
|
|
|
@@ -113,17 +156,17 @@ export interface ClassifyCreateRequest {
|
|
|
113
156
|
*/
|
|
114
157
|
export interface ClassifyResult {
|
|
115
158
|
/**
|
|
116
|
-
* Confidence score
|
|
159
|
+
* Confidence score between 0.0 and 1.0
|
|
117
160
|
*/
|
|
118
161
|
confidence: number;
|
|
119
162
|
|
|
120
163
|
/**
|
|
121
|
-
*
|
|
164
|
+
* Why the document matched (or didn't match) the returned rule
|
|
122
165
|
*/
|
|
123
166
|
reasoning: string;
|
|
124
167
|
|
|
125
168
|
/**
|
|
126
|
-
*
|
|
169
|
+
* Matched rule type, or null if no rule matched
|
|
127
170
|
*/
|
|
128
171
|
type: string | null;
|
|
129
172
|
}
|
|
@@ -138,32 +181,32 @@ export interface ClassifyCreateResponse {
|
|
|
138
181
|
id: string;
|
|
139
182
|
|
|
140
183
|
/**
|
|
141
|
-
*
|
|
184
|
+
* Classify configuration used for this job
|
|
142
185
|
*/
|
|
143
186
|
configuration: ClassifyConfiguration;
|
|
144
187
|
|
|
145
188
|
/**
|
|
146
|
-
*
|
|
189
|
+
* Whether the input was a file or parse job (FILE or PARSE_JOB)
|
|
147
190
|
*/
|
|
148
191
|
document_input_type: 'url' | 'file_id' | 'parse_job_id';
|
|
149
192
|
|
|
150
193
|
/**
|
|
151
|
-
*
|
|
194
|
+
* ID of the input file or parse job
|
|
152
195
|
*/
|
|
153
196
|
document_input_value: string;
|
|
154
197
|
|
|
155
198
|
/**
|
|
156
|
-
* Project
|
|
199
|
+
* Project this job belongs to
|
|
157
200
|
*/
|
|
158
201
|
project_id: string;
|
|
159
202
|
|
|
160
203
|
/**
|
|
161
|
-
*
|
|
204
|
+
* Current job status: PENDING, RUNNING, COMPLETED, or FAILED
|
|
162
205
|
*/
|
|
163
206
|
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
164
207
|
|
|
165
208
|
/**
|
|
166
|
-
* User
|
|
209
|
+
* User who created this job
|
|
167
210
|
*/
|
|
168
211
|
user_id: string;
|
|
169
212
|
|
|
@@ -213,32 +256,32 @@ export interface ClassifyListResponse {
|
|
|
213
256
|
id: string;
|
|
214
257
|
|
|
215
258
|
/**
|
|
216
|
-
*
|
|
259
|
+
* Classify configuration used for this job
|
|
217
260
|
*/
|
|
218
261
|
configuration: ClassifyConfiguration;
|
|
219
262
|
|
|
220
263
|
/**
|
|
221
|
-
*
|
|
264
|
+
* Whether the input was a file or parse job (FILE or PARSE_JOB)
|
|
222
265
|
*/
|
|
223
266
|
document_input_type: 'url' | 'file_id' | 'parse_job_id';
|
|
224
267
|
|
|
225
268
|
/**
|
|
226
|
-
*
|
|
269
|
+
* ID of the input file or parse job
|
|
227
270
|
*/
|
|
228
271
|
document_input_value: string;
|
|
229
272
|
|
|
230
273
|
/**
|
|
231
|
-
* Project
|
|
274
|
+
* Project this job belongs to
|
|
232
275
|
*/
|
|
233
276
|
project_id: string;
|
|
234
277
|
|
|
235
278
|
/**
|
|
236
|
-
*
|
|
279
|
+
* Current job status: PENDING, RUNNING, COMPLETED, or FAILED
|
|
237
280
|
*/
|
|
238
281
|
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
239
282
|
|
|
240
283
|
/**
|
|
241
|
-
* User
|
|
284
|
+
* User who created this job
|
|
242
285
|
*/
|
|
243
286
|
user_id: string;
|
|
244
287
|
|
|
@@ -288,32 +331,32 @@ export interface ClassifyGetResponse {
|
|
|
288
331
|
id: string;
|
|
289
332
|
|
|
290
333
|
/**
|
|
291
|
-
*
|
|
334
|
+
* Classify configuration used for this job
|
|
292
335
|
*/
|
|
293
336
|
configuration: ClassifyConfiguration;
|
|
294
337
|
|
|
295
338
|
/**
|
|
296
|
-
*
|
|
339
|
+
* Whether the input was a file or parse job (FILE or PARSE_JOB)
|
|
297
340
|
*/
|
|
298
341
|
document_input_type: 'url' | 'file_id' | 'parse_job_id';
|
|
299
342
|
|
|
300
343
|
/**
|
|
301
|
-
*
|
|
344
|
+
* ID of the input file or parse job
|
|
302
345
|
*/
|
|
303
346
|
document_input_value: string;
|
|
304
347
|
|
|
305
348
|
/**
|
|
306
|
-
* Project
|
|
349
|
+
* Project this job belongs to
|
|
307
350
|
*/
|
|
308
351
|
project_id: string;
|
|
309
352
|
|
|
310
353
|
/**
|
|
311
|
-
*
|
|
354
|
+
* Current job status: PENDING, RUNNING, COMPLETED, or FAILED
|
|
312
355
|
*/
|
|
313
356
|
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
314
357
|
|
|
315
358
|
/**
|
|
316
|
-
* User
|
|
359
|
+
* User who created this job
|
|
317
360
|
*/
|
|
318
361
|
user_id: string;
|
|
319
362
|
|
|
@@ -365,7 +408,7 @@ export interface ClassifyCreateParams {
|
|
|
365
408
|
project_id?: string | null;
|
|
366
409
|
|
|
367
410
|
/**
|
|
368
|
-
* Body param: Configuration for
|
|
411
|
+
* Body param: Configuration for a classify job.
|
|
369
412
|
*/
|
|
370
413
|
configuration?: ClassifyConfiguration | null;
|
|
371
414
|
|
|
@@ -396,6 +439,16 @@ export interface ClassifyListParams extends PaginatedCursorParams {
|
|
|
396
439
|
*/
|
|
397
440
|
configuration_id?: string | null;
|
|
398
441
|
|
|
442
|
+
/**
|
|
443
|
+
* Include jobs created at or after this timestamp (inclusive)
|
|
444
|
+
*/
|
|
445
|
+
created_at_on_or_after?: string | null;
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Include jobs created at or before this timestamp (inclusive)
|
|
449
|
+
*/
|
|
450
|
+
created_at_on_or_before?: string | null;
|
|
451
|
+
|
|
399
452
|
/**
|
|
400
453
|
* Filter by specific job IDs
|
|
401
454
|
*/
|