@llamaindex/llama-cloud 2.9.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 +20 -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 +4 -4
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +4 -4
- package/resources/batches.d.ts.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 +47 -47
- package/resources/beta/directories/files.d.mts.map +1 -1
- package/resources/beta/directories/files.d.ts +47 -47
- 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 +3 -3
- package/resources/beta/retrieval.d.mts.map +1 -1
- package/resources/beta/retrieval.d.ts +3 -3
- package/resources/beta/retrieval.d.ts.map +1 -1
- package/resources/beta/sheets.d.mts +23 -56
- package/resources/beta/sheets.d.mts.map +1 -1
- package/resources/beta/sheets.d.ts +23 -56
- package/resources/beta/sheets.d.ts.map +1 -1
- package/resources/beta/sheets.js +19 -52
- package/resources/beta/sheets.js.map +1 -1
- package/resources/beta/sheets.mjs +19 -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 +1 -1
- package/resources/classifier/jobs.d.mts.map +1 -1
- package/resources/classifier/jobs.d.ts +1 -1
- package/resources/classifier/jobs.d.ts.map +1 -1
- package/resources/classify.d.mts +13 -11
- package/resources/classify.d.mts.map +1 -1
- package/resources/classify.d.ts +13 -11
- package/resources/classify.d.ts.map +1 -1
- package/resources/configurations.d.mts +62 -43
- package/resources/configurations.d.mts.map +1 -1
- package/resources/configurations.d.ts +62 -43
- 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 +48 -46
- package/resources/extract.d.mts.map +1 -1
- package/resources/extract.d.ts +48 -46
- 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 +73 -51
- package/resources/parsing.d.mts.map +1 -1
- package/resources/parsing.d.ts +73 -51
- 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 +11 -3
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +11 -3
- 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 +4 -4
- package/src/resources/beta/agent-data.ts +131 -131
- package/src/resources/beta/batch/batch.ts +59 -54
- package/src/resources/beta/batch/index.ts +1 -1
- package/src/resources/beta/batch/job-items.ts +26 -21
- 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 +66 -66
- 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 +3 -3
- package/src/resources/beta/sheets.ts +74 -97
- package/src/resources/beta/split.ts +2 -2
- package/src/resources/classifier/jobs.ts +1 -1
- package/src/resources/classify.ts +51 -39
- package/src/resources/configurations.ts +84 -63
- package/src/resources/data-sinks.ts +26 -26
- package/src/resources/data-sources.ts +43 -43
- package/src/resources/extract.ts +109 -97
- package/src/resources/files.ts +61 -61
- package/src/resources/index.ts +21 -12
- package/src/resources/parsing.ts +229 -204
- 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 +228 -207
- 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 +12 -3
- 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
|
*
|
|
@@ -326,11 +326,13 @@ export interface ExtractConfiguration {
|
|
|
326
326
|
/**
|
|
327
327
|
* Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
|
|
328
328
|
*/
|
|
329
|
-
tier?: '
|
|
329
|
+
tier?: 'agentic' | 'cost_effective';
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
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.
|
|
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.
|
|
334
336
|
*/
|
|
335
337
|
version?: string;
|
|
336
338
|
}
|
|
@@ -490,28 +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
|
-
| 'parse.partial_success'
|
|
503
|
-
| 'parse.cancelled'
|
|
504
|
-
| 'classify.pending'
|
|
505
|
-
| 'classify.running'
|
|
506
|
-
| 'classify.success'
|
|
507
|
-
| 'classify.error'
|
|
508
|
-
| 'classify.partial_success'
|
|
509
|
-
| 'classify.cancelled'
|
|
510
|
-
| 'sheets.pending'
|
|
511
|
-
| 'sheets.success'
|
|
512
|
+
| 'sheets.cancelled'
|
|
512
513
|
| 'sheets.error'
|
|
513
514
|
| 'sheets.partial_success'
|
|
514
|
-
| 'sheets.
|
|
515
|
+
| 'sheets.pending'
|
|
516
|
+
| 'sheets.success'
|
|
517
|
+
| 'split.cancelled'
|
|
518
|
+
| 'split.error'
|
|
519
|
+
| 'split.pending'
|
|
520
|
+
| 'split.processing'
|
|
521
|
+
| 'split.success'
|
|
515
522
|
| 'unmapped_event'
|
|
516
523
|
> | null;
|
|
517
524
|
|
|
@@ -680,28 +687,33 @@ export namespace ExtractCreateParams {
|
|
|
680
687
|
* events are delivered.
|
|
681
688
|
*/
|
|
682
689
|
webhook_events?: Array<
|
|
683
|
-
| '
|
|
684
|
-
| '
|
|
690
|
+
| 'classify.cancelled'
|
|
691
|
+
| 'classify.error'
|
|
692
|
+
| 'classify.partial_success'
|
|
693
|
+
| 'classify.pending'
|
|
694
|
+
| 'classify.running'
|
|
695
|
+
| 'classify.success'
|
|
696
|
+
| 'extract.cancelled'
|
|
685
697
|
| 'extract.error'
|
|
686
698
|
| 'extract.partial_success'
|
|
687
|
-
| 'extract.
|
|
699
|
+
| 'extract.pending'
|
|
700
|
+
| 'extract.success'
|
|
701
|
+
| 'parse.cancelled'
|
|
702
|
+
| 'parse.error'
|
|
703
|
+
| 'parse.partial_success'
|
|
688
704
|
| 'parse.pending'
|
|
689
705
|
| 'parse.running'
|
|
690
706
|
| 'parse.success'
|
|
691
|
-
| '
|
|
692
|
-
| 'parse.partial_success'
|
|
693
|
-
| 'parse.cancelled'
|
|
694
|
-
| 'classify.pending'
|
|
695
|
-
| 'classify.running'
|
|
696
|
-
| 'classify.success'
|
|
697
|
-
| 'classify.error'
|
|
698
|
-
| 'classify.partial_success'
|
|
699
|
-
| 'classify.cancelled'
|
|
700
|
-
| 'sheets.pending'
|
|
701
|
-
| 'sheets.success'
|
|
707
|
+
| 'sheets.cancelled'
|
|
702
708
|
| 'sheets.error'
|
|
703
709
|
| 'sheets.partial_success'
|
|
704
|
-
| 'sheets.
|
|
710
|
+
| 'sheets.pending'
|
|
711
|
+
| 'sheets.success'
|
|
712
|
+
| 'split.cancelled'
|
|
713
|
+
| 'split.error'
|
|
714
|
+
| 'split.pending'
|
|
715
|
+
| 'split.processing'
|
|
716
|
+
| 'split.success'
|
|
705
717
|
| 'unmapped_event'
|
|
706
718
|
> | null;
|
|
707
719
|
|
|
@@ -770,7 +782,18 @@ export interface ExtractListParams extends PaginatedCursorParams {
|
|
|
770
782
|
/**
|
|
771
783
|
* Filter by status
|
|
772
784
|
*/
|
|
773
|
-
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;
|
|
774
797
|
}
|
|
775
798
|
|
|
776
799
|
export interface ExtractDeleteParams {
|
|
@@ -779,6 +802,15 @@ export interface ExtractDeleteParams {
|
|
|
779
802
|
project_id?: string | null;
|
|
780
803
|
}
|
|
781
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
|
+
|
|
782
814
|
export interface ExtractGenerateSchemaParams {
|
|
783
815
|
/**
|
|
784
816
|
* Query param
|
|
@@ -813,26 +845,6 @@ export interface ExtractGenerateSchemaParams {
|
|
|
813
845
|
prompt?: string | null;
|
|
814
846
|
}
|
|
815
847
|
|
|
816
|
-
export interface ExtractGetParams {
|
|
817
|
-
/**
|
|
818
|
-
* Additional fields to include: configuration, extract_metadata
|
|
819
|
-
*/
|
|
820
|
-
expand?: Array<string>;
|
|
821
|
-
|
|
822
|
-
organization_id?: string | null;
|
|
823
|
-
|
|
824
|
-
project_id?: string | null;
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
export interface ExtractValidateSchemaParams {
|
|
828
|
-
/**
|
|
829
|
-
* JSON Schema to validate for use with extract jobs
|
|
830
|
-
*/
|
|
831
|
-
data_schema: {
|
|
832
|
-
[key: string]: { [key: string]: unknown } | Array<unknown> | string | number | boolean | null;
|
|
833
|
-
};
|
|
834
|
-
}
|
|
835
|
-
|
|
836
848
|
export declare namespace Extract {
|
|
837
849
|
export {
|
|
838
850
|
type ExtractConfiguration as ExtractConfiguration,
|
|
@@ -849,9 +861,9 @@ export declare namespace Extract {
|
|
|
849
861
|
type ExtractV2JobsPaginatedCursor as ExtractV2JobsPaginatedCursor,
|
|
850
862
|
type ExtractCreateParams as ExtractCreateParams,
|
|
851
863
|
type ExtractListParams as ExtractListParams,
|
|
852
|
-
type ExtractDeleteParams as ExtractDeleteParams,
|
|
853
|
-
type ExtractGenerateSchemaParams as ExtractGenerateSchemaParams,
|
|
854
864
|
type ExtractGetParams as ExtractGetParams,
|
|
865
|
+
type ExtractDeleteParams as ExtractDeleteParams,
|
|
855
866
|
type ExtractValidateSchemaParams as ExtractValidateSchemaParams,
|
|
867
|
+
type ExtractGenerateSchemaParams as ExtractGenerateSchemaParams,
|
|
856
868
|
};
|
|
857
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';
|