@llamaindex/llama-cloud 2.8.0 → 2.9.1
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 +51 -0
- package/client.d.mts +11 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +11 -8
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/batches.d.mts +24 -25
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +24 -25
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +1 -2
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +1 -2
- package/resources/batches.mjs.map +1 -1
- package/resources/beta/agent-data.d.mts +94 -94
- package/resources/beta/agent-data.d.mts.map +1 -1
- package/resources/beta/agent-data.d.ts +94 -94
- package/resources/beta/agent-data.d.ts.map +1 -1
- package/resources/beta/agent-data.js +41 -41
- package/resources/beta/agent-data.js.map +1 -1
- package/resources/beta/agent-data.mjs +41 -41
- package/resources/beta/agent-data.mjs.map +1 -1
- package/resources/beta/batch/batch.d.mts +29 -29
- package/resources/beta/batch/batch.d.mts.map +1 -1
- package/resources/beta/batch/batch.d.ts +29 -29
- package/resources/beta/batch/batch.d.ts.map +1 -1
- package/resources/beta/batch/batch.js +16 -16
- package/resources/beta/batch/batch.js.map +1 -1
- package/resources/beta/batch/batch.mjs +16 -16
- package/resources/beta/batch/batch.mjs.map +1 -1
- package/resources/beta/batch/index.d.mts +1 -1
- package/resources/beta/batch/index.d.mts.map +1 -1
- package/resources/beta/batch/index.d.ts +1 -1
- package/resources/beta/batch/index.d.ts.map +1 -1
- package/resources/beta/batch/job-items.d.mts +7 -7
- package/resources/beta/batch/job-items.d.mts.map +1 -1
- package/resources/beta/batch/job-items.d.ts +7 -7
- package/resources/beta/batch/job-items.d.ts.map +1 -1
- package/resources/beta/beta.d.mts +6 -6
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +6 -6
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/chat.d.mts +39 -39
- package/resources/beta/chat.d.mts.map +1 -1
- package/resources/beta/chat.d.ts +39 -39
- package/resources/beta/chat.d.ts.map +1 -1
- package/resources/beta/chat.js +14 -14
- package/resources/beta/chat.js.map +1 -1
- package/resources/beta/chat.mjs +14 -14
- package/resources/beta/chat.mjs.map +1 -1
- package/resources/beta/directories/directories.d.mts +48 -35
- package/resources/beta/directories/directories.d.mts.map +1 -1
- package/resources/beta/directories/directories.d.ts +48 -35
- package/resources/beta/directories/directories.d.ts.map +1 -1
- package/resources/beta/directories/directories.js +30 -30
- package/resources/beta/directories/directories.js.map +1 -1
- package/resources/beta/directories/directories.mjs +30 -30
- package/resources/beta/directories/directories.mjs.map +1 -1
- package/resources/beta/directories/files.d.mts +54 -54
- package/resources/beta/directories/files.d.mts.map +1 -1
- package/resources/beta/directories/files.d.ts +54 -54
- package/resources/beta/directories/files.d.ts.map +1 -1
- package/resources/beta/directories/files.js +32 -32
- package/resources/beta/directories/files.js.map +1 -1
- package/resources/beta/directories/files.mjs +32 -32
- package/resources/beta/directories/files.mjs.map +1 -1
- package/resources/beta/directories/index.d.mts +2 -2
- package/resources/beta/directories/index.d.mts.map +1 -1
- package/resources/beta/directories/index.d.ts +2 -2
- package/resources/beta/directories/index.d.ts.map +1 -1
- package/resources/beta/index.d.mts +6 -6
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +6 -6
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/indexes.d.mts +32 -32
- package/resources/beta/indexes.d.mts.map +1 -1
- package/resources/beta/indexes.d.ts +32 -32
- package/resources/beta/indexes.d.ts.map +1 -1
- package/resources/beta/indexes.js +28 -28
- package/resources/beta/indexes.js.map +1 -1
- package/resources/beta/indexes.mjs +28 -28
- package/resources/beta/indexes.mjs.map +1 -1
- package/resources/beta/retrieval.d.mts +4 -4
- package/resources/beta/retrieval.d.mts.map +1 -1
- package/resources/beta/retrieval.d.ts +4 -4
- package/resources/beta/retrieval.d.ts.map +1 -1
- package/resources/beta/sheets.d.mts +134 -60
- package/resources/beta/sheets.d.mts.map +1 -1
- package/resources/beta/sheets.d.ts +134 -60
- package/resources/beta/sheets.d.ts.map +1 -1
- package/resources/beta/sheets.js +25 -52
- package/resources/beta/sheets.js.map +1 -1
- package/resources/beta/sheets.mjs +25 -52
- package/resources/beta/sheets.mjs.map +1 -1
- package/resources/beta/split.d.mts +2 -2
- package/resources/beta/split.d.mts.map +1 -1
- package/resources/beta/split.d.ts +2 -2
- package/resources/beta/split.d.ts.map +1 -1
- package/resources/classifier/jobs.d.mts +8 -2
- package/resources/classifier/jobs.d.mts.map +1 -1
- package/resources/classifier/jobs.d.ts +8 -2
- package/resources/classifier/jobs.d.ts.map +1 -1
- package/resources/classify.d.mts +71 -9
- package/resources/classify.d.mts.map +1 -1
- package/resources/classify.d.ts +71 -9
- package/resources/classify.d.ts.map +1 -1
- package/resources/configurations.d.mts +101 -46
- package/resources/configurations.d.mts.map +1 -1
- package/resources/configurations.d.ts +101 -46
- package/resources/configurations.d.ts.map +1 -1
- package/resources/configurations.js +9 -9
- package/resources/configurations.js.map +1 -1
- package/resources/configurations.mjs +9 -9
- package/resources/configurations.mjs.map +1 -1
- package/resources/data-sinks.d.mts +16 -16
- package/resources/data-sinks.d.mts.map +1 -1
- package/resources/data-sinks.d.ts +16 -16
- package/resources/data-sinks.d.ts.map +1 -1
- package/resources/data-sinks.js +12 -12
- package/resources/data-sinks.js.map +1 -1
- package/resources/data-sinks.mjs +12 -12
- package/resources/data-sinks.mjs.map +1 -1
- package/resources/data-sources.d.mts +17 -17
- package/resources/data-sources.d.mts.map +1 -1
- package/resources/data-sources.d.ts +17 -17
- package/resources/data-sources.d.ts.map +1 -1
- package/resources/data-sources.js +13 -13
- package/resources/data-sources.js.map +1 -1
- package/resources/data-sources.mjs +13 -13
- package/resources/data-sources.mjs.map +1 -1
- package/resources/extract.d.mts +52 -50
- package/resources/extract.d.mts.map +1 -1
- package/resources/extract.d.ts +52 -50
- package/resources/extract.d.ts.map +1 -1
- package/resources/extract.js +33 -33
- package/resources/extract.js.map +1 -1
- package/resources/extract.mjs +33 -33
- package/resources/extract.mjs.map +1 -1
- package/resources/files.d.mts +41 -41
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +41 -41
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +13 -13
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +13 -13
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +9 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/parsing.d.mts +108 -50
- package/resources/parsing.d.mts.map +1 -1
- package/resources/parsing.d.ts +108 -50
- package/resources/parsing.d.ts.map +1 -1
- package/resources/parsing.js +12 -12
- package/resources/parsing.js.map +1 -1
- package/resources/parsing.mjs +12 -12
- package/resources/parsing.mjs.map +1 -1
- package/resources/pipelines/data-sources.d.mts +40 -30
- package/resources/pipelines/data-sources.d.mts.map +1 -1
- package/resources/pipelines/data-sources.d.ts +40 -30
- package/resources/pipelines/data-sources.d.ts.map +1 -1
- package/resources/pipelines/data-sources.js +23 -13
- package/resources/pipelines/data-sources.js.map +1 -1
- package/resources/pipelines/data-sources.mjs +23 -13
- package/resources/pipelines/data-sources.mjs.map +1 -1
- package/resources/pipelines/documents.d.mts +28 -12
- package/resources/pipelines/documents.d.mts.map +1 -1
- package/resources/pipelines/documents.d.ts +28 -12
- package/resources/pipelines/documents.d.ts.map +1 -1
- package/resources/pipelines/documents.js +30 -14
- package/resources/pipelines/documents.js.map +1 -1
- package/resources/pipelines/documents.mjs +30 -14
- package/resources/pipelines/documents.mjs.map +1 -1
- package/resources/pipelines/files.d.mts +34 -24
- package/resources/pipelines/files.d.mts.map +1 -1
- package/resources/pipelines/files.d.ts +34 -24
- package/resources/pipelines/files.d.ts.map +1 -1
- package/resources/pipelines/files.js +27 -17
- package/resources/pipelines/files.js.map +1 -1
- package/resources/pipelines/files.mjs +27 -17
- package/resources/pipelines/files.mjs.map +1 -1
- package/resources/pipelines/images.d.mts +17 -17
- package/resources/pipelines/images.d.mts.map +1 -1
- package/resources/pipelines/images.d.ts +17 -17
- package/resources/pipelines/images.d.ts.map +1 -1
- package/resources/pipelines/images.js +13 -13
- package/resources/pipelines/images.js.map +1 -1
- package/resources/pipelines/images.mjs +13 -13
- package/resources/pipelines/images.mjs.map +1 -1
- package/resources/pipelines/index.d.mts +5 -5
- package/resources/pipelines/index.d.mts.map +1 -1
- package/resources/pipelines/index.d.ts +5 -5
- package/resources/pipelines/index.d.ts.map +1 -1
- package/resources/pipelines/metadata.d.mts +4 -0
- package/resources/pipelines/metadata.d.mts.map +1 -1
- package/resources/pipelines/metadata.d.ts +4 -0
- package/resources/pipelines/metadata.d.ts.map +1 -1
- package/resources/pipelines/metadata.js +4 -0
- package/resources/pipelines/metadata.js.map +1 -1
- package/resources/pipelines/metadata.mjs +4 -0
- package/resources/pipelines/metadata.mjs.map +1 -1
- package/resources/pipelines/pipelines.d.mts +142 -126
- package/resources/pipelines/pipelines.d.mts.map +1 -1
- package/resources/pipelines/pipelines.d.ts +142 -126
- package/resources/pipelines/pipelines.d.ts.map +1 -1
- package/resources/pipelines/pipelines.js +39 -23
- package/resources/pipelines/pipelines.js.map +1 -1
- package/resources/pipelines/pipelines.mjs +39 -23
- package/resources/pipelines/pipelines.mjs.map +1 -1
- package/resources/pipelines/sync.d.mts +4 -0
- package/resources/pipelines/sync.d.mts.map +1 -1
- package/resources/pipelines/sync.d.ts +4 -0
- package/resources/pipelines/sync.d.ts.map +1 -1
- package/resources/pipelines/sync.js +4 -0
- package/resources/pipelines/sync.js.map +1 -1
- package/resources/pipelines/sync.mjs +4 -0
- package/resources/pipelines/sync.mjs.map +1 -1
- package/resources/retrievers/index.d.mts +1 -1
- package/resources/retrievers/index.d.mts.map +1 -1
- package/resources/retrievers/index.d.ts +1 -1
- package/resources/retrievers/index.d.ts.map +1 -1
- package/resources/retrievers/retrievers.d.mts +39 -39
- package/resources/retrievers/retrievers.d.mts.map +1 -1
- package/resources/retrievers/retrievers.d.ts +39 -39
- package/resources/retrievers/retrievers.d.ts.map +1 -1
- package/resources/retrievers/retrievers.js +20 -20
- package/resources/retrievers/retrievers.js.map +1 -1
- package/resources/retrievers/retrievers.mjs +20 -20
- package/resources/retrievers/retrievers.mjs.map +1 -1
- package/resources/shared.d.mts +12 -4
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +12 -4
- package/resources/shared.d.ts.map +1 -1
- package/resources/sheets.d.mts +199 -0
- package/resources/sheets.d.mts.map +1 -0
- package/resources/sheets.d.ts +199 -0
- package/resources/sheets.d.ts.map +1 -0
- package/resources/sheets.js +101 -0
- package/resources/sheets.js.map +1 -0
- package/resources/sheets.mjs +97 -0
- package/resources/sheets.mjs.map +1 -0
- package/src/client.ts +33 -12
- package/src/resources/batches.ts +24 -25
- package/src/resources/beta/agent-data.ts +131 -131
- package/src/resources/beta/batch/batch.ts +61 -50
- package/src/resources/beta/batch/index.ts +1 -1
- package/src/resources/beta/batch/job-items.ts +28 -17
- package/src/resources/beta/beta.ts +12 -12
- package/src/resources/beta/chat.ts +57 -57
- package/src/resources/beta/directories/directories.ts +80 -66
- package/src/resources/beta/directories/files.ts +73 -73
- package/src/resources/beta/directories/index.ts +5 -5
- package/src/resources/beta/index.ts +12 -12
- package/src/resources/beta/indexes.ts +53 -53
- package/src/resources/beta/retrieval.ts +4 -4
- package/src/resources/beta/sheets.ts +217 -73
- package/src/resources/beta/split.ts +2 -2
- package/src/resources/classifier/jobs.ts +9 -2
- package/src/resources/classify.ts +135 -9
- package/src/resources/configurations.ts +126 -67
- package/src/resources/data-sinks.ts +26 -26
- package/src/resources/data-sources.ts +43 -43
- package/src/resources/extract.ts +118 -94
- package/src/resources/files.ts +61 -61
- package/src/resources/index.ts +21 -12
- package/src/resources/parsing.ts +266 -203
- package/src/resources/pipelines/data-sources.ts +59 -49
- package/src/resources/pipelines/documents.ts +42 -26
- package/src/resources/pipelines/files.ts +62 -52
- package/src/resources/pipelines/images.ts +36 -36
- package/src/resources/pipelines/index.ts +10 -10
- package/src/resources/pipelines/metadata.ts +4 -0
- package/src/resources/pipelines/pipelines.ts +230 -203
- package/src/resources/pipelines/sync.ts +4 -0
- package/src/resources/retrievers/index.ts +3 -3
- package/src/resources/retrievers/retrievers.ts +64 -64
- package/src/resources/shared.ts +13 -4
- package/src/resources/sheets.ts +314 -0
- 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/src/resources/extract.ts
CHANGED
|
@@ -66,66 +66,45 @@ export class Extract extends APIResource {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Get a single extraction job by ID.
|
|
70
|
+
*
|
|
71
|
+
* Returns the job status and results when complete. Use `expand=configuration` to
|
|
72
|
+
* include the full configuration used, and `expand=extract_metadata` for per-field
|
|
73
|
+
* metadata.
|
|
70
74
|
*
|
|
71
75
|
* @example
|
|
72
76
|
* ```ts
|
|
73
|
-
* const
|
|
77
|
+
* const extractV2Job = await client.extract.get('job_id');
|
|
74
78
|
* ```
|
|
75
79
|
*/
|
|
76
|
-
|
|
80
|
+
get(
|
|
77
81
|
jobID: string,
|
|
78
|
-
|
|
82
|
+
query: ExtractGetParams | null | undefined = {},
|
|
79
83
|
options?: RequestOptions,
|
|
80
|
-
): APIPromise<
|
|
81
|
-
|
|
82
|
-
return this._client.delete(path`/api/v2/extract/${jobID}`, {
|
|
83
|
-
query: { organization_id, project_id },
|
|
84
|
-
...options,
|
|
85
|
-
});
|
|
84
|
+
): APIPromise<ExtractV2Job> {
|
|
85
|
+
return this._client.get(path`/api/v2/extract/${jobID}`, { query, ...options });
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
|
-
*
|
|
89
|
+
* Delete an extraction job and its results.
|
|
90
90
|
*
|
|
91
91
|
* @example
|
|
92
92
|
* ```ts
|
|
93
|
-
* const
|
|
94
|
-
* await client.extract.generateSchema();
|
|
93
|
+
* const extract = await client.extract.delete('job_id');
|
|
95
94
|
* ```
|
|
96
95
|
*/
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
delete(
|
|
97
|
+
jobID: string,
|
|
98
|
+
params: ExtractDeleteParams | null | undefined = {},
|
|
99
99
|
options?: RequestOptions,
|
|
100
|
-
): APIPromise<
|
|
101
|
-
const { organization_id, project_id
|
|
102
|
-
return this._client.
|
|
100
|
+
): APIPromise<unknown> {
|
|
101
|
+
const { organization_id, project_id } = params ?? {};
|
|
102
|
+
return this._client.delete(path`/api/v2/extract/${jobID}`, {
|
|
103
103
|
query: { organization_id, project_id },
|
|
104
|
-
body,
|
|
105
104
|
...options,
|
|
106
105
|
});
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
/**
|
|
110
|
-
* Get a single extraction job by ID.
|
|
111
|
-
*
|
|
112
|
-
* Returns the job status and results when complete. Use `expand=configuration` to
|
|
113
|
-
* include the full configuration used, and `expand=extract_metadata` for per-field
|
|
114
|
-
* metadata.
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ```ts
|
|
118
|
-
* const extractV2Job = await client.extract.get('job_id');
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
get(
|
|
122
|
-
jobID: string,
|
|
123
|
-
query: ExtractGetParams | null | undefined = {},
|
|
124
|
-
options?: RequestOptions,
|
|
125
|
-
): APIPromise<ExtractV2Job> {
|
|
126
|
-
return this._client.get(path`/api/v2/extract/${jobID}`, { query, ...options });
|
|
127
|
-
}
|
|
128
|
-
|
|
129
108
|
/**
|
|
130
109
|
* Validate a JSON schema for extraction.
|
|
131
110
|
*
|
|
@@ -135,15 +114,15 @@ export class Extract extends APIResource {
|
|
|
135
114
|
* await client.extract.validateSchema({
|
|
136
115
|
* data_schema: {
|
|
137
116
|
* properties: {
|
|
138
|
-
* vendor_name: 'bar',
|
|
139
117
|
* invoice_number: 'bar',
|
|
140
|
-
* total_amount: 'bar',
|
|
141
118
|
* line_items: 'bar',
|
|
119
|
+
* total_amount: 'bar',
|
|
120
|
+
* vendor_name: 'bar',
|
|
142
121
|
* },
|
|
143
122
|
* required: [
|
|
144
|
-
* 'vendor_name',
|
|
145
123
|
* 'invoice_number',
|
|
146
124
|
* 'total_amount',
|
|
125
|
+
* 'vendor_name',
|
|
147
126
|
* ],
|
|
148
127
|
* type: 'object',
|
|
149
128
|
* },
|
|
@@ -157,6 +136,27 @@ export class Extract extends APIResource {
|
|
|
157
136
|
return this._client.post('/api/v2/extract/schema/validation', { body, ...options });
|
|
158
137
|
}
|
|
159
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Generate a JSON schema and return a product configuration request.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```ts
|
|
144
|
+
* const configurationCreate =
|
|
145
|
+
* await client.extract.generateSchema();
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
generateSchema(
|
|
149
|
+
params: ExtractGenerateSchemaParams,
|
|
150
|
+
options?: RequestOptions,
|
|
151
|
+
): APIPromise<ConfigurationsAPI.ConfigurationCreate> {
|
|
152
|
+
const { organization_id, project_id, ...body } = params;
|
|
153
|
+
return this._client.post('/api/v2/extract/schema/generate', {
|
|
154
|
+
query: { organization_id, project_id },
|
|
155
|
+
body,
|
|
156
|
+
...options,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
160
|
/**
|
|
161
161
|
* Wait for an extraction job to complete by polling until it reaches a terminal state.
|
|
162
162
|
*
|
|
@@ -289,12 +289,6 @@ export interface ExtractConfiguration {
|
|
|
289
289
|
*/
|
|
290
290
|
confidence_scores?: boolean;
|
|
291
291
|
|
|
292
|
-
/**
|
|
293
|
-
* Extract algorithm version. Use 'latest' for the default pipeline or a date
|
|
294
|
-
* string (e.g. '2026-01-08') to pin to a specific release.
|
|
295
|
-
*/
|
|
296
|
-
extract_version?: string;
|
|
297
|
-
|
|
298
292
|
/**
|
|
299
293
|
* Granularity of extraction: per_doc returns one object per document, per_page
|
|
300
294
|
* returns one object per page, per_table_row returns one object per table row
|
|
@@ -332,7 +326,15 @@ export interface ExtractConfiguration {
|
|
|
332
326
|
/**
|
|
333
327
|
* Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
|
|
334
328
|
*/
|
|
335
|
-
tier?: '
|
|
329
|
+
tier?: 'agentic' | 'cost_effective';
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Use 'latest' for the latest release for the selected tier or a date string
|
|
333
|
+
* (YYYY-MM-DD format) to pin to the nearest release at or before that date. Job
|
|
334
|
+
* responses always report the concrete resolved version the job runs, fixed at job
|
|
335
|
+
* creation; saved configurations keep the value as provided.
|
|
336
|
+
*/
|
|
337
|
+
version?: string;
|
|
336
338
|
}
|
|
337
339
|
|
|
338
340
|
/**
|
|
@@ -490,22 +492,33 @@ export namespace ExtractV2JobCreate {
|
|
|
490
492
|
* events are delivered.
|
|
491
493
|
*/
|
|
492
494
|
webhook_events?: Array<
|
|
493
|
-
| '
|
|
494
|
-
| '
|
|
495
|
+
| 'classify.cancelled'
|
|
496
|
+
| 'classify.error'
|
|
497
|
+
| 'classify.partial_success'
|
|
498
|
+
| 'classify.pending'
|
|
499
|
+
| 'classify.running'
|
|
500
|
+
| 'classify.success'
|
|
501
|
+
| 'extract.cancelled'
|
|
495
502
|
| 'extract.error'
|
|
496
503
|
| 'extract.partial_success'
|
|
497
|
-
| 'extract.
|
|
504
|
+
| 'extract.pending'
|
|
505
|
+
| 'extract.success'
|
|
506
|
+
| 'parse.cancelled'
|
|
507
|
+
| 'parse.error'
|
|
508
|
+
| 'parse.partial_success'
|
|
498
509
|
| 'parse.pending'
|
|
499
510
|
| 'parse.running'
|
|
500
511
|
| 'parse.success'
|
|
501
|
-
| '
|
|
502
|
-
| '
|
|
503
|
-
| '
|
|
504
|
-
| '
|
|
505
|
-
| '
|
|
506
|
-
| '
|
|
507
|
-
| '
|
|
508
|
-
| '
|
|
512
|
+
| 'sheets.cancelled'
|
|
513
|
+
| 'sheets.error'
|
|
514
|
+
| 'sheets.partial_success'
|
|
515
|
+
| 'sheets.pending'
|
|
516
|
+
| 'sheets.success'
|
|
517
|
+
| 'split.cancelled'
|
|
518
|
+
| 'split.error'
|
|
519
|
+
| 'split.pending'
|
|
520
|
+
| 'split.processing'
|
|
521
|
+
| 'split.success'
|
|
509
522
|
| 'unmapped_event'
|
|
510
523
|
> | null;
|
|
511
524
|
|
|
@@ -674,22 +687,33 @@ export namespace ExtractCreateParams {
|
|
|
674
687
|
* events are delivered.
|
|
675
688
|
*/
|
|
676
689
|
webhook_events?: Array<
|
|
677
|
-
| '
|
|
678
|
-
| '
|
|
690
|
+
| 'classify.cancelled'
|
|
691
|
+
| 'classify.error'
|
|
692
|
+
| 'classify.partial_success'
|
|
693
|
+
| 'classify.pending'
|
|
694
|
+
| 'classify.running'
|
|
695
|
+
| 'classify.success'
|
|
696
|
+
| 'extract.cancelled'
|
|
679
697
|
| 'extract.error'
|
|
680
698
|
| 'extract.partial_success'
|
|
681
|
-
| 'extract.
|
|
699
|
+
| 'extract.pending'
|
|
700
|
+
| 'extract.success'
|
|
701
|
+
| 'parse.cancelled'
|
|
702
|
+
| 'parse.error'
|
|
703
|
+
| 'parse.partial_success'
|
|
682
704
|
| 'parse.pending'
|
|
683
705
|
| 'parse.running'
|
|
684
706
|
| 'parse.success'
|
|
685
|
-
| '
|
|
686
|
-
| '
|
|
687
|
-
| '
|
|
688
|
-
| '
|
|
689
|
-
| '
|
|
690
|
-
| '
|
|
691
|
-
| '
|
|
692
|
-
| '
|
|
707
|
+
| 'sheets.cancelled'
|
|
708
|
+
| 'sheets.error'
|
|
709
|
+
| 'sheets.partial_success'
|
|
710
|
+
| 'sheets.pending'
|
|
711
|
+
| 'sheets.success'
|
|
712
|
+
| 'split.cancelled'
|
|
713
|
+
| 'split.error'
|
|
714
|
+
| 'split.pending'
|
|
715
|
+
| 'split.processing'
|
|
716
|
+
| 'split.success'
|
|
693
717
|
| 'unmapped_event'
|
|
694
718
|
> | null;
|
|
695
719
|
|
|
@@ -758,7 +782,18 @@ export interface ExtractListParams extends PaginatedCursorParams {
|
|
|
758
782
|
/**
|
|
759
783
|
* Filter by status
|
|
760
784
|
*/
|
|
761
|
-
status?: '
|
|
785
|
+
status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED' | null;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export interface ExtractGetParams {
|
|
789
|
+
/**
|
|
790
|
+
* Additional fields to include: configuration, extract_metadata
|
|
791
|
+
*/
|
|
792
|
+
expand?: Array<string>;
|
|
793
|
+
|
|
794
|
+
organization_id?: string | null;
|
|
795
|
+
|
|
796
|
+
project_id?: string | null;
|
|
762
797
|
}
|
|
763
798
|
|
|
764
799
|
export interface ExtractDeleteParams {
|
|
@@ -767,6 +802,15 @@ export interface ExtractDeleteParams {
|
|
|
767
802
|
project_id?: string | null;
|
|
768
803
|
}
|
|
769
804
|
|
|
805
|
+
export interface ExtractValidateSchemaParams {
|
|
806
|
+
/**
|
|
807
|
+
* JSON Schema to validate for use with extract jobs
|
|
808
|
+
*/
|
|
809
|
+
data_schema: {
|
|
810
|
+
[key: string]: { [key: string]: unknown } | Array<unknown> | string | number | boolean | null;
|
|
811
|
+
};
|
|
812
|
+
}
|
|
813
|
+
|
|
770
814
|
export interface ExtractGenerateSchemaParams {
|
|
771
815
|
/**
|
|
772
816
|
* Query param
|
|
@@ -801,26 +845,6 @@ export interface ExtractGenerateSchemaParams {
|
|
|
801
845
|
prompt?: string | null;
|
|
802
846
|
}
|
|
803
847
|
|
|
804
|
-
export interface ExtractGetParams {
|
|
805
|
-
/**
|
|
806
|
-
* Additional fields to include: configuration, extract_metadata
|
|
807
|
-
*/
|
|
808
|
-
expand?: Array<string>;
|
|
809
|
-
|
|
810
|
-
organization_id?: string | null;
|
|
811
|
-
|
|
812
|
-
project_id?: string | null;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
export interface ExtractValidateSchemaParams {
|
|
816
|
-
/**
|
|
817
|
-
* JSON Schema to validate for use with extract jobs
|
|
818
|
-
*/
|
|
819
|
-
data_schema: {
|
|
820
|
-
[key: string]: { [key: string]: unknown } | Array<unknown> | string | number | boolean | null;
|
|
821
|
-
};
|
|
822
|
-
}
|
|
823
|
-
|
|
824
848
|
export declare namespace Extract {
|
|
825
849
|
export {
|
|
826
850
|
type ExtractConfiguration as ExtractConfiguration,
|
|
@@ -837,9 +861,9 @@ export declare namespace Extract {
|
|
|
837
861
|
type ExtractV2JobsPaginatedCursor as ExtractV2JobsPaginatedCursor,
|
|
838
862
|
type ExtractCreateParams as ExtractCreateParams,
|
|
839
863
|
type ExtractListParams as ExtractListParams,
|
|
840
|
-
type ExtractDeleteParams as ExtractDeleteParams,
|
|
841
|
-
type ExtractGenerateSchemaParams as ExtractGenerateSchemaParams,
|
|
842
864
|
type ExtractGetParams as ExtractGetParams,
|
|
865
|
+
type ExtractDeleteParams as ExtractDeleteParams,
|
|
843
866
|
type ExtractValidateSchemaParams as ExtractValidateSchemaParams,
|
|
867
|
+
type ExtractGenerateSchemaParams as ExtractGenerateSchemaParams,
|
|
844
868
|
};
|
|
845
869
|
}
|
package/src/resources/files.ts
CHANGED
|
@@ -28,6 +28,20 @@ export class Files extends APIResource {
|
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Query files with filtering and pagination. Deprecated: use `GET /files`.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated Use the GET /files endpoint instead
|
|
35
|
+
*/
|
|
36
|
+
query(params: FileQueryParams, options?: RequestOptions): APIPromise<FileQueryResponse> {
|
|
37
|
+
const { organization_id, project_id, ...body } = params;
|
|
38
|
+
return this._client.post('/api/v1/beta/files/query', {
|
|
39
|
+
query: { organization_id, project_id },
|
|
40
|
+
body,
|
|
41
|
+
...options,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
31
45
|
/**
|
|
32
46
|
* List files with optional filtering and pagination.
|
|
33
47
|
*
|
|
@@ -70,20 +84,6 @@ export class Files extends APIResource {
|
|
|
70
84
|
): APIPromise<PresignedURL> {
|
|
71
85
|
return this._client.get(path`/api/v1/beta/files/${fileID}/content`, { query, ...options });
|
|
72
86
|
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Query files with filtering and pagination. Deprecated: use `GET /files`.
|
|
76
|
-
*
|
|
77
|
-
* @deprecated Use the GET /files endpoint instead
|
|
78
|
-
*/
|
|
79
|
-
query(params: FileQueryParams, options?: RequestOptions): APIPromise<FileQueryResponse> {
|
|
80
|
-
const { organization_id, project_id, ...body } = params;
|
|
81
|
-
return this._client.post('/api/v1/beta/files/query', {
|
|
82
|
-
query: { organization_id, project_id },
|
|
83
|
-
body,
|
|
84
|
-
...options,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export type FileListResponsesPaginatedCursor = PaginatedCursor<FileListResponse>;
|
|
@@ -395,52 +395,6 @@ export interface FileCreateParams {
|
|
|
395
395
|
external_file_id?: string | null;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
export interface FileListParams extends PaginatedCursorParams {
|
|
399
|
-
/**
|
|
400
|
-
* Fields to expand on each file.
|
|
401
|
-
*/
|
|
402
|
-
expand?: Array<string> | null;
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Filter by external file ID.
|
|
406
|
-
*/
|
|
407
|
-
external_file_id?: string | null;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Filter by specific file IDs.
|
|
411
|
-
*/
|
|
412
|
-
file_ids?: Array<string> | null;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Filter by file name (exact match).
|
|
416
|
-
*/
|
|
417
|
-
file_name?: string | null;
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* A comma-separated list of fields to order by, sorted in ascending order. Use
|
|
421
|
-
* 'field_name desc' to specify descending order.
|
|
422
|
-
*/
|
|
423
|
-
order_by?: string | null;
|
|
424
|
-
|
|
425
|
-
organization_id?: string | null;
|
|
426
|
-
|
|
427
|
-
project_id?: string | null;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
export interface FileDeleteParams {
|
|
431
|
-
organization_id?: string | null;
|
|
432
|
-
|
|
433
|
-
project_id?: string | null;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export interface FileGetParams {
|
|
437
|
-
expires_at_seconds?: number | null;
|
|
438
|
-
|
|
439
|
-
organization_id?: string | null;
|
|
440
|
-
|
|
441
|
-
project_id?: string | null;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
398
|
export interface FileQueryParams {
|
|
445
399
|
/**
|
|
446
400
|
* Query param
|
|
@@ -514,6 +468,52 @@ export namespace FileQueryParams {
|
|
|
514
468
|
}
|
|
515
469
|
}
|
|
516
470
|
|
|
471
|
+
export interface FileListParams extends PaginatedCursorParams {
|
|
472
|
+
/**
|
|
473
|
+
* Fields to expand on each file.
|
|
474
|
+
*/
|
|
475
|
+
expand?: Array<string> | null;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Filter by external file ID.
|
|
479
|
+
*/
|
|
480
|
+
external_file_id?: string | null;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Filter by specific file IDs.
|
|
484
|
+
*/
|
|
485
|
+
file_ids?: Array<string> | null;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Filter by file name (exact match).
|
|
489
|
+
*/
|
|
490
|
+
file_name?: string | null;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* A comma-separated list of fields to order by, sorted in ascending order. Use
|
|
494
|
+
* 'field_name desc' to specify descending order.
|
|
495
|
+
*/
|
|
496
|
+
order_by?: string | null;
|
|
497
|
+
|
|
498
|
+
organization_id?: string | null;
|
|
499
|
+
|
|
500
|
+
project_id?: string | null;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export interface FileDeleteParams {
|
|
504
|
+
organization_id?: string | null;
|
|
505
|
+
|
|
506
|
+
project_id?: string | null;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export interface FileGetParams {
|
|
510
|
+
expires_at_seconds?: number | null;
|
|
511
|
+
|
|
512
|
+
organization_id?: string | null;
|
|
513
|
+
|
|
514
|
+
project_id?: string | null;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
517
|
export declare namespace Files {
|
|
518
518
|
export {
|
|
519
519
|
type File as File,
|
|
@@ -523,9 +523,9 @@ export declare namespace Files {
|
|
|
523
523
|
type FileQueryResponse as FileQueryResponse,
|
|
524
524
|
type FileListResponsesPaginatedCursor as FileListResponsesPaginatedCursor,
|
|
525
525
|
type FileCreateParams as FileCreateParams,
|
|
526
|
+
type FileQueryParams as FileQueryParams,
|
|
526
527
|
type FileListParams as FileListParams,
|
|
527
528
|
type FileDeleteParams as FileDeleteParams,
|
|
528
529
|
type FileGetParams as FileGetParams,
|
|
529
|
-
type FileQueryParams as FileQueryParams,
|
|
530
530
|
};
|
|
531
531
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -36,9 +36,9 @@ export {
|
|
|
36
36
|
type SplitV1Parameters,
|
|
37
37
|
type UntypedParameters,
|
|
38
38
|
type ConfigurationCreateParams,
|
|
39
|
+
type ConfigurationListParams,
|
|
39
40
|
type ConfigurationRetrieveParams,
|
|
40
41
|
type ConfigurationUpdateParams,
|
|
41
|
-
type ConfigurationListParams,
|
|
42
42
|
type ConfigurationDeleteParams,
|
|
43
43
|
type ConfigurationResponsesPaginatedCursor,
|
|
44
44
|
} from './configurations';
|
|
@@ -46,18 +46,18 @@ export {
|
|
|
46
46
|
DataSinks,
|
|
47
47
|
type DataSink,
|
|
48
48
|
type DataSinkListResponse,
|
|
49
|
+
type DataSinkListParams,
|
|
49
50
|
type DataSinkCreateParams,
|
|
50
51
|
type DataSinkUpdateParams,
|
|
51
|
-
type DataSinkListParams,
|
|
52
52
|
} from './data-sinks';
|
|
53
53
|
export {
|
|
54
54
|
DataSources,
|
|
55
55
|
type DataSource,
|
|
56
56
|
type DataSourceReaderVersionMetadata,
|
|
57
57
|
type DataSourceListResponse,
|
|
58
|
+
type DataSourceListParams,
|
|
58
59
|
type DataSourceCreateParams,
|
|
59
60
|
type DataSourceUpdateParams,
|
|
60
|
-
type DataSourceListParams,
|
|
61
61
|
} from './data-sources';
|
|
62
62
|
export {
|
|
63
63
|
Extract,
|
|
@@ -74,10 +74,10 @@ export {
|
|
|
74
74
|
type ExtractDeleteResponse,
|
|
75
75
|
type ExtractCreateParams,
|
|
76
76
|
type ExtractListParams,
|
|
77
|
-
type ExtractDeleteParams,
|
|
78
|
-
type ExtractGenerateSchemaParams,
|
|
79
77
|
type ExtractGetParams,
|
|
78
|
+
type ExtractDeleteParams,
|
|
80
79
|
type ExtractValidateSchemaParams,
|
|
80
|
+
type ExtractGenerateSchemaParams,
|
|
81
81
|
type ExtractV2JobsPaginatedCursor,
|
|
82
82
|
} from './extract';
|
|
83
83
|
export {
|
|
@@ -88,10 +88,10 @@ export {
|
|
|
88
88
|
type FileListResponse,
|
|
89
89
|
type FileQueryResponse,
|
|
90
90
|
type FileCreateParams,
|
|
91
|
+
type FileQueryParams,
|
|
91
92
|
type FileListParams,
|
|
92
93
|
type FileDeleteParams,
|
|
93
94
|
type FileGetParams,
|
|
94
|
-
type FileQueryParams,
|
|
95
95
|
type FileListResponsesPaginatedCursor,
|
|
96
96
|
} from './files';
|
|
97
97
|
export {
|
|
@@ -116,8 +116,8 @@ export {
|
|
|
116
116
|
type ParsingListResponse,
|
|
117
117
|
type ParsingGetResponse,
|
|
118
118
|
type ParsingCreateParams,
|
|
119
|
-
type ParsingListParams,
|
|
120
119
|
type ParsingGetParams,
|
|
120
|
+
type ParsingListParams,
|
|
121
121
|
type ParsingListResponsesPaginatedCursor,
|
|
122
122
|
} from './parsing';
|
|
123
123
|
export {
|
|
@@ -155,12 +155,12 @@ export {
|
|
|
155
155
|
type VertexTextEmbedding,
|
|
156
156
|
type PipelineRetrieveResponse,
|
|
157
157
|
type PipelineListResponse,
|
|
158
|
+
type PipelineListParams,
|
|
158
159
|
type PipelineCreateParams,
|
|
159
|
-
type PipelineRetrieveParams,
|
|
160
160
|
type PipelineUpdateParams,
|
|
161
|
-
type PipelineListParams,
|
|
162
161
|
type PipelineGetStatusParams,
|
|
163
162
|
type PipelineUpsertParams,
|
|
163
|
+
type PipelineRetrieveParams,
|
|
164
164
|
} from './pipelines/pipelines';
|
|
165
165
|
export {
|
|
166
166
|
Projects,
|
|
@@ -179,10 +179,19 @@ export {
|
|
|
179
179
|
type RetrieverPipeline,
|
|
180
180
|
type RetrieverListResponse,
|
|
181
181
|
type RetrieverCreateParams,
|
|
182
|
-
type
|
|
182
|
+
type RetrieverUpsertParams,
|
|
183
183
|
type RetrieverListParams,
|
|
184
|
-
type RetrieverDeleteParams,
|
|
185
184
|
type RetrieverGetParams,
|
|
185
|
+
type RetrieverUpdateParams,
|
|
186
|
+
type RetrieverDeleteParams,
|
|
186
187
|
type RetrieverSearchParams,
|
|
187
|
-
type RetrieverUpsertParams,
|
|
188
188
|
} from './retrievers/retrievers';
|
|
189
|
+
export {
|
|
190
|
+
Sheets,
|
|
191
|
+
type SheetDeleteJobResponse,
|
|
192
|
+
type SheetCreateParams,
|
|
193
|
+
type SheetListParams,
|
|
194
|
+
type SheetGetParams,
|
|
195
|
+
type SheetGetResultTableParams,
|
|
196
|
+
type SheetDeleteJobParams,
|
|
197
|
+
} from './sheets';
|