@letta-ai/letta-client 1.0.0-alpha.15 → 1.0.0-alpha.17
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 +41 -0
- package/client.d.mts +22 -22
- package/client.d.mts.map +1 -1
- package/client.d.ts +22 -22
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +1098 -136
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +1098 -136
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +0 -6
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +1 -7
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/blocks.d.mts +1 -15
- package/resources/agents/blocks.d.mts.map +1 -1
- package/resources/agents/blocks.d.ts +1 -15
- package/resources/agents/blocks.d.ts.map +1 -1
- package/resources/agents/folders.d.mts +47 -76
- package/resources/agents/folders.d.mts.map +1 -1
- package/resources/agents/folders.d.ts +47 -76
- package/resources/agents/folders.d.ts.map +1 -1
- package/resources/agents/folders.js +5 -1
- package/resources/agents/folders.js.map +1 -1
- package/resources/agents/folders.mjs +5 -1
- package/resources/agents/folders.mjs.map +1 -1
- package/resources/agents/index.d.mts +4 -4
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +4 -4
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +87 -28
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +87 -28
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js +5 -5
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs +5 -5
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/agents/tools.d.mts +6 -27
- package/resources/agents/tools.d.mts.map +1 -1
- package/resources/agents/tools.d.ts +6 -27
- package/resources/agents/tools.d.ts.map +1 -1
- package/resources/agents/tools.js +5 -1
- package/resources/agents/tools.js.map +1 -1
- package/resources/agents/tools.mjs +5 -1
- package/resources/agents/tools.mjs.map +1 -1
- package/resources/archives.d.mts +9 -37
- package/resources/archives.d.mts.map +1 -1
- package/resources/archives.d.ts +9 -37
- package/resources/archives.d.ts.map +1 -1
- package/resources/archives.js +2 -1
- package/resources/archives.js.map +1 -1
- package/resources/archives.mjs +2 -1
- package/resources/archives.mjs.map +1 -1
- package/resources/batches/batches.d.mts +8 -30
- package/resources/batches/batches.d.mts.map +1 -1
- package/resources/batches/batches.d.ts +8 -30
- package/resources/batches/batches.d.ts.map +1 -1
- package/resources/batches/batches.js +2 -1
- package/resources/batches/batches.js.map +1 -1
- package/resources/batches/batches.mjs +2 -1
- package/resources/batches/batches.mjs.map +1 -1
- package/resources/batches/index.d.mts +2 -2
- package/resources/batches/index.d.mts.map +1 -1
- package/resources/batches/index.d.ts +2 -2
- package/resources/batches/index.d.ts.map +1 -1
- package/resources/batches/index.js.map +1 -1
- package/resources/batches/index.mjs.map +1 -1
- package/resources/batches/messages.d.mts +6 -30
- package/resources/batches/messages.d.mts.map +1 -1
- package/resources/batches/messages.d.ts +6 -30
- package/resources/batches/messages.d.ts.map +1 -1
- package/resources/batches/messages.js +2 -1
- package/resources/batches/messages.js.map +1 -1
- package/resources/batches/messages.mjs +2 -1
- package/resources/batches/messages.mjs.map +1 -1
- package/resources/blocks/blocks.d.mts +1 -6
- package/resources/blocks/blocks.d.mts.map +1 -1
- package/resources/blocks/blocks.d.ts +1 -6
- package/resources/blocks/blocks.d.ts.map +1 -1
- package/resources/blocks/blocks.js +0 -6
- package/resources/blocks/blocks.js.map +1 -1
- package/resources/blocks/blocks.mjs +0 -6
- package/resources/blocks/blocks.mjs.map +1 -1
- package/resources/blocks/index.d.mts +1 -1
- package/resources/blocks/index.d.mts.map +1 -1
- package/resources/blocks/index.d.ts +1 -1
- package/resources/blocks/index.d.ts.map +1 -1
- package/resources/blocks/index.js.map +1 -1
- package/resources/blocks/index.mjs.map +1 -1
- package/resources/folders/files.d.mts +73 -97
- package/resources/folders/files.d.mts.map +1 -1
- package/resources/folders/files.d.ts +73 -97
- package/resources/folders/files.d.ts.map +1 -1
- package/resources/folders/files.js +5 -1
- package/resources/folders/files.js.map +1 -1
- package/resources/folders/files.mjs +5 -1
- package/resources/folders/files.mjs.map +1 -1
- package/resources/folders/folders.d.mts +11 -44
- package/resources/folders/folders.d.mts.map +1 -1
- package/resources/folders/folders.d.ts +11 -44
- package/resources/folders/folders.d.ts.map +1 -1
- package/resources/folders/folders.js +2 -7
- package/resources/folders/folders.js.map +1 -1
- package/resources/folders/folders.mjs +2 -7
- package/resources/folders/folders.mjs.map +1 -1
- package/resources/folders/index.d.mts +2 -2
- package/resources/folders/index.d.mts.map +1 -1
- package/resources/folders/index.d.ts +2 -2
- package/resources/folders/index.d.ts.map +1 -1
- package/resources/folders/index.js.map +1 -1
- package/resources/folders/index.mjs.map +1 -1
- package/resources/groups/groups.d.mts +1 -6
- package/resources/groups/groups.d.mts.map +1 -1
- package/resources/groups/groups.d.ts +1 -6
- package/resources/groups/groups.d.ts.map +1 -1
- package/resources/groups/groups.js +0 -6
- package/resources/groups/groups.js.map +1 -1
- package/resources/groups/groups.mjs +0 -6
- package/resources/groups/groups.mjs.map +1 -1
- package/resources/groups/index.d.mts +1 -1
- package/resources/groups/index.d.mts.map +1 -1
- package/resources/groups/index.d.ts +1 -1
- package/resources/groups/index.d.ts.map +1 -1
- package/resources/groups/index.js.map +1 -1
- package/resources/groups/index.mjs.map +1 -1
- package/resources/groups/messages.d.mts +9 -3
- package/resources/groups/messages.d.mts.map +1 -1
- package/resources/groups/messages.d.ts +9 -3
- package/resources/groups/messages.d.ts.map +1 -1
- package/resources/identities/identities.d.mts +9 -36
- package/resources/identities/identities.d.mts.map +1 -1
- package/resources/identities/identities.d.ts +9 -36
- package/resources/identities/identities.d.ts.map +1 -1
- package/resources/identities/identities.js +2 -7
- package/resources/identities/identities.js.map +1 -1
- package/resources/identities/identities.mjs +2 -7
- package/resources/identities/identities.mjs.map +1 -1
- package/resources/identities/index.d.mts +1 -1
- package/resources/identities/index.d.mts.map +1 -1
- package/resources/identities/index.d.ts +1 -1
- package/resources/identities/index.d.ts.map +1 -1
- package/resources/identities/index.js.map +1 -1
- package/resources/identities/index.mjs.map +1 -1
- package/resources/index.d.mts +11 -11
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -11
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-servers/index.d.mts +2 -3
- package/resources/mcp-servers/index.d.mts.map +1 -1
- package/resources/mcp-servers/index.d.ts +2 -3
- package/resources/mcp-servers/index.d.ts.map +1 -1
- package/resources/mcp-servers/index.js +1 -3
- package/resources/mcp-servers/index.js.map +1 -1
- package/resources/mcp-servers/index.mjs +1 -2
- package/resources/mcp-servers/index.mjs.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.mts +292 -378
- package/resources/mcp-servers/mcp-servers.d.mts.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.ts +292 -378
- package/resources/mcp-servers/mcp-servers.d.ts.map +1 -1
- package/resources/mcp-servers/mcp-servers.js +17 -4
- package/resources/mcp-servers/mcp-servers.js.map +1 -1
- package/resources/mcp-servers/mcp-servers.mjs +17 -4
- package/resources/mcp-servers/mcp-servers.mjs.map +1 -1
- package/resources/mcp-servers/tools.d.mts +3 -41
- package/resources/mcp-servers/tools.d.mts.map +1 -1
- package/resources/mcp-servers/tools.d.ts +3 -41
- package/resources/mcp-servers/tools.d.ts.map +1 -1
- package/resources/mcp-servers/tools.js.map +1 -1
- package/resources/mcp-servers/tools.mjs.map +1 -1
- package/resources/models/embeddings.d.mts +6 -2
- package/resources/models/embeddings.d.mts.map +1 -1
- package/resources/models/embeddings.d.ts +6 -2
- package/resources/models/embeddings.d.ts.map +1 -1
- package/resources/models/embeddings.js +5 -1
- package/resources/models/embeddings.js.map +1 -1
- package/resources/models/embeddings.mjs +5 -1
- package/resources/models/embeddings.mjs.map +1 -1
- package/resources/models/index.d.mts +1 -1
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +1 -1
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +174 -3
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +174 -3
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +5 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +5 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/runs/index.d.mts +1 -1
- package/resources/runs/index.d.mts.map +1 -1
- package/resources/runs/index.d.ts +1 -1
- package/resources/runs/index.d.ts.map +1 -1
- package/resources/runs/index.js.map +1 -1
- package/resources/runs/index.mjs.map +1 -1
- package/resources/runs/runs.d.mts +6 -32
- package/resources/runs/runs.d.mts.map +1 -1
- package/resources/runs/runs.d.ts +6 -32
- package/resources/runs/runs.d.ts.map +1 -1
- package/resources/runs/runs.js +2 -1
- package/resources/runs/runs.js.map +1 -1
- package/resources/runs/runs.mjs +2 -1
- package/resources/runs/runs.mjs.map +1 -1
- package/resources/tools.d.mts +6 -68
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +6 -68
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +2 -7
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +2 -7
- package/resources/tools.mjs.map +1 -1
- package/src/client.ts +41 -28
- package/src/resources/agents/agents.ts +1364 -77
- package/src/resources/agents/blocks.ts +1 -15
- package/src/resources/agents/folders.ts +55 -85
- package/src/resources/agents/index.ts +5 -2
- package/src/resources/agents/messages.ts +123 -28
- package/src/resources/agents/tools.ts +10 -34
- package/src/resources/archives.ts +12 -45
- package/src/resources/batches/batches.ts +10 -41
- package/src/resources/batches/index.ts +2 -2
- package/src/resources/batches/messages.ts +12 -37
- package/src/resources/blocks/blocks.ts +0 -10
- package/src/resources/blocks/index.ts +0 -1
- package/src/resources/folders/files.ts +88 -113
- package/src/resources/folders/folders.ts +14 -55
- package/src/resources/folders/index.ts +2 -2
- package/src/resources/groups/groups.ts +0 -10
- package/src/resources/groups/index.ts +0 -1
- package/src/resources/groups/messages.ts +10 -3
- package/src/resources/identities/identities.ts +12 -49
- package/src/resources/identities/index.ts +1 -2
- package/src/resources/index.ts +21 -14
- package/src/resources/mcp-servers/index.ts +14 -9
- package/src/resources/mcp-servers/mcp-servers.ts +303 -402
- package/src/resources/mcp-servers/tools.ts +6 -47
- package/src/resources/models/embeddings.ts +6 -2
- package/src/resources/models/index.ts +2 -0
- package/src/resources/models/models.ts +254 -2
- package/src/resources/runs/index.ts +1 -1
- package/src/resources/runs/runs.ts +11 -44
- package/src/resources/tools.ts +8 -92
- 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/mcp-servers/refresh.d.mts +0 -24
- package/resources/mcp-servers/refresh.d.mts.map +0 -1
- package/resources/mcp-servers/refresh.d.ts +0 -24
- package/resources/mcp-servers/refresh.d.ts.map +0 -1
- package/resources/mcp-servers/refresh.js +0 -27
- package/resources/mcp-servers/refresh.js.map +0 -1
- package/resources/mcp-servers/refresh.mjs +0 -23
- package/resources/mcp-servers/refresh.mjs.map +0 -1
- package/src/resources/mcp-servers/refresh.ts +0 -43
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from "../../core/pagination.js";
|
|
3
4
|
import { type Uploadable } from "../../core/uploads.js";
|
|
4
5
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
6
|
export declare class Files extends APIResource {
|
|
6
7
|
/**
|
|
7
8
|
* List paginated files associated with a data folder.
|
|
8
9
|
*/
|
|
9
|
-
list(folderID: string, query?: FileListParams | null | undefined, options?: RequestOptions):
|
|
10
|
+
list(folderID: string, query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileListResponsesArrayPage, FileListResponse>;
|
|
10
11
|
/**
|
|
11
12
|
* Delete a file from a folder.
|
|
12
13
|
*/
|
|
@@ -16,92 +17,19 @@ export declare class Files extends APIResource {
|
|
|
16
17
|
*/
|
|
17
18
|
upload(folderID: string, params: FileUploadParams, options?: RequestOptions): APIPromise<FileUploadResponse>;
|
|
18
19
|
}
|
|
19
|
-
export type
|
|
20
|
-
export declare namespace FileListResponse {
|
|
21
|
-
/**
|
|
22
|
-
* Representation of a single FileMetadata
|
|
23
|
-
*/
|
|
24
|
-
interface FileListResponseItem {
|
|
25
|
-
/**
|
|
26
|
-
* The unique identifier of the source associated with the document.
|
|
27
|
-
*/
|
|
28
|
-
source_id: string;
|
|
29
|
-
/**
|
|
30
|
-
* The human-friendly ID of the File
|
|
31
|
-
*/
|
|
32
|
-
id?: string;
|
|
33
|
-
/**
|
|
34
|
-
* Number of chunks that have been embedded.
|
|
35
|
-
*/
|
|
36
|
-
chunks_embedded?: number | null;
|
|
37
|
-
/**
|
|
38
|
-
* Optional full-text content of the file; only populated on demand due to its
|
|
39
|
-
* size.
|
|
40
|
-
*/
|
|
41
|
-
content?: string | null;
|
|
42
|
-
/**
|
|
43
|
-
* The creation date of the file.
|
|
44
|
-
*/
|
|
45
|
-
created_at?: string | null;
|
|
46
|
-
/**
|
|
47
|
-
* Optional error message if the file failed processing.
|
|
48
|
-
*/
|
|
49
|
-
error_message?: string | null;
|
|
50
|
-
/**
|
|
51
|
-
* The creation date of the file.
|
|
52
|
-
*/
|
|
53
|
-
file_creation_date?: string | null;
|
|
54
|
-
/**
|
|
55
|
-
* The last modified date of the file.
|
|
56
|
-
*/
|
|
57
|
-
file_last_modified_date?: string | null;
|
|
58
|
-
/**
|
|
59
|
-
* The name of the file.
|
|
60
|
-
*/
|
|
61
|
-
file_name?: string | null;
|
|
62
|
-
/**
|
|
63
|
-
* The path to the file.
|
|
64
|
-
*/
|
|
65
|
-
file_path?: string | null;
|
|
66
|
-
/**
|
|
67
|
-
* The size of the file in bytes.
|
|
68
|
-
*/
|
|
69
|
-
file_size?: number | null;
|
|
70
|
-
/**
|
|
71
|
-
* The type of the file (MIME type).
|
|
72
|
-
*/
|
|
73
|
-
file_type?: string | null;
|
|
74
|
-
/**
|
|
75
|
-
* The original name of the file as uploaded.
|
|
76
|
-
*/
|
|
77
|
-
original_file_name?: string | null;
|
|
78
|
-
/**
|
|
79
|
-
* The current processing status of the file (e.g. pending, parsing, embedding,
|
|
80
|
-
* completed, error).
|
|
81
|
-
*/
|
|
82
|
-
processing_status?: 'pending' | 'parsing' | 'embedding' | 'completed' | 'error';
|
|
83
|
-
/**
|
|
84
|
-
* Total number of chunks for the file.
|
|
85
|
-
*/
|
|
86
|
-
total_chunks?: number | null;
|
|
87
|
-
/**
|
|
88
|
-
* The update date of the file.
|
|
89
|
-
*/
|
|
90
|
-
updated_at?: string | null;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
20
|
+
export type FileListResponsesArrayPage = ArrayPage<FileListResponse>;
|
|
93
21
|
/**
|
|
94
22
|
* Representation of a single FileMetadata
|
|
95
23
|
*/
|
|
96
|
-
export interface
|
|
24
|
+
export interface FileListResponse {
|
|
97
25
|
/**
|
|
98
|
-
* The
|
|
26
|
+
* The human-friendly ID of the File
|
|
99
27
|
*/
|
|
100
|
-
|
|
28
|
+
id: string;
|
|
101
29
|
/**
|
|
102
|
-
* The
|
|
30
|
+
* The unique identifier of the source associated with the document.
|
|
103
31
|
*/
|
|
104
|
-
|
|
32
|
+
source_id: string;
|
|
105
33
|
/**
|
|
106
34
|
* Number of chunks that have been embedded.
|
|
107
35
|
*/
|
|
@@ -161,34 +89,82 @@ export interface FileUploadResponse {
|
|
|
161
89
|
*/
|
|
162
90
|
updated_at?: string | null;
|
|
163
91
|
}
|
|
164
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Representation of a single FileMetadata
|
|
94
|
+
*/
|
|
95
|
+
export interface FileUploadResponse {
|
|
165
96
|
/**
|
|
166
|
-
*
|
|
167
|
-
* specified sort order
|
|
97
|
+
* The human-friendly ID of the File
|
|
168
98
|
*/
|
|
169
|
-
|
|
99
|
+
id: string;
|
|
170
100
|
/**
|
|
171
|
-
*
|
|
172
|
-
* the specified sort order
|
|
101
|
+
* The unique identifier of the source associated with the document.
|
|
173
102
|
*/
|
|
174
|
-
|
|
103
|
+
source_id: string;
|
|
175
104
|
/**
|
|
176
|
-
*
|
|
105
|
+
* Number of chunks that have been embedded.
|
|
177
106
|
*/
|
|
178
|
-
|
|
107
|
+
chunks_embedded?: number | null;
|
|
108
|
+
/**
|
|
109
|
+
* Optional full-text content of the file; only populated on demand due to its
|
|
110
|
+
* size.
|
|
111
|
+
*/
|
|
112
|
+
content?: string | null;
|
|
113
|
+
/**
|
|
114
|
+
* The creation date of the file.
|
|
115
|
+
*/
|
|
116
|
+
created_at?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Optional error message if the file failed processing.
|
|
119
|
+
*/
|
|
120
|
+
error_message?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* The creation date of the file.
|
|
123
|
+
*/
|
|
124
|
+
file_creation_date?: string | null;
|
|
179
125
|
/**
|
|
180
|
-
*
|
|
126
|
+
* The last modified date of the file.
|
|
127
|
+
*/
|
|
128
|
+
file_last_modified_date?: string | null;
|
|
129
|
+
/**
|
|
130
|
+
* The name of the file.
|
|
131
|
+
*/
|
|
132
|
+
file_name?: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* The path to the file.
|
|
135
|
+
*/
|
|
136
|
+
file_path?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* The size of the file in bytes.
|
|
139
|
+
*/
|
|
140
|
+
file_size?: number | null;
|
|
141
|
+
/**
|
|
142
|
+
* The type of the file (MIME type).
|
|
143
|
+
*/
|
|
144
|
+
file_type?: string | null;
|
|
145
|
+
/**
|
|
146
|
+
* The original name of the file as uploaded.
|
|
147
|
+
*/
|
|
148
|
+
original_file_name?: string | null;
|
|
149
|
+
/**
|
|
150
|
+
* The current processing status of the file (e.g. pending, parsing, embedding,
|
|
151
|
+
* completed, error).
|
|
152
|
+
*/
|
|
153
|
+
processing_status?: 'pending' | 'parsing' | 'embedding' | 'completed' | 'error';
|
|
154
|
+
/**
|
|
155
|
+
* Total number of chunks for the file.
|
|
181
156
|
*/
|
|
182
|
-
|
|
157
|
+
total_chunks?: number | null;
|
|
183
158
|
/**
|
|
184
|
-
*
|
|
185
|
-
* first
|
|
159
|
+
* The update date of the file.
|
|
186
160
|
*/
|
|
187
|
-
|
|
161
|
+
updated_at?: string | null;
|
|
162
|
+
}
|
|
163
|
+
export interface FileListParams extends ArrayPageParams {
|
|
188
164
|
/**
|
|
189
|
-
*
|
|
165
|
+
* Whether to include full file content
|
|
190
166
|
*/
|
|
191
|
-
|
|
167
|
+
include_content?: boolean;
|
|
192
168
|
}
|
|
193
169
|
export interface FileDeleteParams {
|
|
194
170
|
/**
|
|
@@ -211,6 +187,6 @@ export interface FileUploadParams {
|
|
|
211
187
|
name?: string | null;
|
|
212
188
|
}
|
|
213
189
|
export declare namespace Files {
|
|
214
|
-
export { type FileListResponse as FileListResponse, type FileUploadResponse as FileUploadResponse, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileUploadParams as FileUploadParams, };
|
|
190
|
+
export { type FileListResponse as FileListResponse, type FileUploadResponse as FileUploadResponse, type FileListResponsesArrayPage as FileListResponsesArrayPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileUploadParams as FileUploadParams, };
|
|
215
191
|
}
|
|
216
192
|
//# sourceMappingURL=files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/folders/files.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EAC7D,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Files = void 0;
|
|
5
5
|
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
6
7
|
const headers_1 = require("../../internal/headers.js");
|
|
7
8
|
const uploads_1 = require("../../internal/uploads.js");
|
|
8
9
|
const path_1 = require("../../internal/utils/path.js");
|
|
@@ -11,7 +12,10 @@ class Files extends resource_1.APIResource {
|
|
|
11
12
|
* List paginated files associated with a data folder.
|
|
12
13
|
*/
|
|
13
14
|
list(folderID, query = {}, options) {
|
|
14
|
-
return this._client.
|
|
15
|
+
return this._client.getAPIList((0, path_1.path) `/v1/folders/${folderID}/files`, (pagination_1.ArrayPage), {
|
|
16
|
+
query,
|
|
17
|
+
...options,
|
|
18
|
+
});
|
|
15
19
|
}
|
|
16
20
|
/**
|
|
17
21
|
* Delete a file from a folder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/folders/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/folders/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,yDAAqF;AAErF,uDAAsD;AAEtD,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,IAAI,CACF,QAAgB,EAChB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,QAAQ,EAAE,CAAA,sBAA2B,CAAA,EAAE;YAC/F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,eAAe,SAAS,IAAI,MAAM,EAAE,EAAE;YACnE,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,QAAgB,EAChB,MAAwB,EACxB,OAAwB;QAExB,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,eAAe,QAAQ,SAAS,EACpC,IAAA,qCAA2B,EAAC,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACrG,CAAC;IACJ,CAAC;CACF;AAxCD,sBAwCC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { ArrayPage } from "../../core/pagination.mjs";
|
|
3
4
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
4
5
|
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
5
6
|
import { path } from "../../internal/utils/path.mjs";
|
|
@@ -8,7 +9,10 @@ export class Files extends APIResource {
|
|
|
8
9
|
* List paginated files associated with a data folder.
|
|
9
10
|
*/
|
|
10
11
|
list(folderID, query = {}, options) {
|
|
11
|
-
return this._client.
|
|
12
|
+
return this._client.getAPIList(path `/v1/folders/${folderID}/files`, (ArrayPage), {
|
|
13
|
+
query,
|
|
14
|
+
...options,
|
|
15
|
+
});
|
|
12
16
|
}
|
|
13
17
|
/**
|
|
14
18
|
* Delete a file from a folder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/folders/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/folders/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,SAAS,EAAqC;OAEhD,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,IAAI,CACF,QAAgB,EAChB,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAA,eAAe,QAAQ,QAAQ,EAAE,CAAA,SAA2B,CAAA,EAAE;YAC/F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,MAAwB,EAAE,OAAwB;QACvE,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;QAC7B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,eAAe,SAAS,IAAI,MAAM,EAAE,EAAE;YACnE,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SAC7D,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,QAAgB,EAChB,MAAwB,EACxB,OAAwB;QAExB,MAAM,EAAE,kBAAkB,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,eAAe,QAAQ,SAAS,EACpC,2BAA2B,CAAC,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CACrG,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -2,9 +2,10 @@ import { APIResource } from "../../core/resource.mjs";
|
|
|
2
2
|
import * as AgentsAPI from "./agents.mjs";
|
|
3
3
|
import { AgentListParams, AgentListResponse, Agents } from "./agents.mjs";
|
|
4
4
|
import * as FilesAPI from "./files.mjs";
|
|
5
|
-
import { FileDeleteParams, FileListParams, FileListResponse, FileUploadParams, FileUploadResponse, Files } from "./files.mjs";
|
|
5
|
+
import { FileDeleteParams, FileListParams, FileListResponse, FileListResponsesArrayPage, FileUploadParams, FileUploadResponse, Files } from "./files.mjs";
|
|
6
6
|
import * as ModelsAPI from "../models/models.mjs";
|
|
7
7
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
8
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
8
9
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
9
10
|
export declare class Folders extends APIResource {
|
|
10
11
|
files: FilesAPI.Files;
|
|
@@ -20,30 +21,25 @@ export declare class Folders extends APIResource {
|
|
|
20
21
|
/**
|
|
21
22
|
* List all data folders created by a user.
|
|
22
23
|
*/
|
|
23
|
-
list(query?: FolderListParams | null | undefined, options?: RequestOptions):
|
|
24
|
+
list(query?: FolderListParams | null | undefined, options?: RequestOptions): PagePromise<FoldersArrayPage, Folder>;
|
|
24
25
|
/**
|
|
25
26
|
* Delete a data folder.
|
|
26
27
|
*/
|
|
27
28
|
delete(folderID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
28
|
-
/**
|
|
29
|
-
* Count all data folders created by a user.
|
|
30
|
-
*/
|
|
31
|
-
count(options?: RequestOptions): APIPromise<FolderCountResponse>;
|
|
32
29
|
/**
|
|
33
30
|
* Update the name or documentation of an existing data folder.
|
|
34
31
|
*/
|
|
35
32
|
modify(folderID: string, body: FolderModifyParams, options?: RequestOptions): APIPromise<Folder>;
|
|
36
33
|
}
|
|
34
|
+
export type FoldersArrayPage = ArrayPage<Folder>;
|
|
37
35
|
/**
|
|
38
36
|
* Representation of a folder, which is a collection of files and passages.
|
|
39
|
-
*
|
|
40
|
-
* Parameters: id (str): The ID of the folder name (str): The name of the folder.
|
|
41
|
-
* embedding_config (EmbeddingConfig): The embedding configuration used by the
|
|
42
|
-
* folder. user_id (str): The ID of the user that created the folder. metadata
|
|
43
|
-
* (dict): Metadata associated with the folder. description (str): The description
|
|
44
|
-
* of the folder.
|
|
45
37
|
*/
|
|
46
38
|
export interface Folder {
|
|
39
|
+
/**
|
|
40
|
+
* The human-friendly ID of the Source
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
47
43
|
/**
|
|
48
44
|
* The embedding configuration used by the folder.
|
|
49
45
|
*/
|
|
@@ -52,10 +48,6 @@ export interface Folder {
|
|
|
52
48
|
* The name of the folder.
|
|
53
49
|
*/
|
|
54
50
|
name: string;
|
|
55
|
-
/**
|
|
56
|
-
* The human-friendly ID of the Source
|
|
57
|
-
*/
|
|
58
|
-
id?: string;
|
|
59
51
|
/**
|
|
60
52
|
* The timestamp when the folder was created.
|
|
61
53
|
*/
|
|
@@ -87,9 +79,7 @@ export interface Folder {
|
|
|
87
79
|
*/
|
|
88
80
|
updated_at?: string | null;
|
|
89
81
|
}
|
|
90
|
-
export type FolderListResponse = Array<Folder>;
|
|
91
82
|
export type FolderDeleteResponse = unknown;
|
|
92
|
-
export type FolderCountResponse = number;
|
|
93
83
|
export interface FolderCreateParams {
|
|
94
84
|
/**
|
|
95
85
|
* The name of the source.
|
|
@@ -122,34 +112,11 @@ export interface FolderCreateParams {
|
|
|
122
112
|
[key: string]: unknown;
|
|
123
113
|
} | null;
|
|
124
114
|
}
|
|
125
|
-
export interface FolderListParams {
|
|
126
|
-
/**
|
|
127
|
-
* Folder ID cursor for pagination. Returns folders that come after this folder ID
|
|
128
|
-
* in the specified sort order
|
|
129
|
-
*/
|
|
130
|
-
after?: string | null;
|
|
131
|
-
/**
|
|
132
|
-
* Folder ID cursor for pagination. Returns folders that come before this folder ID
|
|
133
|
-
* in the specified sort order
|
|
134
|
-
*/
|
|
135
|
-
before?: string | null;
|
|
136
|
-
/**
|
|
137
|
-
* Maximum number of folders to return
|
|
138
|
-
*/
|
|
139
|
-
limit?: number | null;
|
|
115
|
+
export interface FolderListParams extends ArrayPageParams {
|
|
140
116
|
/**
|
|
141
117
|
* Folder name to filter by
|
|
142
118
|
*/
|
|
143
119
|
name?: string | null;
|
|
144
|
-
/**
|
|
145
|
-
* Sort order for folders by creation time. 'asc' for oldest first, 'desc' for
|
|
146
|
-
* newest first
|
|
147
|
-
*/
|
|
148
|
-
order?: 'asc' | 'desc';
|
|
149
|
-
/**
|
|
150
|
-
* Field to sort by
|
|
151
|
-
*/
|
|
152
|
-
order_by?: 'created_at';
|
|
153
120
|
}
|
|
154
121
|
export interface FolderModifyParams {
|
|
155
122
|
/**
|
|
@@ -176,8 +143,8 @@ export interface FolderModifyParams {
|
|
|
176
143
|
name?: string | null;
|
|
177
144
|
}
|
|
178
145
|
export declare namespace Folders {
|
|
179
|
-
export { type Folder as Folder, type
|
|
180
|
-
export { Files as Files, type FileListResponse as FileListResponse, type FileUploadResponse as FileUploadResponse, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileUploadParams as FileUploadParams, };
|
|
146
|
+
export { type Folder as Folder, type FolderDeleteResponse as FolderDeleteResponse, type FoldersArrayPage as FoldersArrayPage, type FolderCreateParams as FolderCreateParams, type FolderListParams as FolderListParams, type FolderModifyParams as FolderModifyParams, };
|
|
147
|
+
export { Files as Files, type FileListResponse as FileListResponse, type FileUploadResponse as FileUploadResponse, type FileListResponsesArrayPage as FileListResponsesArrayPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileUploadParams as FileUploadParams, };
|
|
181
148
|
export { Agents as Agents, type AgentListResponse as AgentListResponse, type AgentListParams as AgentListParams, };
|
|
182
149
|
}
|
|
183
150
|
//# sourceMappingURL=folders.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folders.d.mts","sourceRoot":"","sources":["../../src/resources/folders/folders.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE;OAC9C,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACN;OACM,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IACzD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAI9E;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;IAIxE;;OAEG;IACH,IAAI,CACF,KAAK,GAAE,gBAAgB,GAAG,IAAI,GAAG,SAAc,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,
|
|
1
|
+
{"version":3,"file":"folders.d.mts","sourceRoot":"","sources":["../../src/resources/folders/folders.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf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B;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC;IAEpD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAE7C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAKD,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,MAAM,IAAI,MAAM,EACrB,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -2,9 +2,10 @@ import { APIResource } from "../../core/resource.js";
|
|
|
2
2
|
import * as AgentsAPI from "./agents.js";
|
|
3
3
|
import { AgentListParams, AgentListResponse, Agents } from "./agents.js";
|
|
4
4
|
import * as FilesAPI from "./files.js";
|
|
5
|
-
import { FileDeleteParams, FileListParams, FileListResponse, FileUploadParams, FileUploadResponse, Files } from "./files.js";
|
|
5
|
+
import { FileDeleteParams, FileListParams, FileListResponse, FileListResponsesArrayPage, FileUploadParams, FileUploadResponse, Files } from "./files.js";
|
|
6
6
|
import * as ModelsAPI from "../models/models.js";
|
|
7
7
|
import { APIPromise } from "../../core/api-promise.js";
|
|
8
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from "../../core/pagination.js";
|
|
8
9
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
9
10
|
export declare class Folders extends APIResource {
|
|
10
11
|
files: FilesAPI.Files;
|
|
@@ -20,30 +21,25 @@ export declare class Folders extends APIResource {
|
|
|
20
21
|
/**
|
|
21
22
|
* List all data folders created by a user.
|
|
22
23
|
*/
|
|
23
|
-
list(query?: FolderListParams | null | undefined, options?: RequestOptions):
|
|
24
|
+
list(query?: FolderListParams | null | undefined, options?: RequestOptions): PagePromise<FoldersArrayPage, Folder>;
|
|
24
25
|
/**
|
|
25
26
|
* Delete a data folder.
|
|
26
27
|
*/
|
|
27
28
|
delete(folderID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
28
|
-
/**
|
|
29
|
-
* Count all data folders created by a user.
|
|
30
|
-
*/
|
|
31
|
-
count(options?: RequestOptions): APIPromise<FolderCountResponse>;
|
|
32
29
|
/**
|
|
33
30
|
* Update the name or documentation of an existing data folder.
|
|
34
31
|
*/
|
|
35
32
|
modify(folderID: string, body: FolderModifyParams, options?: RequestOptions): APIPromise<Folder>;
|
|
36
33
|
}
|
|
34
|
+
export type FoldersArrayPage = ArrayPage<Folder>;
|
|
37
35
|
/**
|
|
38
36
|
* Representation of a folder, which is a collection of files and passages.
|
|
39
|
-
*
|
|
40
|
-
* Parameters: id (str): The ID of the folder name (str): The name of the folder.
|
|
41
|
-
* embedding_config (EmbeddingConfig): The embedding configuration used by the
|
|
42
|
-
* folder. user_id (str): The ID of the user that created the folder. metadata
|
|
43
|
-
* (dict): Metadata associated with the folder. description (str): The description
|
|
44
|
-
* of the folder.
|
|
45
37
|
*/
|
|
46
38
|
export interface Folder {
|
|
39
|
+
/**
|
|
40
|
+
* The human-friendly ID of the Source
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
47
43
|
/**
|
|
48
44
|
* The embedding configuration used by the folder.
|
|
49
45
|
*/
|
|
@@ -52,10 +48,6 @@ export interface Folder {
|
|
|
52
48
|
* The name of the folder.
|
|
53
49
|
*/
|
|
54
50
|
name: string;
|
|
55
|
-
/**
|
|
56
|
-
* The human-friendly ID of the Source
|
|
57
|
-
*/
|
|
58
|
-
id?: string;
|
|
59
51
|
/**
|
|
60
52
|
* The timestamp when the folder was created.
|
|
61
53
|
*/
|
|
@@ -87,9 +79,7 @@ export interface Folder {
|
|
|
87
79
|
*/
|
|
88
80
|
updated_at?: string | null;
|
|
89
81
|
}
|
|
90
|
-
export type FolderListResponse = Array<Folder>;
|
|
91
82
|
export type FolderDeleteResponse = unknown;
|
|
92
|
-
export type FolderCountResponse = number;
|
|
93
83
|
export interface FolderCreateParams {
|
|
94
84
|
/**
|
|
95
85
|
* The name of the source.
|
|
@@ -122,34 +112,11 @@ export interface FolderCreateParams {
|
|
|
122
112
|
[key: string]: unknown;
|
|
123
113
|
} | null;
|
|
124
114
|
}
|
|
125
|
-
export interface FolderListParams {
|
|
126
|
-
/**
|
|
127
|
-
* Folder ID cursor for pagination. Returns folders that come after this folder ID
|
|
128
|
-
* in the specified sort order
|
|
129
|
-
*/
|
|
130
|
-
after?: string | null;
|
|
131
|
-
/**
|
|
132
|
-
* Folder ID cursor for pagination. Returns folders that come before this folder ID
|
|
133
|
-
* in the specified sort order
|
|
134
|
-
*/
|
|
135
|
-
before?: string | null;
|
|
136
|
-
/**
|
|
137
|
-
* Maximum number of folders to return
|
|
138
|
-
*/
|
|
139
|
-
limit?: number | null;
|
|
115
|
+
export interface FolderListParams extends ArrayPageParams {
|
|
140
116
|
/**
|
|
141
117
|
* Folder name to filter by
|
|
142
118
|
*/
|
|
143
119
|
name?: string | null;
|
|
144
|
-
/**
|
|
145
|
-
* Sort order for folders by creation time. 'asc' for oldest first, 'desc' for
|
|
146
|
-
* newest first
|
|
147
|
-
*/
|
|
148
|
-
order?: 'asc' | 'desc';
|
|
149
|
-
/**
|
|
150
|
-
* Field to sort by
|
|
151
|
-
*/
|
|
152
|
-
order_by?: 'created_at';
|
|
153
120
|
}
|
|
154
121
|
export interface FolderModifyParams {
|
|
155
122
|
/**
|
|
@@ -176,8 +143,8 @@ export interface FolderModifyParams {
|
|
|
176
143
|
name?: string | null;
|
|
177
144
|
}
|
|
178
145
|
export declare namespace Folders {
|
|
179
|
-
export { type Folder as Folder, type
|
|
180
|
-
export { Files as Files, type FileListResponse as FileListResponse, type FileUploadResponse as FileUploadResponse, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileUploadParams as FileUploadParams, };
|
|
146
|
+
export { type Folder as Folder, type FolderDeleteResponse as FolderDeleteResponse, type FoldersArrayPage as FoldersArrayPage, type FolderCreateParams as FolderCreateParams, type FolderListParams as FolderListParams, type FolderModifyParams as FolderModifyParams, };
|
|
147
|
+
export { Files as Files, type FileListResponse as FileListResponse, type FileUploadResponse as FileUploadResponse, type FileListResponsesArrayPage as FileListResponsesArrayPage, type FileListParams as FileListParams, type FileDeleteParams as FileDeleteParams, type FileUploadParams as FileUploadParams, };
|
|
181
148
|
export { Agents as Agents, type AgentListResponse as AgentListResponse, type AgentListParams as AgentListParams, };
|
|
182
149
|
}
|
|
183
150
|
//# sourceMappingURL=folders.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folders.d.ts","sourceRoot":"","sources":["../../src/resources/folders/folders.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,EAAE;OAC9C,KAAK,QAAQ;OACb,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,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gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -8,6 +8,7 @@ const AgentsAPI = tslib_1.__importStar(require("./agents.js"));
|
|
|
8
8
|
const agents_1 = require("./agents.js");
|
|
9
9
|
const FilesAPI = tslib_1.__importStar(require("./files.js"));
|
|
10
10
|
const files_1 = require("./files.js");
|
|
11
|
+
const pagination_1 = require("../../core/pagination.js");
|
|
11
12
|
const path_1 = require("../../internal/utils/path.js");
|
|
12
13
|
class Folders extends resource_1.APIResource {
|
|
13
14
|
constructor() {
|
|
@@ -31,7 +32,7 @@ class Folders extends resource_1.APIResource {
|
|
|
31
32
|
* List all data folders created by a user.
|
|
32
33
|
*/
|
|
33
34
|
list(query = {}, options) {
|
|
34
|
-
return this._client.
|
|
35
|
+
return this._client.getAPIList('/v1/folders/', (pagination_1.ArrayPage), { query, ...options });
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
38
|
* Delete a data folder.
|
|
@@ -39,12 +40,6 @@ class Folders extends resource_1.APIResource {
|
|
|
39
40
|
delete(folderID, options) {
|
|
40
41
|
return this._client.delete((0, path_1.path) `/v1/folders/${folderID}`, options);
|
|
41
42
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Count all data folders created by a user.
|
|
44
|
-
*/
|
|
45
|
-
count(options) {
|
|
46
|
-
return this._client.get('/v1/folders/count', options);
|
|
47
|
-
}
|
|
48
43
|
/**
|
|
49
44
|
* Update the name or documentation of an existing data folder.
|
|
50
45
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folders.js","sourceRoot":"","sources":["../../src/resources/folders/folders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAsE;AACtE,6DAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"folders.js","sourceRoot":"","sources":["../../src/resources/folders/folders.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAAsE;AACtE,6DAAoC;AACpC,sCAQiB;AAGjB,yDAAqF;AAErF,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuChE,CAAC;IArCC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,sBAAiB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAgB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAgB,EAAE,IAAwB,EAAE,OAAwB;QACzE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,eAAe,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAzCD,0BAyCC;AAoID,OAAO,CAAC,KAAK,GAAG,aAAK,CAAC;AACtB,OAAO,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -4,6 +4,7 @@ import * as AgentsAPI from "./agents.mjs";
|
|
|
4
4
|
import { Agents } from "./agents.mjs";
|
|
5
5
|
import * as FilesAPI from "./files.mjs";
|
|
6
6
|
import { Files, } from "./files.mjs";
|
|
7
|
+
import { ArrayPage } from "../../core/pagination.mjs";
|
|
7
8
|
import { path } from "../../internal/utils/path.mjs";
|
|
8
9
|
export class Folders extends APIResource {
|
|
9
10
|
constructor() {
|
|
@@ -27,7 +28,7 @@ export class Folders extends APIResource {
|
|
|
27
28
|
* List all data folders created by a user.
|
|
28
29
|
*/
|
|
29
30
|
list(query = {}, options) {
|
|
30
|
-
return this._client.
|
|
31
|
+
return this._client.getAPIList('/v1/folders/', (ArrayPage), { query, ...options });
|
|
31
32
|
}
|
|
32
33
|
/**
|
|
33
34
|
* Delete a data folder.
|
|
@@ -35,12 +36,6 @@ export class Folders extends APIResource {
|
|
|
35
36
|
delete(folderID, options) {
|
|
36
37
|
return this._client.delete(path `/v1/folders/${folderID}`, options);
|
|
37
38
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Count all data folders created by a user.
|
|
40
|
-
*/
|
|
41
|
-
count(options) {
|
|
42
|
-
return this._client.get('/v1/folders/count', options);
|
|
43
|
-
}
|
|
44
39
|
/**
|
|
45
40
|
* Update the name or documentation of an existing data folder.
|
|
46
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"folders.mjs","sourceRoot":"","sources":["../../src/resources/folders/folders.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAsC,MAAM,EAAE;OAC9C,KAAK,QAAQ;OACb,
|
|
1
|
+
{"version":3,"file":"folders.mjs","sourceRoot":"","sources":["../../src/resources/folders/folders.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAsC,MAAM,EAAE;OAC9C,KAAK,QAAQ;OACb,EAOL,KAAK,GACN;OAGM,EAAE,SAAS,EAAqC;OAEhD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuChE,CAAC;IArCC;;OAEG;IACH,MAAM,CAAC,IAAwB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,QAAgB,EAAE,OAAwB;QACjD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,eAAe,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA6C,EAAE,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,SAAiB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