@llamaindex/llama-cloud 2.2.0 → 2.4.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 +38 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/agent-data.d.mts +57 -0
- package/resources/beta/agent-data.d.mts.map +1 -1
- package/resources/beta/agent-data.d.ts +57 -0
- package/resources/beta/agent-data.d.ts.map +1 -1
- package/resources/beta/agent-data.js +57 -0
- package/resources/beta/agent-data.js.map +1 -1
- package/resources/beta/agent-data.mjs +57 -0
- package/resources/beta/agent-data.mjs.map +1 -1
- package/resources/beta/batch/batch.d.mts +27 -0
- package/resources/beta/batch/batch.d.mts.map +1 -1
- package/resources/beta/batch/batch.d.ts +27 -0
- package/resources/beta/batch/batch.d.ts.map +1 -1
- package/resources/beta/batch/batch.js +27 -0
- package/resources/beta/batch/batch.js.map +1 -1
- package/resources/beta/batch/batch.mjs +27 -0
- package/resources/beta/batch/batch.mjs.map +1 -1
- package/resources/beta/batch/job-items.d.mts +18 -0
- package/resources/beta/batch/job-items.d.mts.map +1 -1
- package/resources/beta/batch/job-items.d.ts +18 -0
- package/resources/beta/batch/job-items.d.ts.map +1 -1
- package/resources/beta/batch/job-items.js +18 -0
- package/resources/beta/batch/job-items.js.map +1 -1
- package/resources/beta/batch/job-items.mjs +18 -0
- package/resources/beta/batch/job-items.mjs.map +1 -1
- package/resources/beta/beta.d.mts +0 -4
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +0 -4
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +0 -4
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +0 -4
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/directories/directories.d.mts +34 -0
- package/resources/beta/directories/directories.d.mts.map +1 -1
- package/resources/beta/directories/directories.d.ts +34 -0
- package/resources/beta/directories/directories.d.ts.map +1 -1
- package/resources/beta/directories/directories.js +34 -0
- package/resources/beta/directories/directories.js.map +1 -1
- package/resources/beta/directories/directories.mjs +34 -0
- package/resources/beta/directories/directories.mjs.map +1 -1
- package/resources/beta/directories/files.d.mts +93 -0
- package/resources/beta/directories/files.d.mts.map +1 -1
- package/resources/beta/directories/files.d.ts +93 -0
- package/resources/beta/directories/files.d.ts.map +1 -1
- package/resources/beta/directories/files.js +50 -0
- package/resources/beta/directories/files.js.map +1 -1
- package/resources/beta/directories/files.mjs +50 -0
- package/resources/beta/directories/files.mjs.map +1 -1
- package/resources/beta/index.d.mts +0 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +0 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +1 -3
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +0 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/sheets.d.mts +38 -0
- package/resources/beta/sheets.d.mts.map +1 -1
- package/resources/beta/sheets.d.ts +38 -0
- package/resources/beta/sheets.d.ts.map +1 -1
- package/resources/beta/sheets.js +38 -0
- package/resources/beta/sheets.js.map +1 -1
- package/resources/beta/sheets.mjs +38 -0
- package/resources/beta/sheets.mjs.map +1 -1
- package/resources/beta/split.d.mts +25 -10
- package/resources/beta/split.d.mts.map +1 -1
- package/resources/beta/split.d.ts +25 -10
- package/resources/beta/split.d.ts.map +1 -1
- package/resources/beta/split.js +21 -6
- package/resources/beta/split.js.map +1 -1
- package/resources/beta/split.mjs +21 -6
- package/resources/beta/split.mjs.map +1 -1
- package/resources/classify.d.mts +70 -0
- package/resources/classify.d.mts.map +1 -1
- package/resources/classify.d.ts +70 -0
- package/resources/classify.d.ts.map +1 -1
- package/resources/classify.js +113 -0
- package/resources/classify.js.map +1 -1
- package/resources/classify.mjs +113 -0
- package/resources/classify.mjs.map +1 -1
- package/resources/configurations.d.mts +214 -13
- package/resources/configurations.d.mts.map +1 -1
- package/resources/configurations.d.ts +214 -13
- package/resources/configurations.d.ts.map +1 -1
- package/resources/extract.d.mts +16 -6
- package/resources/extract.d.mts.map +1 -1
- package/resources/extract.d.ts +16 -6
- package/resources/extract.d.ts.map +1 -1
- package/resources/extract.js +14 -1
- package/resources/extract.js.map +1 -1
- package/resources/extract.mjs +14 -1
- package/resources/extract.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/parsing.d.mts +5 -4
- package/resources/parsing.d.mts.map +1 -1
- package/resources/parsing.d.ts +5 -4
- package/resources/parsing.d.ts.map +1 -1
- package/resources/pipelines/documents.d.mts +0 -3
- package/resources/pipelines/documents.d.mts.map +1 -1
- package/resources/pipelines/documents.d.ts +0 -3
- package/resources/pipelines/documents.d.ts.map +1 -1
- package/resources/pipelines/pipelines.d.mts +0 -7
- package/resources/pipelines/pipelines.d.mts.map +1 -1
- package/resources/pipelines/pipelines.d.ts +0 -7
- package/resources/pipelines/pipelines.d.ts.map +1 -1
- package/resources/pipelines/pipelines.js.map +1 -1
- package/resources/pipelines/pipelines.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/index.js.map +1 -1
- package/resources/retrievers/index.mjs.map +1 -1
- package/resources/retrievers/retrievers.d.mts +17 -5
- package/resources/retrievers/retrievers.d.mts.map +1 -1
- package/resources/retrievers/retrievers.d.ts +17 -5
- package/resources/retrievers/retrievers.d.ts.map +1 -1
- package/resources/retrievers/retrievers.js +10 -3
- package/resources/retrievers/retrievers.js.map +1 -1
- package/resources/retrievers/retrievers.mjs +10 -3
- package/resources/retrievers/retrievers.mjs.map +1 -1
- package/src/client.ts +2 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/beta/agent-data.ts +57 -0
- package/src/resources/beta/batch/batch.ts +27 -0
- package/src/resources/beta/batch/job-items.ts +18 -0
- package/src/resources/beta/beta.ts +0 -29
- package/src/resources/beta/directories/directories.ts +34 -0
- package/src/resources/beta/directories/files.ts +86 -0
- package/src/resources/beta/index.ts +0 -12
- package/src/resources/beta/sheets.ts +38 -0
- package/src/resources/beta/split.ts +25 -10
- package/src/resources/classify.ts +130 -0
- package/src/resources/configurations.ts +256 -8
- package/src/resources/extract.ts +16 -7
- package/src/resources/index.ts +1 -0
- package/src/resources/parsing.ts +9 -2
- package/src/resources/pipelines/documents.ts +0 -3
- package/src/resources/pipelines/pipelines.ts +0 -7
- package/src/resources/retrievers/index.ts +1 -0
- package/src/resources/retrievers/retrievers.ts +37 -5
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/beta/parse-configurations.d.mts +0 -210
- package/resources/beta/parse-configurations.d.mts.map +0 -1
- package/resources/beta/parse-configurations.d.ts +0 -210
- package/resources/beta/parse-configurations.d.ts.map +0 -1
- package/resources/beta/parse-configurations.js +0 -84
- package/resources/beta/parse-configurations.js.map +0 -1
- package/resources/beta/parse-configurations.mjs +0 -80
- package/resources/beta/parse-configurations.mjs.map +0 -1
- package/src/resources/beta/parse-configurations.ts +0 -311
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retrievers.mjs","sourceRoot":"","sources":["../../src/resources/retrievers/retrievers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,YAAY;OAEjB,EAAE,YAAY,EAAE;OAEhB,E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AAE;YACtC,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -201,6 +201,7 @@ import {
|
|
|
201
201
|
Retriever,
|
|
202
202
|
RetrieverCreate,
|
|
203
203
|
RetrieverCreateParams,
|
|
204
|
+
RetrieverDeleteParams,
|
|
204
205
|
RetrieverGetParams,
|
|
205
206
|
RetrieverListParams,
|
|
206
207
|
RetrieverListResponse,
|
|
@@ -1190,6 +1191,7 @@ export declare namespace LlamaCloud {
|
|
|
1190
1191
|
type RetrieverCreateParams as RetrieverCreateParams,
|
|
1191
1192
|
type RetrieverUpdateParams as RetrieverUpdateParams,
|
|
1192
1193
|
type RetrieverListParams as RetrieverListParams,
|
|
1194
|
+
type RetrieverDeleteParams as RetrieverDeleteParams,
|
|
1193
1195
|
type RetrieverGetParams as RetrieverGetParams,
|
|
1194
1196
|
type RetrieverSearchParams as RetrieverSearchParams,
|
|
1195
1197
|
type RetrieverUpsertParams as RetrieverUpsertParams,
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export const readEnv = (env: string): string | undefined => {
|
|
11
11
|
if (typeof (globalThis as any).process !== 'undefined') {
|
|
12
|
-
return (globalThis as any).process.env?.[env]?.trim()
|
|
12
|
+
return (globalThis as any).process.env?.[env]?.trim() || undefined;
|
|
13
13
|
}
|
|
14
14
|
if (typeof (globalThis as any).Deno !== 'undefined') {
|
|
15
|
-
return (globalThis as any).Deno.env?.get?.(env)?.trim();
|
|
15
|
+
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
|
|
16
16
|
}
|
|
17
17
|
return undefined;
|
|
18
18
|
};
|
|
@@ -9,6 +9,14 @@ import { path } from '../../internal/utils/path';
|
|
|
9
9
|
export class AgentData extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Update agent data by ID (overwrites).
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const agentData = await client.beta.agentData.update(
|
|
16
|
+
* 'item_id',
|
|
17
|
+
* { data: { foo: 'bar' } },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
12
20
|
*/
|
|
13
21
|
update(itemID: string, params: AgentDataUpdateParams, options?: RequestOptions): APIPromise<AgentData> {
|
|
14
22
|
const { organization_id, project_id, ...body } = params;
|
|
@@ -21,6 +29,13 @@ export class AgentData extends APIResource {
|
|
|
21
29
|
|
|
22
30
|
/**
|
|
23
31
|
* Delete agent data by ID.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const agentData = await client.beta.agentData.delete(
|
|
36
|
+
* 'item_id',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
24
39
|
*/
|
|
25
40
|
delete(
|
|
26
41
|
itemID: string,
|
|
@@ -36,6 +51,14 @@ export class AgentData extends APIResource {
|
|
|
36
51
|
|
|
37
52
|
/**
|
|
38
53
|
* Create new agent data.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* const agentData = await client.beta.agentData.agentData({
|
|
58
|
+
* data: { foo: 'bar' },
|
|
59
|
+
* deployment_name: 'deployment_name',
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
39
62
|
*/
|
|
40
63
|
agentData(params: AgentDataAgentDataParams, options?: RequestOptions): APIPromise<AgentData> {
|
|
41
64
|
const { organization_id, project_id, ...body } = params;
|
|
@@ -48,6 +71,16 @@ export class AgentData extends APIResource {
|
|
|
48
71
|
|
|
49
72
|
/**
|
|
50
73
|
* Aggregate agent data with grouping and optional counting/first item retrieval.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* // Automatically fetches more pages as needed.
|
|
78
|
+
* for await (const agentDataAggregateResponse of client.beta.agentData.aggregate(
|
|
79
|
+
* { deployment_name: 'deployment_name' },
|
|
80
|
+
* )) {
|
|
81
|
+
* // ...
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
51
84
|
*/
|
|
52
85
|
aggregate(
|
|
53
86
|
params: AgentDataAggregateParams,
|
|
@@ -63,6 +96,13 @@ export class AgentData extends APIResource {
|
|
|
63
96
|
|
|
64
97
|
/**
|
|
65
98
|
* Bulk delete agent data by query (deployment_name, collection, optional filters).
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```ts
|
|
102
|
+
* const response = await client.beta.agentData.deleteByQuery({
|
|
103
|
+
* deployment_name: 'deployment_name',
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
66
106
|
*/
|
|
67
107
|
deleteByQuery(
|
|
68
108
|
params: AgentDataDeleteByQueryParams,
|
|
@@ -78,6 +118,13 @@ export class AgentData extends APIResource {
|
|
|
78
118
|
|
|
79
119
|
/**
|
|
80
120
|
* Get agent data by ID.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```ts
|
|
124
|
+
* const agentData = await client.beta.agentData.get(
|
|
125
|
+
* 'item_id',
|
|
126
|
+
* );
|
|
127
|
+
* ```
|
|
81
128
|
*/
|
|
82
129
|
get(
|
|
83
130
|
itemID: string,
|
|
@@ -89,6 +136,16 @@ export class AgentData extends APIResource {
|
|
|
89
136
|
|
|
90
137
|
/**
|
|
91
138
|
* Search agent data with filtering, sorting, and pagination.
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```ts
|
|
142
|
+
* // Automatically fetches more pages as needed.
|
|
143
|
+
* for await (const agentData of client.beta.agentData.search({
|
|
144
|
+
* deployment_name: 'deployment_name',
|
|
145
|
+
* })) {
|
|
146
|
+
* // ...
|
|
147
|
+
* }
|
|
148
|
+
* ```
|
|
92
149
|
*/
|
|
93
150
|
search(
|
|
94
151
|
params: AgentDataSearchParams,
|
|
@@ -30,6 +30,13 @@ export class Batch extends APIResource {
|
|
|
30
30
|
* Provide either `directory_id` to process all files in a directory, or `item_ids`
|
|
31
31
|
* for specific items. The job runs asynchronously — poll `GET /batch/{job_id}` for
|
|
32
32
|
* progress.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const batch = await client.beta.batch.create({
|
|
37
|
+
* job_config: {},
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
33
40
|
*/
|
|
34
41
|
create(params: BatchCreateParams, options?: RequestOptions): APIPromise<BatchCreateResponse> {
|
|
35
42
|
const { organization_id, project_id, 'temporal-namespace': temporalNamespace, ...body } = params;
|
|
@@ -49,6 +56,14 @@ export class Batch extends APIResource {
|
|
|
49
56
|
*
|
|
50
57
|
* Filter by `directory_id`, `job_type`, or `status`. Results are paginated with
|
|
51
58
|
* configurable `limit` and `offset`.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* // Automatically fetches more pages as needed.
|
|
63
|
+
* for await (const batchListResponse of client.beta.batch.list()) {
|
|
64
|
+
* // ...
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
52
67
|
*/
|
|
53
68
|
list(
|
|
54
69
|
query: BatchListParams | null | undefined = {},
|
|
@@ -65,6 +80,11 @@ export class Batch extends APIResource {
|
|
|
65
80
|
*
|
|
66
81
|
* Stops processing and marks pending items as cancelled. Items currently being
|
|
67
82
|
* processed may still complete.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* const response = await client.beta.batch.cancel('job_id');
|
|
87
|
+
* ```
|
|
68
88
|
*/
|
|
69
89
|
cancel(
|
|
70
90
|
jobID: string,
|
|
@@ -88,6 +108,13 @@ export class Batch extends APIResource {
|
|
|
88
108
|
*
|
|
89
109
|
* Returns current progress percentage, file counts (total, processed, failed,
|
|
90
110
|
* skipped), and timestamps.
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* const response = await client.beta.batch.getStatus(
|
|
115
|
+
* 'job_id',
|
|
116
|
+
* );
|
|
117
|
+
* ```
|
|
91
118
|
*/
|
|
92
119
|
getStatus(
|
|
93
120
|
jobID: string,
|
|
@@ -14,6 +14,16 @@ export class JobItems extends APIResource {
|
|
|
14
14
|
*
|
|
15
15
|
* Useful for finding failed items, viewing completed items, or debugging
|
|
16
16
|
* processing issues.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* // Automatically fetches more pages as needed.
|
|
21
|
+
* for await (const jobItemListResponse of client.beta.batch.jobItems.list(
|
|
22
|
+
* 'job_id',
|
|
23
|
+
* )) {
|
|
24
|
+
* // ...
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
17
27
|
*/
|
|
18
28
|
list(
|
|
19
29
|
jobID: string,
|
|
@@ -33,6 +43,14 @@ export class JobItems extends APIResource {
|
|
|
33
43
|
* Returns the complete processing history for an item including what operations
|
|
34
44
|
* were performed, parameters used, and where outputs are stored. Optionally filter
|
|
35
45
|
* by `job_type`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const response =
|
|
50
|
+
* await client.beta.batch.jobItems.getProcessingResults(
|
|
51
|
+
* 'item_id',
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
36
54
|
*/
|
|
37
55
|
getProcessingResults(
|
|
38
56
|
itemID: string,
|
|
@@ -17,19 +17,6 @@ import {
|
|
|
17
17
|
AgentDataSearchParams,
|
|
18
18
|
AgentDataUpdateParams,
|
|
19
19
|
} from './agent-data';
|
|
20
|
-
import * as ParseConfigurationsAPI from './parse-configurations';
|
|
21
|
-
import {
|
|
22
|
-
ParseConfiguration,
|
|
23
|
-
ParseConfigurationCreate,
|
|
24
|
-
ParseConfigurationCreateParams,
|
|
25
|
-
ParseConfigurationDeleteParams,
|
|
26
|
-
ParseConfigurationGetParams,
|
|
27
|
-
ParseConfigurationListParams,
|
|
28
|
-
ParseConfigurationQueryResponse,
|
|
29
|
-
ParseConfigurationUpdateParams,
|
|
30
|
-
ParseConfigurations,
|
|
31
|
-
ParseConfigurationsPaginatedCursor,
|
|
32
|
-
} from './parse-configurations';
|
|
33
20
|
import * as SheetsAPI from './sheets';
|
|
34
21
|
import {
|
|
35
22
|
SheetCreateParams,
|
|
@@ -88,15 +75,12 @@ import {
|
|
|
88
75
|
|
|
89
76
|
export class Beta extends APIResource {
|
|
90
77
|
agentData: AgentDataAPI.AgentData = new AgentDataAPI.AgentData(this._client);
|
|
91
|
-
parseConfigurations: ParseConfigurationsAPI.ParseConfigurations =
|
|
92
|
-
new ParseConfigurationsAPI.ParseConfigurations(this._client);
|
|
93
78
|
sheets: SheetsAPI.Sheets = new SheetsAPI.Sheets(this._client);
|
|
94
79
|
directories: DirectoriesAPI.Directories = new DirectoriesAPI.Directories(this._client);
|
|
95
80
|
batch: BatchAPI.Batch = new BatchAPI.Batch(this._client);
|
|
96
81
|
split: SplitAPI.Split = new SplitAPI.Split(this._client);
|
|
97
82
|
}
|
|
98
83
|
|
|
99
|
-
Beta.ParseConfigurations = ParseConfigurations;
|
|
100
84
|
Beta.Sheets = Sheets;
|
|
101
85
|
Beta.Directories = Directories;
|
|
102
86
|
Beta.Batch = Batch;
|
|
@@ -119,19 +103,6 @@ export declare namespace Beta {
|
|
|
119
103
|
type AgentDataSearchParams as AgentDataSearchParams,
|
|
120
104
|
};
|
|
121
105
|
|
|
122
|
-
export {
|
|
123
|
-
ParseConfigurations as ParseConfigurations,
|
|
124
|
-
type ParseConfiguration as ParseConfiguration,
|
|
125
|
-
type ParseConfigurationCreate as ParseConfigurationCreate,
|
|
126
|
-
type ParseConfigurationQueryResponse as ParseConfigurationQueryResponse,
|
|
127
|
-
type ParseConfigurationsPaginatedCursor as ParseConfigurationsPaginatedCursor,
|
|
128
|
-
type ParseConfigurationCreateParams as ParseConfigurationCreateParams,
|
|
129
|
-
type ParseConfigurationUpdateParams as ParseConfigurationUpdateParams,
|
|
130
|
-
type ParseConfigurationListParams as ParseConfigurationListParams,
|
|
131
|
-
type ParseConfigurationDeleteParams as ParseConfigurationDeleteParams,
|
|
132
|
-
type ParseConfigurationGetParams as ParseConfigurationGetParams,
|
|
133
|
-
};
|
|
134
|
-
|
|
135
106
|
export {
|
|
136
107
|
Sheets as Sheets,
|
|
137
108
|
type SheetsJob as SheetsJob,
|
|
@@ -31,6 +31,13 @@ export class Directories extends APIResource {
|
|
|
31
31
|
*
|
|
32
32
|
* If data_source_id is provided, validates that the data source exists and belongs
|
|
33
33
|
* to the same project.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const directory = await client.beta.directories.create({
|
|
38
|
+
* name: 'x',
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
34
41
|
*/
|
|
35
42
|
create(params: DirectoryCreateParams, options?: RequestOptions): APIPromise<DirectoryCreateResponse> {
|
|
36
43
|
const { organization_id, project_id, ...body } = params;
|
|
@@ -43,6 +50,13 @@ export class Directories extends APIResource {
|
|
|
43
50
|
|
|
44
51
|
/**
|
|
45
52
|
* Update directory metadata.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const directory = await client.beta.directories.update(
|
|
57
|
+
* 'directory_id',
|
|
58
|
+
* );
|
|
59
|
+
* ```
|
|
46
60
|
*/
|
|
47
61
|
update(
|
|
48
62
|
directoryID: string,
|
|
@@ -59,6 +73,14 @@ export class Directories extends APIResource {
|
|
|
59
73
|
|
|
60
74
|
/**
|
|
61
75
|
* List Directories
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* // Automatically fetches more pages as needed.
|
|
80
|
+
* for await (const directoryListResponse of client.beta.directories.list()) {
|
|
81
|
+
* // ...
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
62
84
|
*/
|
|
63
85
|
list(
|
|
64
86
|
query: DirectoryListParams | null | undefined = {},
|
|
@@ -72,6 +94,11 @@ export class Directories extends APIResource {
|
|
|
72
94
|
|
|
73
95
|
/**
|
|
74
96
|
* Permanently delete a directory.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* await client.beta.directories.delete('directory_id');
|
|
101
|
+
* ```
|
|
75
102
|
*/
|
|
76
103
|
delete(
|
|
77
104
|
directoryID: string,
|
|
@@ -88,6 +115,13 @@ export class Directories extends APIResource {
|
|
|
88
115
|
|
|
89
116
|
/**
|
|
90
117
|
* Retrieve a directory by its identifier.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* const directory = await client.beta.directories.get(
|
|
122
|
+
* 'directory_id',
|
|
123
|
+
* );
|
|
124
|
+
* ```
|
|
91
125
|
*/
|
|
92
126
|
get(
|
|
93
127
|
directoryID: string,
|
|
@@ -18,6 +18,14 @@ export class Files extends APIResource {
|
|
|
18
18
|
* Note: This endpoint uses directory_file_id (the internal ID). If you're trying
|
|
19
19
|
* to update a file by its unique_id, use the list endpoint with a filter to find
|
|
20
20
|
* the directory_file_id first.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const file = await client.beta.directories.files.update(
|
|
25
|
+
* 'directory_file_id',
|
|
26
|
+
* { path_directory_id: 'directory_id' },
|
|
27
|
+
* );
|
|
28
|
+
* ```
|
|
21
29
|
*/
|
|
22
30
|
update(
|
|
23
31
|
directoryFileID: string,
|
|
@@ -35,6 +43,16 @@ export class Files extends APIResource {
|
|
|
35
43
|
/**
|
|
36
44
|
* List all files within the specified directory with optional filtering and
|
|
37
45
|
* pagination.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* // Automatically fetches more pages as needed.
|
|
50
|
+
* for await (const fileListResponse of client.beta.directories.files.list(
|
|
51
|
+
* 'directory_id',
|
|
52
|
+
* )) {
|
|
53
|
+
* // ...
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
38
56
|
*/
|
|
39
57
|
list(
|
|
40
58
|
directoryID: string,
|
|
@@ -54,6 +72,14 @@ export class Files extends APIResource {
|
|
|
54
72
|
* Note: This endpoint uses directory_file_id (the internal ID). If you're trying
|
|
55
73
|
* to delete a file by its unique_id, use the list endpoint with a filter to find
|
|
56
74
|
* the directory_file_id first.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```ts
|
|
78
|
+
* await client.beta.directories.files.delete(
|
|
79
|
+
* 'directory_file_id',
|
|
80
|
+
* { directory_id: 'directory_id' },
|
|
81
|
+
* );
|
|
82
|
+
* ```
|
|
57
83
|
*/
|
|
58
84
|
delete(directoryFileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
59
85
|
const { directory_id, organization_id, project_id } = params;
|
|
@@ -69,6 +95,14 @@ export class Files extends APIResource {
|
|
|
69
95
|
*
|
|
70
96
|
* The directory must exist and belong to the project passed in. The file_id must
|
|
71
97
|
* be provided and exist in the project.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```ts
|
|
101
|
+
* const response = await client.beta.directories.files.add(
|
|
102
|
+
* 'directory_id',
|
|
103
|
+
* { file_id: 'file_id' },
|
|
104
|
+
* );
|
|
105
|
+
* ```
|
|
72
106
|
*/
|
|
73
107
|
add(directoryID: string, params: FileAddParams, options?: RequestOptions): APIPromise<FileAddResponse> {
|
|
74
108
|
const { organization_id, project_id, ...body } = params;
|
|
@@ -83,6 +117,14 @@ export class Files extends APIResource {
|
|
|
83
117
|
* Get a file by its directory_file_id within the specified directory. If you're
|
|
84
118
|
* trying to get a file by its unique_id, use the list endpoint with a filter
|
|
85
119
|
* instead.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* const file = await client.beta.directories.files.get(
|
|
124
|
+
* 'directory_file_id',
|
|
125
|
+
* { directory_id: 'directory_id' },
|
|
126
|
+
* );
|
|
127
|
+
* ```
|
|
86
128
|
*/
|
|
87
129
|
get(directoryFileID: string, params: FileGetParams, options?: RequestOptions): APIPromise<FileGetResponse> {
|
|
88
130
|
const { directory_id, ...query } = params;
|
|
@@ -98,6 +140,14 @@ export class Files extends APIResource {
|
|
|
98
140
|
* Uploads a file and creates a directory file entry in a single operation. If
|
|
99
141
|
* unique_id or display_name are not provided, they will be derived from the file
|
|
100
142
|
* metadata.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```ts
|
|
146
|
+
* const response = await client.beta.directories.files.upload(
|
|
147
|
+
* 'directory_id',
|
|
148
|
+
* { upload_file: fs.createReadStream('path/to/file') },
|
|
149
|
+
* );
|
|
150
|
+
* ```
|
|
101
151
|
*/
|
|
102
152
|
upload(
|
|
103
153
|
directoryID: string,
|
|
@@ -163,6 +213,11 @@ export interface FileUpdateResponse {
|
|
|
163
213
|
*/
|
|
164
214
|
file_id?: string | null;
|
|
165
215
|
|
|
216
|
+
/**
|
|
217
|
+
* Merged metadata from all sources. Higher-priority sources override lower.
|
|
218
|
+
*/
|
|
219
|
+
metadata?: { [key: string]: string | number | boolean | null };
|
|
220
|
+
|
|
166
221
|
/**
|
|
167
222
|
* Update datetime
|
|
168
223
|
*/
|
|
@@ -218,6 +273,11 @@ export interface FileListResponse {
|
|
|
218
273
|
*/
|
|
219
274
|
file_id?: string | null;
|
|
220
275
|
|
|
276
|
+
/**
|
|
277
|
+
* Merged metadata from all sources. Higher-priority sources override lower.
|
|
278
|
+
*/
|
|
279
|
+
metadata?: { [key: string]: string | number | boolean | null };
|
|
280
|
+
|
|
221
281
|
/**
|
|
222
282
|
* Update datetime
|
|
223
283
|
*/
|
|
@@ -273,6 +333,11 @@ export interface FileAddResponse {
|
|
|
273
333
|
*/
|
|
274
334
|
file_id?: string | null;
|
|
275
335
|
|
|
336
|
+
/**
|
|
337
|
+
* Merged metadata from all sources. Higher-priority sources override lower.
|
|
338
|
+
*/
|
|
339
|
+
metadata?: { [key: string]: string | number | boolean | null };
|
|
340
|
+
|
|
276
341
|
/**
|
|
277
342
|
* Update datetime
|
|
278
343
|
*/
|
|
@@ -328,6 +393,11 @@ export interface FileGetResponse {
|
|
|
328
393
|
*/
|
|
329
394
|
file_id?: string | null;
|
|
330
395
|
|
|
396
|
+
/**
|
|
397
|
+
* Merged metadata from all sources. Higher-priority sources override lower.
|
|
398
|
+
*/
|
|
399
|
+
metadata?: { [key: string]: string | number | boolean | null };
|
|
400
|
+
|
|
331
401
|
/**
|
|
332
402
|
* Update datetime
|
|
333
403
|
*/
|
|
@@ -383,6 +453,11 @@ export interface FileUploadResponse {
|
|
|
383
453
|
*/
|
|
384
454
|
file_id?: string | null;
|
|
385
455
|
|
|
456
|
+
/**
|
|
457
|
+
* Merged metadata from all sources. Higher-priority sources override lower.
|
|
458
|
+
*/
|
|
459
|
+
metadata?: { [key: string]: string | number | boolean | null };
|
|
460
|
+
|
|
386
461
|
/**
|
|
387
462
|
* Update datetime
|
|
388
463
|
*/
|
|
@@ -415,6 +490,12 @@ export interface FileUpdateParams {
|
|
|
415
490
|
*/
|
|
416
491
|
display_name?: string | null;
|
|
417
492
|
|
|
493
|
+
/**
|
|
494
|
+
* Body param: User-defined metadata key-value pairs. Replaces the user metadata
|
|
495
|
+
* layer.
|
|
496
|
+
*/
|
|
497
|
+
metadata?: { [key: string]: string | number | boolean | null } | null;
|
|
498
|
+
|
|
418
499
|
/**
|
|
419
500
|
* Body param: Updated unique identifier.
|
|
420
501
|
*/
|
|
@@ -476,6 +557,11 @@ export interface FileAddParams {
|
|
|
476
557
|
*/
|
|
477
558
|
display_name?: string | null;
|
|
478
559
|
|
|
560
|
+
/**
|
|
561
|
+
* Body param: User-defined metadata key-value pairs to associate with the file.
|
|
562
|
+
*/
|
|
563
|
+
metadata?: { [key: string]: string | number | boolean | null } | null;
|
|
564
|
+
|
|
479
565
|
/**
|
|
480
566
|
* Body param: Unique identifier for the file in the directory. If not provided,
|
|
481
567
|
* will use the file's external_file_id or name.
|
|
@@ -41,18 +41,6 @@ export {
|
|
|
41
41
|
type DirectoryGetParams,
|
|
42
42
|
type DirectoryListResponsesPaginatedCursor,
|
|
43
43
|
} from './directories/index';
|
|
44
|
-
export {
|
|
45
|
-
ParseConfigurations,
|
|
46
|
-
type ParseConfiguration,
|
|
47
|
-
type ParseConfigurationCreate,
|
|
48
|
-
type ParseConfigurationQueryResponse,
|
|
49
|
-
type ParseConfigurationCreateParams,
|
|
50
|
-
type ParseConfigurationUpdateParams,
|
|
51
|
-
type ParseConfigurationListParams,
|
|
52
|
-
type ParseConfigurationDeleteParams,
|
|
53
|
-
type ParseConfigurationGetParams,
|
|
54
|
-
type ParseConfigurationsPaginatedCursor,
|
|
55
|
-
} from './parse-configurations';
|
|
56
44
|
export {
|
|
57
45
|
Sheets,
|
|
58
46
|
type SheetsJob,
|
|
@@ -13,6 +13,13 @@ export class Sheets extends APIResource {
|
|
|
13
13
|
/**
|
|
14
14
|
* Create a spreadsheet parsing job. Experimental: This endpoint is not yet ready
|
|
15
15
|
* for production use and is subject to change at any time.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const sheetsJob = await client.beta.sheets.create({
|
|
20
|
+
* file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
16
23
|
*/
|
|
17
24
|
create(params: SheetCreateParams, options?: RequestOptions): APIPromise<SheetsJob> {
|
|
18
25
|
const { organization_id, project_id, ...body } = params;
|
|
@@ -26,6 +33,14 @@ export class Sheets extends APIResource {
|
|
|
26
33
|
/**
|
|
27
34
|
* List spreadsheet parsing jobs. Experimental: This endpoint is not yet ready for
|
|
28
35
|
* production use and is subject to change at any time.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* // Automatically fetches more pages as needed.
|
|
40
|
+
* for await (const sheetsJob of client.beta.sheets.list()) {
|
|
41
|
+
* // ...
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
29
44
|
*/
|
|
30
45
|
list(
|
|
31
46
|
query: SheetListParams | null | undefined = {},
|
|
@@ -41,6 +56,13 @@ export class Sheets extends APIResource {
|
|
|
41
56
|
* Delete a spreadsheet parsing job and its associated data. Experimental: This
|
|
42
57
|
* endpoint is not yet ready for production use and is subject to change at any
|
|
43
58
|
* time.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const response = await client.beta.sheets.deleteJob(
|
|
63
|
+
* 'spreadsheet_job_id',
|
|
64
|
+
* );
|
|
65
|
+
* ```
|
|
44
66
|
*/
|
|
45
67
|
deleteJob(
|
|
46
68
|
spreadsheetJobID: string,
|
|
@@ -63,6 +85,13 @@ export class Sheets extends APIResource {
|
|
|
63
85
|
*
|
|
64
86
|
* Experimental: This endpoint is not yet ready for production use and is subject
|
|
65
87
|
* to change at any time.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const sheetsJob = await client.beta.sheets.get(
|
|
92
|
+
* 'spreadsheet_job_id',
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
66
95
|
*/
|
|
67
96
|
get(
|
|
68
97
|
spreadsheetJobID: string,
|
|
@@ -76,6 +105,15 @@ export class Sheets extends APIResource {
|
|
|
76
105
|
* Generate a presigned URL to download a specific extracted region. Experimental:
|
|
77
106
|
* This endpoint is not yet ready for production use and is subject to change at
|
|
78
107
|
* any time.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const presignedURL =
|
|
112
|
+
* await client.beta.sheets.getResultTable('table', {
|
|
113
|
+
* spreadsheet_job_id: 'spreadsheet_job_id',
|
|
114
|
+
* region_id: 'region_id',
|
|
115
|
+
* });
|
|
116
|
+
* ```
|
|
79
117
|
*/
|
|
80
118
|
getResultTable(
|
|
81
119
|
regionType: 'table' | 'extra' | 'cell_metadata',
|