@llamaindex/llama-cloud 2.9.0 → 2.10.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 +14 -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 +36 -29
- package/resources/beta/batch/batch.d.mts.map +1 -1
- package/resources/beta/batch/batch.d.ts +36 -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 +14 -7
- package/resources/beta/batch/job-items.d.mts.map +1 -1
- package/resources/beta/batch/job-items.d.ts +14 -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 -39
- package/resources/beta/directories/directories.d.mts.map +1 -1
- package/resources/beta/directories/directories.d.ts +48 -39
- 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 +44 -32
- package/resources/beta/indexes.d.mts.map +1 -1
- package/resources/beta/indexes.d.ts +44 -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 +37 -56
- package/resources/beta/sheets.d.mts.map +1 -1
- package/resources/beta/sheets.d.ts +37 -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 +8 -1
- package/resources/classifier/jobs.d.mts.map +1 -1
- package/resources/classifier/jobs.d.ts +8 -1
- package/resources/classifier/jobs.d.ts.map +1 -1
- package/resources/classify.d.mts +27 -11
- package/resources/classify.d.mts.map +1 -1
- package/resources/classify.d.ts +27 -11
- package/resources/classify.d.ts.map +1 -1
- package/resources/configurations.d.mts +73 -43
- package/resources/configurations.d.mts.map +1 -1
- package/resources/configurations.d.ts +73 -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 +62 -46
- package/resources/extract.d.mts.map +1 -1
- package/resources/extract.d.ts +62 -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 +131 -51
- package/resources/parsing.d.mts.map +1 -1
- package/resources/parsing.d.ts +131 -51
- package/resources/parsing.d.ts.map +1 -1
- package/resources/parsing.js +33 -12
- package/resources/parsing.js.map +1 -1
- package/resources/parsing.mjs +33 -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 +149 -126
- package/resources/pipelines/pipelines.d.mts.map +1 -1
- package/resources/pipelines/pipelines.d.ts +149 -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 +206 -0
- package/resources/sheets.d.mts.map +1 -0
- package/resources/sheets.d.ts +206 -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 +67 -54
- package/src/resources/beta/batch/index.ts +1 -1
- package/src/resources/beta/batch/job-items.ts +34 -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 -71
- 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 +68 -53
- package/src/resources/beta/retrieval.ts +3 -3
- package/src/resources/beta/sheets.ts +90 -97
- package/src/resources/beta/split.ts +2 -2
- package/src/resources/classifier/jobs.ts +9 -1
- package/src/resources/classify.ts +67 -39
- package/src/resources/configurations.ts +97 -63
- package/src/resources/data-sinks.ts +26 -26
- package/src/resources/data-sources.ts +43 -43
- package/src/resources/extract.ts +125 -97
- package/src/resources/files.ts +61 -61
- package/src/resources/index.ts +21 -12
- package/src/resources/parsing.ts +285 -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 +236 -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 +322 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -9,39 +9,19 @@ import { path } from '../../internal/utils/path';
|
|
|
9
9
|
|
|
10
10
|
export class Indexes extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const index = await client.beta.indexes.create({
|
|
17
|
-
* source_directory_id: 'dir-abc123',
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
create(params: IndexCreateParams, options?: RequestOptions): APIPromise<IndexCreateResponse> {
|
|
22
|
-
const { organization_id, project_id, ...body } = params;
|
|
23
|
-
return this._client.post('/api/v1/indexes', { query: { organization_id, project_id }, body, ...options });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* List indexes for the current project.
|
|
12
|
+
* Get an index by ID.
|
|
28
13
|
*
|
|
29
14
|
* @example
|
|
30
15
|
* ```ts
|
|
31
|
-
*
|
|
32
|
-
* for await (const indexListResponse of client.beta.indexes.list()) {
|
|
33
|
-
* // ...
|
|
34
|
-
* }
|
|
16
|
+
* const index = await client.beta.indexes.get('index_id');
|
|
35
17
|
* ```
|
|
36
18
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
19
|
+
get(
|
|
20
|
+
indexID: string,
|
|
21
|
+
query: IndexGetParams | null | undefined = {},
|
|
39
22
|
options?: RequestOptions,
|
|
40
|
-
):
|
|
41
|
-
return this._client.
|
|
42
|
-
query,
|
|
43
|
-
...options,
|
|
44
|
-
});
|
|
23
|
+
): APIPromise<IndexGetResponse> {
|
|
24
|
+
return this._client.get(path`/api/v1/indexes/${indexID}`, { query, ...options });
|
|
45
25
|
}
|
|
46
26
|
|
|
47
27
|
/**
|
|
@@ -66,19 +46,18 @@ export class Indexes extends APIResource {
|
|
|
66
46
|
}
|
|
67
47
|
|
|
68
48
|
/**
|
|
69
|
-
*
|
|
49
|
+
* Create a searchable index over a source directory.
|
|
70
50
|
*
|
|
71
51
|
* @example
|
|
72
52
|
* ```ts
|
|
73
|
-
* const index = await client.beta.indexes.
|
|
53
|
+
* const index = await client.beta.indexes.create({
|
|
54
|
+
* source_directory_id: 'dir-abc123',
|
|
55
|
+
* });
|
|
74
56
|
* ```
|
|
75
57
|
*/
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
query:
|
|
79
|
-
options?: RequestOptions,
|
|
80
|
-
): APIPromise<IndexGetResponse> {
|
|
81
|
-
return this._client.get(path`/api/v1/indexes/${indexID}`, { query, ...options });
|
|
58
|
+
create(params: IndexCreateParams, options?: RequestOptions): APIPromise<IndexCreateResponse> {
|
|
59
|
+
const { organization_id, project_id, ...body } = params;
|
|
60
|
+
return this._client.post('/api/v1/indexes', { query: { organization_id, project_id }, body, ...options });
|
|
82
61
|
}
|
|
83
62
|
|
|
84
63
|
/**
|
|
@@ -101,6 +80,27 @@ export class Indexes extends APIResource {
|
|
|
101
80
|
...options,
|
|
102
81
|
});
|
|
103
82
|
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* List indexes for the current project.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* // Automatically fetches more pages as needed.
|
|
90
|
+
* for await (const indexListResponse of client.beta.indexes.list()) {
|
|
91
|
+
* // ...
|
|
92
|
+
* }
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
list(
|
|
96
|
+
query: IndexListParams | null | undefined = {},
|
|
97
|
+
options?: RequestOptions,
|
|
98
|
+
): PagePromise<IndexListResponsesPaginatedCursor, IndexListResponse> {
|
|
99
|
+
return this._client.getAPIList('/api/v1/indexes', PaginatedCursor<IndexListResponse>, {
|
|
100
|
+
query,
|
|
101
|
+
...options,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
export type IndexListResponsesPaginatedCursor = PaginatedCursor<IndexListResponse>;
|
|
@@ -124,6 +124,11 @@ export interface IndexCreateResponse {
|
|
|
124
124
|
*/
|
|
125
125
|
name: string;
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* ID of the output directory holding the indexed files.
|
|
129
|
+
*/
|
|
130
|
+
output_directory_id: string;
|
|
131
|
+
|
|
127
132
|
/**
|
|
128
133
|
* Project this index belongs to.
|
|
129
134
|
*/
|
|
@@ -189,6 +194,11 @@ export interface IndexListResponse {
|
|
|
189
194
|
*/
|
|
190
195
|
name: string;
|
|
191
196
|
|
|
197
|
+
/**
|
|
198
|
+
* ID of the output directory holding the indexed files.
|
|
199
|
+
*/
|
|
200
|
+
output_directory_id: string;
|
|
201
|
+
|
|
192
202
|
/**
|
|
193
203
|
* Project this index belongs to.
|
|
194
204
|
*/
|
|
@@ -254,6 +264,11 @@ export interface IndexGetResponse {
|
|
|
254
264
|
*/
|
|
255
265
|
name: string;
|
|
256
266
|
|
|
267
|
+
/**
|
|
268
|
+
* ID of the output directory holding the indexed files.
|
|
269
|
+
*/
|
|
270
|
+
output_directory_id: string;
|
|
271
|
+
|
|
257
272
|
/**
|
|
258
273
|
* Project this index belongs to.
|
|
259
274
|
*/
|
|
@@ -302,6 +317,18 @@ export interface IndexGetResponse {
|
|
|
302
317
|
|
|
303
318
|
export type IndexSyncResponse = unknown;
|
|
304
319
|
|
|
320
|
+
export interface IndexGetParams {
|
|
321
|
+
organization_id?: string | null;
|
|
322
|
+
|
|
323
|
+
project_id?: string | null;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export interface IndexDeleteParams {
|
|
327
|
+
organization_id?: string | null;
|
|
328
|
+
|
|
329
|
+
project_id?: string | null;
|
|
330
|
+
}
|
|
331
|
+
|
|
305
332
|
export interface IndexCreateParams {
|
|
306
333
|
/**
|
|
307
334
|
* Body param: ID of the source directory containing your documents.
|
|
@@ -379,30 +406,18 @@ export namespace IndexCreateParams {
|
|
|
379
406
|
}
|
|
380
407
|
}
|
|
381
408
|
|
|
382
|
-
export interface
|
|
383
|
-
organization_id?: string | null;
|
|
384
|
-
|
|
385
|
-
project_id?: string | null;
|
|
386
|
-
|
|
387
|
-
source_directory_id?: string | null;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
export interface IndexDeleteParams {
|
|
409
|
+
export interface IndexSyncParams {
|
|
391
410
|
organization_id?: string | null;
|
|
392
411
|
|
|
393
412
|
project_id?: string | null;
|
|
394
413
|
}
|
|
395
414
|
|
|
396
|
-
export interface
|
|
415
|
+
export interface IndexListParams extends PaginatedCursorParams {
|
|
397
416
|
organization_id?: string | null;
|
|
398
417
|
|
|
399
418
|
project_id?: string | null;
|
|
400
|
-
}
|
|
401
419
|
|
|
402
|
-
|
|
403
|
-
organization_id?: string | null;
|
|
404
|
-
|
|
405
|
-
project_id?: string | null;
|
|
420
|
+
source_directory_id?: string | null;
|
|
406
421
|
}
|
|
407
422
|
|
|
408
423
|
export declare namespace Indexes {
|
|
@@ -412,10 +427,10 @@ export declare namespace Indexes {
|
|
|
412
427
|
type IndexGetResponse as IndexGetResponse,
|
|
413
428
|
type IndexSyncResponse as IndexSyncResponse,
|
|
414
429
|
type IndexListResponsesPaginatedCursor as IndexListResponsesPaginatedCursor,
|
|
415
|
-
type IndexCreateParams as IndexCreateParams,
|
|
416
|
-
type IndexListParams as IndexListParams,
|
|
417
|
-
type IndexDeleteParams as IndexDeleteParams,
|
|
418
430
|
type IndexGetParams as IndexGetParams,
|
|
431
|
+
type IndexDeleteParams as IndexDeleteParams,
|
|
432
|
+
type IndexCreateParams as IndexCreateParams,
|
|
419
433
|
type IndexSyncParams as IndexSyncParams,
|
|
434
|
+
type IndexListParams as IndexListParams,
|
|
420
435
|
};
|
|
421
436
|
}
|
|
@@ -333,13 +333,13 @@ export interface RetrievalRetrieveParams {
|
|
|
333
333
|
|
|
334
334
|
export namespace RetrievalRetrieveParams {
|
|
335
335
|
export interface FilterTypeUnionStrIntBoolFloat {
|
|
336
|
-
operator: 'eq' | '
|
|
336
|
+
operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin';
|
|
337
337
|
|
|
338
338
|
value: string | boolean | number | Array<string | boolean | number>;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
export interface UnionMember1 {
|
|
342
|
-
operator: 'eq' | '
|
|
342
|
+
operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin';
|
|
343
343
|
|
|
344
344
|
value: number | Array<number>;
|
|
345
345
|
}
|
|
@@ -368,7 +368,7 @@ export namespace RetrievalRetrieveParams {
|
|
|
368
368
|
|
|
369
369
|
export namespace StaticFilters {
|
|
370
370
|
export interface ParsedDirectoryFileID {
|
|
371
|
-
operator: 'eq' | '
|
|
371
|
+
operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin';
|
|
372
372
|
|
|
373
373
|
value: string | Array<string>;
|
|
374
374
|
}
|
|
@@ -17,14 +17,7 @@ export class Sheets extends APIResource {
|
|
|
17
17
|
* default configuration is used. Optionally include `webhook_configurations` to
|
|
18
18
|
* receive `sheets.*` status notifications.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const sheetsJob = await client.beta.sheets.create({
|
|
25
|
-
* file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
20
|
+
* @deprecated
|
|
28
21
|
*/
|
|
29
22
|
create(params: SheetCreateParams, options?: RequestOptions): APIPromise<SheetsJob> {
|
|
30
23
|
const { organization_id, project_id, ...body } = params;
|
|
@@ -36,16 +29,9 @@ export class Sheets extends APIResource {
|
|
|
36
29
|
}
|
|
37
30
|
|
|
38
31
|
/**
|
|
39
|
-
* List spreadsheet parsing jobs.
|
|
40
|
-
* change.
|
|
32
|
+
* List spreadsheet parsing jobs.
|
|
41
33
|
*
|
|
42
|
-
* @
|
|
43
|
-
* ```ts
|
|
44
|
-
* // Automatically fetches more pages as needed.
|
|
45
|
-
* for await (const sheetsJob of client.beta.sheets.list()) {
|
|
46
|
-
* // ...
|
|
47
|
-
* }
|
|
48
|
-
* ```
|
|
34
|
+
* @deprecated
|
|
49
35
|
*/
|
|
50
36
|
list(
|
|
51
37
|
query: SheetListParams | null | undefined = {},
|
|
@@ -57,40 +43,12 @@ export class Sheets extends APIResource {
|
|
|
57
43
|
});
|
|
58
44
|
}
|
|
59
45
|
|
|
60
|
-
/**
|
|
61
|
-
* Delete a spreadsheet parsing job and its associated data. Experimental: not
|
|
62
|
-
* production-ready and subject to change.
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```ts
|
|
66
|
-
* const response = await client.beta.sheets.deleteJob(
|
|
67
|
-
* 'spreadsheet_job_id',
|
|
68
|
-
* );
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
deleteJob(
|
|
72
|
-
spreadsheetJobID: string,
|
|
73
|
-
params: SheetDeleteJobParams | null | undefined = {},
|
|
74
|
-
options?: RequestOptions,
|
|
75
|
-
): APIPromise<unknown> {
|
|
76
|
-
const { organization_id, project_id } = params ?? {};
|
|
77
|
-
return this._client.delete(path`/api/v1/beta/sheets/jobs/${spreadsheetJobID}`, {
|
|
78
|
-
query: { organization_id, project_id },
|
|
79
|
-
...options,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
46
|
/**
|
|
84
47
|
* Get a spreadsheet parsing job. When `include_results=True` (default), embeds
|
|
85
48
|
* extracted regions and results if complete, skipping the separate `/results`
|
|
86
|
-
* call.
|
|
49
|
+
* call.
|
|
87
50
|
*
|
|
88
|
-
* @
|
|
89
|
-
* ```ts
|
|
90
|
-
* const sheetsJob = await client.beta.sheets.get(
|
|
91
|
-
* 'spreadsheet_job_id',
|
|
92
|
-
* );
|
|
93
|
-
* ```
|
|
51
|
+
* @deprecated
|
|
94
52
|
*/
|
|
95
53
|
get(
|
|
96
54
|
spreadsheetJobID: string,
|
|
@@ -101,20 +59,12 @@ export class Sheets extends APIResource {
|
|
|
101
59
|
}
|
|
102
60
|
|
|
103
61
|
/**
|
|
104
|
-
* Generate a presigned URL to download a specific extracted region.
|
|
105
|
-
* not production-ready and subject to change.
|
|
62
|
+
* Generate a presigned URL to download a specific extracted region.
|
|
106
63
|
*
|
|
107
|
-
* @
|
|
108
|
-
* ```ts
|
|
109
|
-
* const presignedURL =
|
|
110
|
-
* await client.beta.sheets.getResultTable('table', {
|
|
111
|
-
* spreadsheet_job_id: 'spreadsheet_job_id',
|
|
112
|
-
* region_id: 'region_id',
|
|
113
|
-
* });
|
|
114
|
-
* ```
|
|
64
|
+
* @deprecated
|
|
115
65
|
*/
|
|
116
66
|
getResultTable(
|
|
117
|
-
regionType: '
|
|
67
|
+
regionType: 'cell_metadata' | 'extra' | 'table',
|
|
118
68
|
params: SheetGetResultTableParams,
|
|
119
69
|
options?: RequestOptions,
|
|
120
70
|
): APIPromise<FilesAPI.PresignedURL> {
|
|
@@ -125,6 +75,23 @@ export class Sheets extends APIResource {
|
|
|
125
75
|
);
|
|
126
76
|
}
|
|
127
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Delete a spreadsheet parsing job and its associated data.
|
|
80
|
+
*
|
|
81
|
+
* @deprecated
|
|
82
|
+
*/
|
|
83
|
+
deleteJob(
|
|
84
|
+
spreadsheetJobID: string,
|
|
85
|
+
params: SheetDeleteJobParams | null | undefined = {},
|
|
86
|
+
options?: RequestOptions,
|
|
87
|
+
): APIPromise<unknown> {
|
|
88
|
+
const { organization_id, project_id } = params ?? {};
|
|
89
|
+
return this._client.delete(path`/api/v1/beta/sheets/jobs/${spreadsheetJobID}`, {
|
|
90
|
+
query: { organization_id, project_id },
|
|
91
|
+
...options,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
128
95
|
/**
|
|
129
96
|
* Create a spreadsheet parsing job and wait for it to complete, returning the job with results.
|
|
130
97
|
*
|
|
@@ -281,7 +248,7 @@ export interface SheetsJob {
|
|
|
281
248
|
/**
|
|
282
249
|
* The status of the parsing job
|
|
283
250
|
*/
|
|
284
|
-
status: '
|
|
251
|
+
status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS';
|
|
285
252
|
|
|
286
253
|
/**
|
|
287
254
|
* When the job was last updated
|
|
@@ -361,28 +328,33 @@ export namespace SheetsJob {
|
|
|
361
328
|
* events are delivered.
|
|
362
329
|
*/
|
|
363
330
|
webhook_events?: Array<
|
|
364
|
-
| '
|
|
365
|
-
| '
|
|
331
|
+
| 'classify.cancelled'
|
|
332
|
+
| 'classify.error'
|
|
333
|
+
| 'classify.partial_success'
|
|
334
|
+
| 'classify.pending'
|
|
335
|
+
| 'classify.running'
|
|
336
|
+
| 'classify.success'
|
|
337
|
+
| 'extract.cancelled'
|
|
366
338
|
| 'extract.error'
|
|
367
339
|
| 'extract.partial_success'
|
|
368
|
-
| 'extract.
|
|
340
|
+
| 'extract.pending'
|
|
341
|
+
| 'extract.success'
|
|
342
|
+
| 'parse.cancelled'
|
|
343
|
+
| 'parse.error'
|
|
344
|
+
| 'parse.partial_success'
|
|
369
345
|
| 'parse.pending'
|
|
370
346
|
| 'parse.running'
|
|
371
347
|
| 'parse.success'
|
|
372
|
-
| '
|
|
373
|
-
| 'parse.partial_success'
|
|
374
|
-
| 'parse.cancelled'
|
|
375
|
-
| 'classify.pending'
|
|
376
|
-
| 'classify.running'
|
|
377
|
-
| 'classify.success'
|
|
378
|
-
| 'classify.error'
|
|
379
|
-
| 'classify.partial_success'
|
|
380
|
-
| 'classify.cancelled'
|
|
381
|
-
| 'sheets.pending'
|
|
382
|
-
| 'sheets.success'
|
|
348
|
+
| 'sheets.cancelled'
|
|
383
349
|
| 'sheets.error'
|
|
384
350
|
| 'sheets.partial_success'
|
|
385
|
-
| 'sheets.
|
|
351
|
+
| 'sheets.pending'
|
|
352
|
+
| 'sheets.success'
|
|
353
|
+
| 'split.cancelled'
|
|
354
|
+
| 'split.error'
|
|
355
|
+
| 'split.pending'
|
|
356
|
+
| 'split.processing'
|
|
357
|
+
| 'split.success'
|
|
386
358
|
| 'unmapped_event'
|
|
387
359
|
> | null;
|
|
388
360
|
|
|
@@ -396,6 +368,14 @@ export namespace SheetsJob {
|
|
|
396
368
|
*/
|
|
397
369
|
webhook_output_format?: string | null;
|
|
398
370
|
|
|
371
|
+
/**
|
|
372
|
+
* Shared signing secret used to sign webhook deliveries. When set, each request
|
|
373
|
+
* includes an HMAC-SHA256 signature of the request body in the 'LC-Signature'
|
|
374
|
+
* header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with
|
|
375
|
+
* this secret to verify the delivery is authentic.
|
|
376
|
+
*/
|
|
377
|
+
webhook_signing_secret?: string | null;
|
|
378
|
+
|
|
399
379
|
/**
|
|
400
380
|
* URL to receive webhook POST notifications
|
|
401
381
|
*/
|
|
@@ -561,28 +541,33 @@ export namespace SheetCreateParams {
|
|
|
561
541
|
* events are delivered.
|
|
562
542
|
*/
|
|
563
543
|
webhook_events?: Array<
|
|
564
|
-
| '
|
|
565
|
-
| '
|
|
544
|
+
| 'classify.cancelled'
|
|
545
|
+
| 'classify.error'
|
|
546
|
+
| 'classify.partial_success'
|
|
547
|
+
| 'classify.pending'
|
|
548
|
+
| 'classify.running'
|
|
549
|
+
| 'classify.success'
|
|
550
|
+
| 'extract.cancelled'
|
|
566
551
|
| 'extract.error'
|
|
567
552
|
| 'extract.partial_success'
|
|
568
|
-
| 'extract.
|
|
553
|
+
| 'extract.pending'
|
|
554
|
+
| 'extract.success'
|
|
555
|
+
| 'parse.cancelled'
|
|
556
|
+
| 'parse.error'
|
|
557
|
+
| 'parse.partial_success'
|
|
569
558
|
| 'parse.pending'
|
|
570
559
|
| 'parse.running'
|
|
571
560
|
| 'parse.success'
|
|
572
|
-
| '
|
|
573
|
-
| 'parse.partial_success'
|
|
574
|
-
| 'parse.cancelled'
|
|
575
|
-
| 'classify.pending'
|
|
576
|
-
| 'classify.running'
|
|
577
|
-
| 'classify.success'
|
|
578
|
-
| 'classify.error'
|
|
579
|
-
| 'classify.partial_success'
|
|
580
|
-
| 'classify.cancelled'
|
|
581
|
-
| 'sheets.pending'
|
|
582
|
-
| 'sheets.success'
|
|
561
|
+
| 'sheets.cancelled'
|
|
583
562
|
| 'sheets.error'
|
|
584
563
|
| 'sheets.partial_success'
|
|
585
|
-
| 'sheets.
|
|
564
|
+
| 'sheets.pending'
|
|
565
|
+
| 'sheets.success'
|
|
566
|
+
| 'split.cancelled'
|
|
567
|
+
| 'split.error'
|
|
568
|
+
| 'split.pending'
|
|
569
|
+
| 'split.processing'
|
|
570
|
+
| 'split.success'
|
|
586
571
|
| 'unmapped_event'
|
|
587
572
|
> | null;
|
|
588
573
|
|
|
@@ -596,6 +581,14 @@ export namespace SheetCreateParams {
|
|
|
596
581
|
*/
|
|
597
582
|
webhook_output_format?: string | null;
|
|
598
583
|
|
|
584
|
+
/**
|
|
585
|
+
* Shared signing secret used to sign webhook deliveries. When set, each request
|
|
586
|
+
* includes an HMAC-SHA256 signature of the request body in the 'LC-Signature'
|
|
587
|
+
* header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with
|
|
588
|
+
* this secret to verify the delivery is authentic.
|
|
589
|
+
*/
|
|
590
|
+
webhook_signing_secret?: string | null;
|
|
591
|
+
|
|
599
592
|
/**
|
|
600
593
|
* URL to receive webhook POST notifications
|
|
601
594
|
*/
|
|
@@ -633,13 +626,7 @@ export interface SheetListParams extends PaginatedCursorParams {
|
|
|
633
626
|
/**
|
|
634
627
|
* Filter by job status
|
|
635
628
|
*/
|
|
636
|
-
status?: '
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
export interface SheetDeleteJobParams {
|
|
640
|
-
organization_id?: string | null;
|
|
641
|
-
|
|
642
|
-
project_id?: string | null;
|
|
629
|
+
status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS' | null;
|
|
643
630
|
}
|
|
644
631
|
|
|
645
632
|
export interface SheetGetParams {
|
|
@@ -693,6 +680,12 @@ export interface SheetWaitForCompletionParams extends PollingOptions {
|
|
|
693
680
|
project_id?: string | null;
|
|
694
681
|
}
|
|
695
682
|
|
|
683
|
+
export interface SheetDeleteJobParams {
|
|
684
|
+
organization_id?: string | null;
|
|
685
|
+
|
|
686
|
+
project_id?: string | null;
|
|
687
|
+
}
|
|
688
|
+
|
|
696
689
|
export declare namespace Sheets {
|
|
697
690
|
export {
|
|
698
691
|
type SheetsJob as SheetsJob,
|
|
@@ -701,9 +694,9 @@ export declare namespace Sheets {
|
|
|
701
694
|
type SheetsJobsPaginatedCursor as SheetsJobsPaginatedCursor,
|
|
702
695
|
type SheetCreateParams as SheetCreateParams,
|
|
703
696
|
type SheetListParams as SheetListParams,
|
|
704
|
-
type SheetDeleteJobParams as SheetDeleteJobParams,
|
|
705
697
|
type SheetGetParams as SheetGetParams,
|
|
706
698
|
type SheetGetResultTableParams as SheetGetResultTableParams,
|
|
699
|
+
type SheetDeleteJobParams as SheetDeleteJobParams,
|
|
707
700
|
type SheetParseParams as SheetParseParams,
|
|
708
701
|
type SheetWaitForCompletionParams as SheetWaitForCompletionParams,
|
|
709
702
|
};
|
|
@@ -506,7 +506,7 @@ export namespace SplitCreateParams {
|
|
|
506
506
|
* be assigned to a defined category. 'omit': pages can be classified as
|
|
507
507
|
* 'uncategorized' but are excluded from results.
|
|
508
508
|
*/
|
|
509
|
-
allow_uncategorized?: '
|
|
509
|
+
allow_uncategorized?: 'forbid' | 'include' | 'omit';
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
}
|
|
@@ -534,7 +534,7 @@ export interface SplitListParams extends PaginatedCursorParams {
|
|
|
534
534
|
/**
|
|
535
535
|
* Filter by job status (pending, processing, completed, failed, cancelled)
|
|
536
536
|
*/
|
|
537
|
-
status?: '
|
|
537
|
+
status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | null;
|
|
538
538
|
}
|
|
539
539
|
|
|
540
540
|
export interface SplitGetParams {
|
|
@@ -389,7 +389,15 @@ export namespace JobCreateParams {
|
|
|
389
389
|
* Format of the webhook payload body. 'string' (default) sends the payload as a
|
|
390
390
|
* JSON-encoded string; 'json' sends it as a JSON object.
|
|
391
391
|
*/
|
|
392
|
-
webhook_output_format?: '
|
|
392
|
+
webhook_output_format?: 'json' | 'string' | null;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Shared signing secret used to sign webhook deliveries. When set, each request
|
|
396
|
+
* includes an HMAC-SHA256 signature of the request body in the 'LC-Signature'
|
|
397
|
+
* header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with
|
|
398
|
+
* this secret to verify the delivery is authentic.
|
|
399
|
+
*/
|
|
400
|
+
webhook_signing_secret?: string | null;
|
|
393
401
|
|
|
394
402
|
/**
|
|
395
403
|
* HTTPS URL to receive webhook POST requests. Must be publicly accessible
|