@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.
- package/CHANGELOG.md +72 -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/parse-configurations.d.mts +7 -9
- package/resources/beta/parse-configurations.d.mts.map +1 -1
- package/resources/beta/parse-configurations.d.ts +7 -9
- package/resources/beta/parse-configurations.d.ts.map +1 -1
- package/resources/beta/parse-configurations.js +7 -9
- package/resources/beta/parse-configurations.js.map +1 -1
- package/resources/beta/parse-configurations.mjs +7 -9
- package/resources/beta/parse-configurations.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 +93 -38
- package/resources/classify.d.mts.map +1 -1
- package/resources/classify.d.ts +93 -38
- 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 +1593 -0
- package/resources/extract.d.mts.map +1 -0
- package/resources/extract.d.ts +1593 -0
- package/resources/extract.d.ts.map +1 -0
- package/resources/extract.js +215 -0
- package/resources/extract.js.map +1 -0
- package/resources/extract.mjs +211 -0
- package/resources/extract.mjs.map +1 -0
- package/resources/files.d.mts +53 -39
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +53 -39
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +11 -10
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +11 -10
- 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/parse-configurations.ts +7 -9
- 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 +101 -38
- package/src/resources/extract.ts +2055 -0
- package/src/resources/files.ts +53 -39
- package/src/resources/index.ts +22 -1
- package/src/resources/parsing.ts +327 -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 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
|
-
*
|
|
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. 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
|
-
*
|
|
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,22 +126,27 @@ 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
|
|
|
90
133
|
/**
|
|
91
|
-
*
|
|
134
|
+
* Saved configuration ID
|
|
92
135
|
*/
|
|
93
136
|
configuration_id?: string | null;
|
|
94
137
|
|
|
95
138
|
/**
|
|
96
|
-
*
|
|
139
|
+
* @deprecated Deprecated: use file_input instead
|
|
97
140
|
*/
|
|
98
141
|
file_id?: string | null;
|
|
99
142
|
|
|
100
143
|
/**
|
|
101
|
-
*
|
|
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
|
|
164
|
+
* Confidence score between 0.0 and 1.0
|
|
117
165
|
*/
|
|
118
166
|
confidence: number;
|
|
119
167
|
|
|
120
168
|
/**
|
|
121
|
-
*
|
|
169
|
+
* Why the document matched (or didn't match) the returned rule
|
|
122
170
|
*/
|
|
123
171
|
reasoning: string;
|
|
124
172
|
|
|
125
173
|
/**
|
|
126
|
-
*
|
|
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
|
-
*
|
|
189
|
+
* Classify configuration used for this job
|
|
142
190
|
*/
|
|
143
191
|
configuration: ClassifyConfiguration;
|
|
144
192
|
|
|
145
193
|
/**
|
|
146
|
-
*
|
|
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
|
-
*
|
|
199
|
+
* ID of the input file or parse job
|
|
152
200
|
*/
|
|
153
|
-
|
|
201
|
+
file_input: string;
|
|
154
202
|
|
|
155
203
|
/**
|
|
156
|
-
* Project
|
|
204
|
+
* Project this job belongs to
|
|
157
205
|
*/
|
|
158
206
|
project_id: string;
|
|
159
207
|
|
|
160
208
|
/**
|
|
161
|
-
*
|
|
209
|
+
* Current job status: PENDING, RUNNING, COMPLETED, or FAILED
|
|
162
210
|
*/
|
|
163
211
|
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
164
212
|
|
|
165
213
|
/**
|
|
166
|
-
* User
|
|
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
|
-
*
|
|
264
|
+
* Classify configuration used for this job
|
|
217
265
|
*/
|
|
218
266
|
configuration: ClassifyConfiguration;
|
|
219
267
|
|
|
220
268
|
/**
|
|
221
|
-
*
|
|
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
|
-
*
|
|
274
|
+
* ID of the input file or parse job
|
|
227
275
|
*/
|
|
228
|
-
|
|
276
|
+
file_input: string;
|
|
229
277
|
|
|
230
278
|
/**
|
|
231
|
-
* Project
|
|
279
|
+
* Project this job belongs to
|
|
232
280
|
*/
|
|
233
281
|
project_id: string;
|
|
234
282
|
|
|
235
283
|
/**
|
|
236
|
-
*
|
|
284
|
+
* Current job status: PENDING, RUNNING, COMPLETED, or FAILED
|
|
237
285
|
*/
|
|
238
286
|
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
239
287
|
|
|
240
288
|
/**
|
|
241
|
-
* User
|
|
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
|
-
*
|
|
339
|
+
* Classify configuration used for this job
|
|
292
340
|
*/
|
|
293
341
|
configuration: ClassifyConfiguration;
|
|
294
342
|
|
|
295
343
|
/**
|
|
296
|
-
*
|
|
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
|
-
*
|
|
349
|
+
* ID of the input file or parse job
|
|
302
350
|
*/
|
|
303
|
-
|
|
351
|
+
file_input: string;
|
|
304
352
|
|
|
305
353
|
/**
|
|
306
|
-
* Project
|
|
354
|
+
* Project this job belongs to
|
|
307
355
|
*/
|
|
308
356
|
project_id: string;
|
|
309
357
|
|
|
310
358
|
/**
|
|
311
|
-
*
|
|
359
|
+
* Current job status: PENDING, RUNNING, COMPLETED, or FAILED
|
|
312
360
|
*/
|
|
313
361
|
status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED';
|
|
314
362
|
|
|
315
363
|
/**
|
|
316
|
-
* User
|
|
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
|
|
416
|
+
* Body param: Configuration for a classify job.
|
|
369
417
|
*/
|
|
370
418
|
configuration?: ClassifyConfiguration | null;
|
|
371
419
|
|
|
372
420
|
/**
|
|
373
|
-
* Body param:
|
|
421
|
+
* Body param: Saved configuration ID
|
|
374
422
|
*/
|
|
375
423
|
configuration_id?: string | null;
|
|
376
424
|
|
|
377
425
|
/**
|
|
378
|
-
* Body param:
|
|
426
|
+
* @deprecated Body param: Deprecated: use file_input instead
|
|
379
427
|
*/
|
|
380
428
|
file_id?: string | null;
|
|
381
429
|
|
|
382
430
|
/**
|
|
383
|
-
* Body param:
|
|
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
|
*/
|