@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
|
@@ -45,29 +45,6 @@ export class Directories extends APIResource {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* Update directory metadata.
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* ```ts
|
|
53
|
-
* const directory = await client.beta.directories.update(
|
|
54
|
-
* 'directory_id',
|
|
55
|
-
* );
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
update(
|
|
59
|
-
directoryID: string,
|
|
60
|
-
params: DirectoryUpdateParams,
|
|
61
|
-
options?: RequestOptions,
|
|
62
|
-
): APIPromise<DirectoryUpdateResponse> {
|
|
63
|
-
const { organization_id, project_id, ...body } = params;
|
|
64
|
-
return this._client.patch(path`/api/v1/beta/directories/${directoryID}`, {
|
|
65
|
-
query: { organization_id, project_id },
|
|
66
|
-
body,
|
|
67
|
-
...options,
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
48
|
/**
|
|
72
49
|
* List Directories
|
|
73
50
|
*
|
|
@@ -90,42 +67,65 @@ export class Directories extends APIResource {
|
|
|
90
67
|
}
|
|
91
68
|
|
|
92
69
|
/**
|
|
93
|
-
*
|
|
70
|
+
* Retrieve a directory by its identifier.
|
|
94
71
|
*
|
|
95
72
|
* @example
|
|
96
73
|
* ```ts
|
|
97
|
-
* await client.beta.directories.
|
|
74
|
+
* const directory = await client.beta.directories.get(
|
|
75
|
+
* 'directory_id',
|
|
76
|
+
* );
|
|
98
77
|
* ```
|
|
99
78
|
*/
|
|
100
|
-
|
|
79
|
+
get(
|
|
101
80
|
directoryID: string,
|
|
102
|
-
|
|
81
|
+
query: DirectoryGetParams | null | undefined = {},
|
|
103
82
|
options?: RequestOptions,
|
|
104
|
-
): APIPromise<
|
|
105
|
-
|
|
106
|
-
|
|
83
|
+
): APIPromise<DirectoryGetResponse> {
|
|
84
|
+
return this._client.get(path`/api/v1/beta/directories/${directoryID}`, { query, ...options });
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Update directory metadata.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const directory = await client.beta.directories.update(
|
|
93
|
+
* 'directory_id',
|
|
94
|
+
* );
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
update(
|
|
98
|
+
directoryID: string,
|
|
99
|
+
params: DirectoryUpdateParams,
|
|
100
|
+
options?: RequestOptions,
|
|
101
|
+
): APIPromise<DirectoryUpdateResponse> {
|
|
102
|
+
const { organization_id, project_id, ...body } = params;
|
|
103
|
+
return this._client.patch(path`/api/v1/beta/directories/${directoryID}`, {
|
|
107
104
|
query: { organization_id, project_id },
|
|
105
|
+
body,
|
|
108
106
|
...options,
|
|
109
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
110
107
|
});
|
|
111
108
|
}
|
|
112
109
|
|
|
113
110
|
/**
|
|
114
|
-
*
|
|
111
|
+
* Permanently delete a directory.
|
|
115
112
|
*
|
|
116
113
|
* @example
|
|
117
114
|
* ```ts
|
|
118
|
-
*
|
|
119
|
-
* 'directory_id',
|
|
120
|
-
* );
|
|
115
|
+
* await client.beta.directories.delete('directory_id');
|
|
121
116
|
* ```
|
|
122
117
|
*/
|
|
123
|
-
|
|
118
|
+
delete(
|
|
124
119
|
directoryID: string,
|
|
125
|
-
|
|
120
|
+
params: DirectoryDeleteParams | null | undefined = {},
|
|
126
121
|
options?: RequestOptions,
|
|
127
|
-
): APIPromise<
|
|
128
|
-
|
|
122
|
+
): APIPromise<void> {
|
|
123
|
+
const { organization_id, project_id } = params ?? {};
|
|
124
|
+
return this._client.delete(path`/api/v1/beta/directories/${directoryID}`, {
|
|
125
|
+
query: { organization_id, project_id },
|
|
126
|
+
...options,
|
|
127
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
128
|
+
});
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
|
|
@@ -178,7 +178,7 @@ export interface DirectoryCreateResponse {
|
|
|
178
178
|
/**
|
|
179
179
|
* Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
|
|
180
180
|
*/
|
|
181
|
-
type?: '
|
|
181
|
+
type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
184
|
* Update datetime
|
|
@@ -233,7 +233,7 @@ export interface DirectoryUpdateResponse {
|
|
|
233
233
|
/**
|
|
234
234
|
* Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
|
|
235
235
|
*/
|
|
236
|
-
type?: '
|
|
236
|
+
type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
|
|
237
237
|
|
|
238
238
|
/**
|
|
239
239
|
* Update datetime
|
|
@@ -288,7 +288,7 @@ export interface DirectoryListResponse {
|
|
|
288
288
|
/**
|
|
289
289
|
* Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
|
|
290
290
|
*/
|
|
291
|
-
type?: '
|
|
291
|
+
type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
|
|
292
292
|
|
|
293
293
|
/**
|
|
294
294
|
* Update datetime
|
|
@@ -343,7 +343,7 @@ export interface DirectoryGetResponse {
|
|
|
343
343
|
/**
|
|
344
344
|
* Directory type: 'user', 'index', 'ephemeral', or 'system_ephemeral'.
|
|
345
345
|
*/
|
|
346
|
-
type?: '
|
|
346
|
+
type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user' | null;
|
|
347
347
|
|
|
348
348
|
/**
|
|
349
349
|
* Update datetime
|
|
@@ -386,50 +386,64 @@ export interface DirectoryCreateParams {
|
|
|
386
386
|
* Body param: Directory type. Use 'ephemeral' for batch processing with automatic
|
|
387
387
|
* cleanup.
|
|
388
388
|
*/
|
|
389
|
-
type?: '
|
|
389
|
+
type?: 'ephemeral' | 'user';
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
export interface
|
|
392
|
+
export interface DirectoryListParams extends PaginatedCursorParams {
|
|
393
393
|
/**
|
|
394
|
-
*
|
|
394
|
+
* Include deleted directories.
|
|
395
395
|
*/
|
|
396
|
-
|
|
396
|
+
include_deleted?: boolean;
|
|
397
397
|
|
|
398
398
|
/**
|
|
399
|
-
*
|
|
399
|
+
* Directory name to match.
|
|
400
400
|
*/
|
|
401
|
+
name?: string | null;
|
|
402
|
+
|
|
403
|
+
organization_id?: string | null;
|
|
404
|
+
|
|
401
405
|
project_id?: string | null;
|
|
402
406
|
|
|
403
407
|
/**
|
|
404
|
-
*
|
|
408
|
+
* Directory type to include.
|
|
405
409
|
*/
|
|
406
|
-
|
|
410
|
+
type?: 'ephemeral' | 'index' | 'user' | null;
|
|
407
411
|
|
|
408
412
|
/**
|
|
409
|
-
*
|
|
413
|
+
* Filter by one or more directory types. Repeat the parameter for multiple values.
|
|
410
414
|
*/
|
|
411
|
-
|
|
415
|
+
types?: Array<'ephemeral' | 'index' | 'user'> | null;
|
|
412
416
|
}
|
|
413
417
|
|
|
414
|
-
export interface
|
|
415
|
-
include_deleted?: boolean;
|
|
416
|
-
|
|
417
|
-
name?: string | null;
|
|
418
|
-
|
|
418
|
+
export interface DirectoryGetParams {
|
|
419
419
|
organization_id?: string | null;
|
|
420
420
|
|
|
421
421
|
project_id?: string | null;
|
|
422
|
-
|
|
423
|
-
type?: 'user' | 'index' | 'ephemeral' | null;
|
|
424
422
|
}
|
|
425
423
|
|
|
426
|
-
export interface
|
|
424
|
+
export interface DirectoryUpdateParams {
|
|
425
|
+
/**
|
|
426
|
+
* Query param
|
|
427
|
+
*/
|
|
427
428
|
organization_id?: string | null;
|
|
428
429
|
|
|
430
|
+
/**
|
|
431
|
+
* Query param
|
|
432
|
+
*/
|
|
429
433
|
project_id?: string | null;
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Body param: Updated description for the directory.
|
|
437
|
+
*/
|
|
438
|
+
description?: string | null;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Body param: Updated name for the directory.
|
|
442
|
+
*/
|
|
443
|
+
name?: string | null;
|
|
430
444
|
}
|
|
431
445
|
|
|
432
|
-
export interface
|
|
446
|
+
export interface DirectoryDeleteParams {
|
|
433
447
|
organization_id?: string | null;
|
|
434
448
|
|
|
435
449
|
project_id?: string | null;
|
|
@@ -445,10 +459,10 @@ export declare namespace Directories {
|
|
|
445
459
|
type DirectoryGetResponse as DirectoryGetResponse,
|
|
446
460
|
type DirectoryListResponsesPaginatedCursor as DirectoryListResponsesPaginatedCursor,
|
|
447
461
|
type DirectoryCreateParams as DirectoryCreateParams,
|
|
448
|
-
type DirectoryUpdateParams as DirectoryUpdateParams,
|
|
449
462
|
type DirectoryListParams as DirectoryListParams,
|
|
450
|
-
type DirectoryDeleteParams as DirectoryDeleteParams,
|
|
451
463
|
type DirectoryGetParams as DirectoryGetParams,
|
|
464
|
+
type DirectoryUpdateParams as DirectoryUpdateParams,
|
|
465
|
+
type DirectoryDeleteParams as DirectoryDeleteParams,
|
|
452
466
|
};
|
|
453
467
|
|
|
454
468
|
export {
|
|
@@ -459,11 +473,11 @@ export declare namespace Directories {
|
|
|
459
473
|
type FileGetResponse as FileGetResponse,
|
|
460
474
|
type FileUploadResponse as FileUploadResponse,
|
|
461
475
|
type FileListResponsesPaginatedCursor as FileListResponsesPaginatedCursor,
|
|
462
|
-
type FileUpdateParams as FileUpdateParams,
|
|
463
|
-
type FileListParams as FileListParams,
|
|
464
|
-
type FileDeleteParams as FileDeleteParams,
|
|
465
476
|
type FileAddParams as FileAddParams,
|
|
477
|
+
type FileListParams as FileListParams,
|
|
466
478
|
type FileGetParams as FileGetParams,
|
|
479
|
+
type FileUpdateParams as FileUpdateParams,
|
|
480
|
+
type FileDeleteParams as FileDeleteParams,
|
|
467
481
|
type FileUploadParams as FileUploadParams,
|
|
468
482
|
};
|
|
469
483
|
}
|
|
@@ -12,25 +12,20 @@ import { path } from '../../../internal/utils/path';
|
|
|
12
12
|
|
|
13
13
|
export class Files extends APIResource {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* filter first.
|
|
15
|
+
* Create a new file within the specified directory; the directory must exist in
|
|
16
|
+
* the project and `file_id` must reference an existing file.
|
|
18
17
|
*
|
|
19
18
|
* @example
|
|
20
19
|
* ```ts
|
|
21
|
-
* const
|
|
22
|
-
* '
|
|
23
|
-
* {
|
|
20
|
+
* const response = await client.beta.directories.files.add(
|
|
21
|
+
* 'directory_id',
|
|
22
|
+
* { file_id: 'file_id' },
|
|
24
23
|
* );
|
|
25
24
|
* ```
|
|
26
25
|
*/
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
options?: RequestOptions,
|
|
31
|
-
): APIPromise<FileUpdateResponse> {
|
|
32
|
-
const { directory_id, organization_id, project_id, ...body } = params;
|
|
33
|
-
return this._client.patch(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
|
|
26
|
+
add(directoryID: string, params: FileAddParams, options?: RequestOptions): APIPromise<FileAddResponse> {
|
|
27
|
+
const { organization_id, project_id, ...body } = params;
|
|
28
|
+
return this._client.post(path`/api/v1/beta/directories/${directoryID}/files`, {
|
|
34
29
|
query: { organization_id, project_id },
|
|
35
30
|
body,
|
|
36
31
|
...options,
|
|
@@ -64,41 +59,45 @@ export class Files extends APIResource {
|
|
|
64
59
|
}
|
|
65
60
|
|
|
66
61
|
/**
|
|
67
|
-
*
|
|
68
|
-
* list with a filter
|
|
62
|
+
* Get a directory file by `directory_file_id`; to look up by `unique_id`, use the
|
|
63
|
+
* list endpoint with a filter.
|
|
69
64
|
*
|
|
70
65
|
* @example
|
|
71
66
|
* ```ts
|
|
72
|
-
* await client.beta.directories.files.
|
|
67
|
+
* const file = await client.beta.directories.files.get(
|
|
73
68
|
* 'directory_file_id',
|
|
74
69
|
* { directory_id: 'directory_id' },
|
|
75
70
|
* );
|
|
76
71
|
* ```
|
|
77
72
|
*/
|
|
78
|
-
|
|
79
|
-
const { directory_id,
|
|
80
|
-
return this._client.
|
|
81
|
-
query
|
|
73
|
+
get(directoryFileID: string, params: FileGetParams, options?: RequestOptions): APIPromise<FileGetResponse> {
|
|
74
|
+
const { directory_id, ...query } = params;
|
|
75
|
+
return this._client.get(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
|
|
76
|
+
query,
|
|
82
77
|
...options,
|
|
83
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
84
78
|
});
|
|
85
79
|
}
|
|
86
80
|
|
|
87
81
|
/**
|
|
88
|
-
*
|
|
89
|
-
* the
|
|
82
|
+
* Update directory-file metadata by `directory_file_id`; set `directory_id` to
|
|
83
|
+
* move the file to a different directory. To resolve from `unique_id`, list with a
|
|
84
|
+
* filter first.
|
|
90
85
|
*
|
|
91
86
|
* @example
|
|
92
87
|
* ```ts
|
|
93
|
-
* const
|
|
94
|
-
* '
|
|
95
|
-
* {
|
|
88
|
+
* const file = await client.beta.directories.files.update(
|
|
89
|
+
* 'directory_file_id',
|
|
90
|
+
* { directory_id: 'directory_id' },
|
|
96
91
|
* );
|
|
97
92
|
* ```
|
|
98
93
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
update(
|
|
95
|
+
directoryFileID: string,
|
|
96
|
+
params: FileUpdateParams,
|
|
97
|
+
options?: RequestOptions,
|
|
98
|
+
): APIPromise<FileUpdateResponse> {
|
|
99
|
+
const { directory_id, organization_id, project_id, ...body } = params;
|
|
100
|
+
return this._client.patch(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
|
|
102
101
|
query: { organization_id, project_id },
|
|
103
102
|
body,
|
|
104
103
|
...options,
|
|
@@ -106,22 +105,23 @@ export class Files extends APIResource {
|
|
|
106
105
|
}
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
|
-
*
|
|
110
|
-
* list
|
|
108
|
+
* Delete a directory file by `directory_file_id`; to resolve from `unique_id`,
|
|
109
|
+
* list with a filter first.
|
|
111
110
|
*
|
|
112
111
|
* @example
|
|
113
112
|
* ```ts
|
|
114
|
-
*
|
|
113
|
+
* await client.beta.directories.files.delete(
|
|
115
114
|
* 'directory_file_id',
|
|
116
115
|
* { directory_id: 'directory_id' },
|
|
117
116
|
* );
|
|
118
117
|
* ```
|
|
119
118
|
*/
|
|
120
|
-
|
|
121
|
-
const { directory_id,
|
|
122
|
-
return this._client.
|
|
123
|
-
query,
|
|
119
|
+
delete(directoryFileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
120
|
+
const { directory_id, organization_id, project_id } = params;
|
|
121
|
+
return this._client.delete(path`/api/v1/beta/directories/${directory_id}/files/${directoryFileID}`, {
|
|
122
|
+
query: { organization_id, project_id },
|
|
124
123
|
...options,
|
|
124
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
|
|
@@ -452,11 +452,11 @@ export interface FileUploadResponse {
|
|
|
452
452
|
updated_at?: string | null;
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
export interface
|
|
455
|
+
export interface FileAddParams {
|
|
456
456
|
/**
|
|
457
|
-
*
|
|
457
|
+
* Body param: File ID for the storage location (required).
|
|
458
458
|
*/
|
|
459
|
-
|
|
459
|
+
file_id: string;
|
|
460
460
|
|
|
461
461
|
/**
|
|
462
462
|
* Query param
|
|
@@ -469,23 +469,19 @@ export interface FileUpdateParams {
|
|
|
469
469
|
project_id?: string | null;
|
|
470
470
|
|
|
471
471
|
/**
|
|
472
|
-
* Body param:
|
|
472
|
+
* Body param: Display name for the file. If not provided, will use the file's
|
|
473
|
+
* name.
|
|
473
474
|
*/
|
|
474
475
|
display_name?: string | null;
|
|
475
476
|
|
|
476
477
|
/**
|
|
477
|
-
* Body param: User-defined metadata key-value pairs
|
|
478
|
-
* layer.
|
|
478
|
+
* Body param: User-defined metadata key-value pairs to associate with the file.
|
|
479
479
|
*/
|
|
480
480
|
metadata?: { [key: string]: string | number | number | boolean | null | Array<string> } | null;
|
|
481
481
|
|
|
482
482
|
/**
|
|
483
|
-
* Body param:
|
|
484
|
-
|
|
485
|
-
target_directory_id?: string | null;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Body param: Updated unique identifier.
|
|
483
|
+
* Body param: Unique identifier for the file in the directory. If not provided,
|
|
484
|
+
* will use the file's external_file_id or name.
|
|
489
485
|
*/
|
|
490
486
|
unique_id?: string | null;
|
|
491
487
|
}
|
|
@@ -521,12 +517,17 @@ export interface FileListParams extends PaginatedCursorParams {
|
|
|
521
517
|
updated_at_on_or_before?: string | null;
|
|
522
518
|
}
|
|
523
519
|
|
|
524
|
-
export interface
|
|
520
|
+
export interface FileGetParams {
|
|
525
521
|
/**
|
|
526
522
|
* Path param
|
|
527
523
|
*/
|
|
528
524
|
directory_id: string;
|
|
529
525
|
|
|
526
|
+
/**
|
|
527
|
+
* Query param: Fields to expand.
|
|
528
|
+
*/
|
|
529
|
+
expand?: Array<string> | null;
|
|
530
|
+
|
|
530
531
|
/**
|
|
531
532
|
* Query param
|
|
532
533
|
*/
|
|
@@ -538,11 +539,11 @@ export interface FileDeleteParams {
|
|
|
538
539
|
project_id?: string | null;
|
|
539
540
|
}
|
|
540
541
|
|
|
541
|
-
export interface
|
|
542
|
+
export interface FileUpdateParams {
|
|
542
543
|
/**
|
|
543
|
-
*
|
|
544
|
+
* Path param
|
|
544
545
|
*/
|
|
545
|
-
|
|
546
|
+
directory_id: string;
|
|
546
547
|
|
|
547
548
|
/**
|
|
548
549
|
* Query param
|
|
@@ -555,34 +556,33 @@ export interface FileAddParams {
|
|
|
555
556
|
project_id?: string | null;
|
|
556
557
|
|
|
557
558
|
/**
|
|
558
|
-
* Body param:
|
|
559
|
-
* name.
|
|
559
|
+
* Body param: Updated display name.
|
|
560
560
|
*/
|
|
561
561
|
display_name?: string | null;
|
|
562
562
|
|
|
563
563
|
/**
|
|
564
|
-
* Body param: User-defined metadata key-value pairs
|
|
564
|
+
* Body param: User-defined metadata key-value pairs. Replaces the user metadata
|
|
565
|
+
* layer.
|
|
565
566
|
*/
|
|
566
567
|
metadata?: { [key: string]: string | number | number | boolean | null | Array<string> } | null;
|
|
567
568
|
|
|
568
569
|
/**
|
|
569
|
-
* Body param:
|
|
570
|
-
|
|
570
|
+
* Body param: Move file to a different directory.
|
|
571
|
+
*/
|
|
572
|
+
target_directory_id?: string | null;
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Body param: Updated unique identifier.
|
|
571
576
|
*/
|
|
572
577
|
unique_id?: string | null;
|
|
573
578
|
}
|
|
574
579
|
|
|
575
|
-
export interface
|
|
580
|
+
export interface FileDeleteParams {
|
|
576
581
|
/**
|
|
577
582
|
* Path param
|
|
578
583
|
*/
|
|
579
584
|
directory_id: string;
|
|
580
585
|
|
|
581
|
-
/**
|
|
582
|
-
* Query param: Fields to expand.
|
|
583
|
-
*/
|
|
584
|
-
expand?: Array<string> | null;
|
|
585
|
-
|
|
586
586
|
/**
|
|
587
587
|
* Query param
|
|
588
588
|
*/
|
|
@@ -639,11 +639,11 @@ export declare namespace Files {
|
|
|
639
639
|
type FileGetResponse as FileGetResponse,
|
|
640
640
|
type FileUploadResponse as FileUploadResponse,
|
|
641
641
|
type FileListResponsesPaginatedCursor as FileListResponsesPaginatedCursor,
|
|
642
|
-
type FileUpdateParams as FileUpdateParams,
|
|
643
|
-
type FileListParams as FileListParams,
|
|
644
|
-
type FileDeleteParams as FileDeleteParams,
|
|
645
642
|
type FileAddParams as FileAddParams,
|
|
643
|
+
type FileListParams as FileListParams,
|
|
646
644
|
type FileGetParams as FileGetParams,
|
|
645
|
+
type FileUpdateParams as FileUpdateParams,
|
|
646
|
+
type FileDeleteParams as FileDeleteParams,
|
|
647
647
|
type FileUploadParams as FileUploadParams,
|
|
648
648
|
};
|
|
649
649
|
}
|
|
@@ -7,10 +7,10 @@ export {
|
|
|
7
7
|
type DirectoryListResponse,
|
|
8
8
|
type DirectoryGetResponse,
|
|
9
9
|
type DirectoryCreateParams,
|
|
10
|
-
type DirectoryUpdateParams,
|
|
11
10
|
type DirectoryListParams,
|
|
12
|
-
type DirectoryDeleteParams,
|
|
13
11
|
type DirectoryGetParams,
|
|
12
|
+
type DirectoryUpdateParams,
|
|
13
|
+
type DirectoryDeleteParams,
|
|
14
14
|
type DirectoryListResponsesPaginatedCursor,
|
|
15
15
|
} from './directories';
|
|
16
16
|
export {
|
|
@@ -20,11 +20,11 @@ export {
|
|
|
20
20
|
type FileAddResponse,
|
|
21
21
|
type FileGetResponse,
|
|
22
22
|
type FileUploadResponse,
|
|
23
|
-
type FileUpdateParams,
|
|
24
|
-
type FileListParams,
|
|
25
|
-
type FileDeleteParams,
|
|
26
23
|
type FileAddParams,
|
|
24
|
+
type FileListParams,
|
|
27
25
|
type FileGetParams,
|
|
26
|
+
type FileUpdateParams,
|
|
27
|
+
type FileDeleteParams,
|
|
28
28
|
type FileUploadParams,
|
|
29
29
|
type FileListResponsesPaginatedCursor,
|
|
30
30
|
} from './files';
|
|
@@ -5,15 +5,15 @@ export {
|
|
|
5
5
|
type AgentDataDeleteResponse,
|
|
6
6
|
type AgentDataAggregateResponse,
|
|
7
7
|
type AgentDataDeleteByQueryResponse,
|
|
8
|
-
type
|
|
8
|
+
type AgentDataGetParams,
|
|
9
9
|
type AgentDataUpdateParams,
|
|
10
10
|
type AgentDataDeleteParams,
|
|
11
|
+
type AgentDataCreateParams,
|
|
12
|
+
type AgentDataSearchParams,
|
|
11
13
|
type AgentDataAggregateParams,
|
|
12
14
|
type AgentDataDeleteByQueryParams,
|
|
13
|
-
type AgentDataGetParams,
|
|
14
|
-
type AgentDataSearchParams,
|
|
15
|
-
type AgentDataAggregateResponsesPaginatedCursorPost,
|
|
16
15
|
type AgentDataPaginatedCursorPost,
|
|
16
|
+
type AgentDataAggregateResponsesPaginatedCursorPost,
|
|
17
17
|
} from './agent-data';
|
|
18
18
|
export {
|
|
19
19
|
Batch,
|
|
@@ -23,8 +23,8 @@ export {
|
|
|
23
23
|
type BatchGetStatusResponse,
|
|
24
24
|
type BatchCreateParams,
|
|
25
25
|
type BatchListParams,
|
|
26
|
-
type BatchCancelParams,
|
|
27
26
|
type BatchGetStatusParams,
|
|
27
|
+
type BatchCancelParams,
|
|
28
28
|
type BatchListResponsesPaginatedBatchItems,
|
|
29
29
|
} from './batch/index';
|
|
30
30
|
export { Beta } from './beta';
|
|
@@ -35,9 +35,9 @@ export {
|
|
|
35
35
|
type ChatListResponse,
|
|
36
36
|
type ChatGetSummaryResponse,
|
|
37
37
|
type ChatStreamResponse,
|
|
38
|
+
type ChatListParams,
|
|
38
39
|
type ChatCreateParams,
|
|
39
40
|
type ChatRetrieveParams,
|
|
40
|
-
type ChatListParams,
|
|
41
41
|
type ChatDeleteParams,
|
|
42
42
|
type ChatGetSummaryParams,
|
|
43
43
|
type ChatStreamParams,
|
|
@@ -50,10 +50,10 @@ export {
|
|
|
50
50
|
type DirectoryListResponse,
|
|
51
51
|
type DirectoryGetResponse,
|
|
52
52
|
type DirectoryCreateParams,
|
|
53
|
-
type DirectoryUpdateParams,
|
|
54
53
|
type DirectoryListParams,
|
|
55
|
-
type DirectoryDeleteParams,
|
|
56
54
|
type DirectoryGetParams,
|
|
55
|
+
type DirectoryUpdateParams,
|
|
56
|
+
type DirectoryDeleteParams,
|
|
57
57
|
type DirectoryListResponsesPaginatedCursor,
|
|
58
58
|
} from './directories/index';
|
|
59
59
|
export {
|
|
@@ -62,11 +62,11 @@ export {
|
|
|
62
62
|
type IndexListResponse,
|
|
63
63
|
type IndexGetResponse,
|
|
64
64
|
type IndexSyncResponse,
|
|
65
|
-
type IndexCreateParams,
|
|
66
|
-
type IndexListParams,
|
|
67
|
-
type IndexDeleteParams,
|
|
68
65
|
type IndexGetParams,
|
|
66
|
+
type IndexDeleteParams,
|
|
67
|
+
type IndexCreateParams,
|
|
69
68
|
type IndexSyncParams,
|
|
69
|
+
type IndexListParams,
|
|
70
70
|
type IndexListResponsesPaginatedCursor,
|
|
71
71
|
} from './indexes';
|
|
72
72
|
export {
|
|
@@ -89,9 +89,9 @@ export {
|
|
|
89
89
|
type SheetDeleteJobResponse,
|
|
90
90
|
type SheetCreateParams,
|
|
91
91
|
type SheetListParams,
|
|
92
|
-
type SheetDeleteJobParams,
|
|
93
92
|
type SheetGetParams,
|
|
94
93
|
type SheetGetResultTableParams,
|
|
94
|
+
type SheetDeleteJobParams,
|
|
95
95
|
type SheetsJobsPaginatedCursor,
|
|
96
96
|
} from './sheets';
|
|
97
97
|
export {
|