@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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { APIResource } from '../core/resource';
|
|
4
4
|
import * as ModelsAPI from './models/models';
|
|
5
5
|
import { APIPromise } from '../core/api-promise';
|
|
6
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../internal/request-options';
|
|
7
8
|
import { path } from '../internal/utils/path';
|
|
8
9
|
|
|
@@ -28,8 +29,8 @@ export class Archives extends APIResource {
|
|
|
28
29
|
list(
|
|
29
30
|
query: ArchiveListParams | null | undefined = {},
|
|
30
31
|
options?: RequestOptions,
|
|
31
|
-
):
|
|
32
|
-
return this._client.
|
|
32
|
+
): PagePromise<ArchivesArrayPage, Archive> {
|
|
33
|
+
return this._client.getAPIList('/v1/archives/', ArrayPage<Archive>, { query, ...options });
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -47,17 +48,18 @@ export class Archives extends APIResource {
|
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
export type ArchivesArrayPage = ArrayPage<Archive>;
|
|
52
|
+
|
|
50
53
|
/**
|
|
51
54
|
* Representation of an archive - a collection of archival passages that can be
|
|
52
55
|
* shared between agents.
|
|
53
|
-
*
|
|
54
|
-
* Parameters: id (str): The unique identifier of the archive. name (str): The name
|
|
55
|
-
* of the archive. description (str): A description of the archive. organization_id
|
|
56
|
-
* (str): The organization this archive belongs to. created_at (datetime): The
|
|
57
|
-
* creation date of the archive. metadata (dict): Additional metadata for the
|
|
58
|
-
* archive.
|
|
59
56
|
*/
|
|
60
57
|
export interface Archive {
|
|
58
|
+
/**
|
|
59
|
+
* The human-friendly ID of the Archive
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
|
|
61
63
|
/**
|
|
62
64
|
* The creation date of the archive
|
|
63
65
|
*/
|
|
@@ -73,11 +75,6 @@ export interface Archive {
|
|
|
73
75
|
*/
|
|
74
76
|
name: string;
|
|
75
77
|
|
|
76
|
-
/**
|
|
77
|
-
* The human-friendly ID of the Archive
|
|
78
|
-
*/
|
|
79
|
-
id?: string;
|
|
80
|
-
|
|
81
78
|
/**
|
|
82
79
|
* The id of the user that made this object.
|
|
83
80
|
*/
|
|
@@ -114,8 +111,6 @@ export interface Archive {
|
|
|
114
111
|
*/
|
|
115
112
|
export type VectorDBProvider = 'native' | 'tpuf' | 'pinecone';
|
|
116
113
|
|
|
117
|
-
export type ArchiveListResponse = Array<Archive>;
|
|
118
|
-
|
|
119
114
|
export interface ArchiveCreateParams {
|
|
120
115
|
/**
|
|
121
116
|
* Embedding configuration for the archive
|
|
@@ -127,44 +122,16 @@ export interface ArchiveCreateParams {
|
|
|
127
122
|
description?: string | null;
|
|
128
123
|
}
|
|
129
124
|
|
|
130
|
-
export interface ArchiveListParams {
|
|
131
|
-
/**
|
|
132
|
-
* Archive ID cursor for pagination. Returns archives that come after this archive
|
|
133
|
-
* ID in the specified sort order
|
|
134
|
-
*/
|
|
135
|
-
after?: string | null;
|
|
136
|
-
|
|
125
|
+
export interface ArchiveListParams extends ArrayPageParams {
|
|
137
126
|
/**
|
|
138
127
|
* Only archives attached to this agent ID
|
|
139
128
|
*/
|
|
140
129
|
agent_id?: string | null;
|
|
141
130
|
|
|
142
|
-
/**
|
|
143
|
-
* Archive ID cursor for pagination. Returns archives that come before this archive
|
|
144
|
-
* ID in the specified sort order
|
|
145
|
-
*/
|
|
146
|
-
before?: string | null;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Maximum number of archives to return
|
|
150
|
-
*/
|
|
151
|
-
limit?: number | null;
|
|
152
|
-
|
|
153
131
|
/**
|
|
154
132
|
* Filter by archive name (exact match)
|
|
155
133
|
*/
|
|
156
134
|
name?: string | null;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Sort order for archives by creation time. 'asc' for oldest first, 'desc' for
|
|
160
|
-
* newest first
|
|
161
|
-
*/
|
|
162
|
-
order?: 'asc' | 'desc';
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Field to sort by
|
|
166
|
-
*/
|
|
167
|
-
order_by?: 'created_at';
|
|
168
135
|
}
|
|
169
136
|
|
|
170
137
|
export interface ArchiveModifyParams {
|
|
@@ -177,7 +144,7 @@ export declare namespace Archives {
|
|
|
177
144
|
export {
|
|
178
145
|
type Archive as Archive,
|
|
179
146
|
type VectorDBProvider as VectorDBProvider,
|
|
180
|
-
type
|
|
147
|
+
type ArchivesArrayPage as ArchivesArrayPage,
|
|
181
148
|
type ArchiveCreateParams as ArchiveCreateParams,
|
|
182
149
|
type ArchiveListParams as ArchiveListParams,
|
|
183
150
|
type ArchiveModifyParams as ArchiveModifyParams,
|
|
@@ -4,9 +4,10 @@ import { APIResource } from '../../core/resource';
|
|
|
4
4
|
import * as AgentsAPI from '../agents/agents';
|
|
5
5
|
import * as MessagesAPI from '../agents/messages';
|
|
6
6
|
import * as BatchesMessagesAPI from './messages';
|
|
7
|
-
import { MessageListParams,
|
|
7
|
+
import { MessageListParams, Messages } from './messages';
|
|
8
8
|
import * as RunsAPI from '../runs/runs';
|
|
9
9
|
import { APIPromise } from '../../core/api-promise';
|
|
10
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
10
11
|
import { RequestOptions } from '../../internal/request-options';
|
|
11
12
|
import { path } from '../../internal/utils/path';
|
|
12
13
|
|
|
@@ -36,8 +37,8 @@ export class Batches extends APIResource {
|
|
|
36
37
|
list(
|
|
37
38
|
query: BatchListParams | null | undefined = {},
|
|
38
39
|
options?: RequestOptions,
|
|
39
|
-
):
|
|
40
|
-
return this._client.
|
|
40
|
+
): PagePromise<BatchJobsArrayPage, BatchJob> {
|
|
41
|
+
return this._client.getAPIList('/v1/messages/batches', ArrayPage<BatchJob>, { query, ...options });
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
/**
|
|
@@ -48,11 +49,13 @@ export class Batches extends APIResource {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
export type BatchJobsArrayPage = ArrayPage<BatchJob>;
|
|
53
|
+
|
|
51
54
|
export interface BatchJob {
|
|
52
55
|
/**
|
|
53
56
|
* The human-friendly ID of the Job
|
|
54
57
|
*/
|
|
55
|
-
id
|
|
58
|
+
id: string;
|
|
56
59
|
|
|
57
60
|
/**
|
|
58
61
|
* The agent associated with this job/run.
|
|
@@ -137,8 +140,6 @@ export interface BatchJob {
|
|
|
137
140
|
updated_at?: string | null;
|
|
138
141
|
}
|
|
139
142
|
|
|
140
|
-
export type BatchListResponse = Array<BatchJob>;
|
|
141
|
-
|
|
142
143
|
export type BatchCancelResponse = unknown;
|
|
143
144
|
|
|
144
145
|
export interface BatchCreateParams {
|
|
@@ -268,50 +269,18 @@ export namespace BatchCreateParams {
|
|
|
268
269
|
}
|
|
269
270
|
}
|
|
270
271
|
|
|
271
|
-
export interface BatchListParams {
|
|
272
|
-
/**
|
|
273
|
-
* Job ID cursor for pagination. Returns jobs that come after this job ID in the
|
|
274
|
-
* specified sort order
|
|
275
|
-
*/
|
|
276
|
-
after?: string | null;
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Job ID cursor for pagination. Returns jobs that come before this job ID in the
|
|
280
|
-
* specified sort order
|
|
281
|
-
*/
|
|
282
|
-
before?: string | null;
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Maximum number of jobs to return
|
|
286
|
-
*/
|
|
287
|
-
limit?: number | null;
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Sort order for jobs by creation time. 'asc' for oldest first, 'desc' for newest
|
|
291
|
-
* first
|
|
292
|
-
*/
|
|
293
|
-
order?: 'asc' | 'desc';
|
|
294
|
-
|
|
295
|
-
/**
|
|
296
|
-
* Field to sort by
|
|
297
|
-
*/
|
|
298
|
-
order_by?: 'created_at';
|
|
299
|
-
}
|
|
272
|
+
export interface BatchListParams extends ArrayPageParams {}
|
|
300
273
|
|
|
301
274
|
Batches.Messages = Messages;
|
|
302
275
|
|
|
303
276
|
export declare namespace Batches {
|
|
304
277
|
export {
|
|
305
278
|
type BatchJob as BatchJob,
|
|
306
|
-
type BatchListResponse as BatchListResponse,
|
|
307
279
|
type BatchCancelResponse as BatchCancelResponse,
|
|
280
|
+
type BatchJobsArrayPage as BatchJobsArrayPage,
|
|
308
281
|
type BatchCreateParams as BatchCreateParams,
|
|
309
282
|
type BatchListParams as BatchListParams,
|
|
310
283
|
};
|
|
311
284
|
|
|
312
|
-
export {
|
|
313
|
-
Messages as Messages,
|
|
314
|
-
type MessageListResponse as MessageListResponse,
|
|
315
|
-
type MessageListParams as MessageListParams,
|
|
316
|
-
};
|
|
285
|
+
export { Messages as Messages, type MessageListParams as MessageListParams };
|
|
317
286
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
export {
|
|
4
4
|
Batches,
|
|
5
5
|
type BatchJob,
|
|
6
|
-
type BatchListResponse,
|
|
7
6
|
type BatchCancelResponse,
|
|
8
7
|
type BatchCreateParams,
|
|
9
8
|
type BatchListParams,
|
|
9
|
+
type BatchJobsArrayPage,
|
|
10
10
|
} from './batches';
|
|
11
|
-
export { Messages, type
|
|
11
|
+
export { Messages, type MessageListParams } from './messages';
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as MessagesAPI from '../agents/messages';
|
|
5
|
-
import {
|
|
5
|
+
import { MessagesObjectPage } from '../agents/messages';
|
|
6
|
+
import { ObjectPage, type ObjectPageParams, PagePromise } from '../../core/pagination';
|
|
6
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
7
8
|
import { path } from '../../internal/utils/path';
|
|
8
9
|
|
|
@@ -14,50 +15,24 @@ export class Messages extends APIResource {
|
|
|
14
15
|
batchID: string,
|
|
15
16
|
query: MessageListParams | null | undefined = {},
|
|
16
17
|
options?: RequestOptions,
|
|
17
|
-
):
|
|
18
|
-
return this._client.
|
|
18
|
+
): PagePromise<MessagesObjectPage, MessagesAPI.Message> {
|
|
19
|
+
return this._client.getAPIList(
|
|
20
|
+
path`/v1/messages/batches/${batchID}/messages`,
|
|
21
|
+
ObjectPage<MessagesAPI.Message>,
|
|
22
|
+
{ query, ...options },
|
|
23
|
+
);
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
26
|
|
|
22
|
-
export interface
|
|
23
|
-
messages: Array<MessagesAPI.Message>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface MessageListParams {
|
|
27
|
-
/**
|
|
28
|
-
* Message ID cursor for pagination. Returns messages that come after this message
|
|
29
|
-
* ID in the specified sort order
|
|
30
|
-
*/
|
|
31
|
-
after?: string | null;
|
|
32
|
-
|
|
27
|
+
export interface MessageListParams extends ObjectPageParams {
|
|
33
28
|
/**
|
|
34
29
|
* Filter messages by agent ID
|
|
35
30
|
*/
|
|
36
31
|
agent_id?: string | null;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Message ID cursor for pagination. Returns messages that come before this message
|
|
40
|
-
* ID in the specified sort order
|
|
41
|
-
*/
|
|
42
|
-
before?: string | null;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Maximum number of messages to return
|
|
46
|
-
*/
|
|
47
|
-
limit?: number | null;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Sort order for messages by creation time. 'asc' for oldest first, 'desc' for
|
|
51
|
-
* newest first
|
|
52
|
-
*/
|
|
53
|
-
order?: 'asc' | 'desc';
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Field to sort by
|
|
57
|
-
*/
|
|
58
|
-
order_by?: 'created_at';
|
|
59
32
|
}
|
|
60
33
|
|
|
61
34
|
export declare namespace Messages {
|
|
62
|
-
export { type
|
|
35
|
+
export { type MessageListParams as MessageListParams };
|
|
63
36
|
}
|
|
37
|
+
|
|
38
|
+
export { type MessagesObjectPage };
|
|
@@ -42,13 +42,6 @@ export class Blocks extends APIResource {
|
|
|
42
42
|
return this._client.delete(path`/v1/blocks/${blockID}`, options);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* Count all blocks created by a user.
|
|
47
|
-
*/
|
|
48
|
-
count(options?: RequestOptions): APIPromise<BlockCountResponse> {
|
|
49
|
-
return this._client.get('/v1/blocks/count', options);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
45
|
/**
|
|
53
46
|
* Modify Block
|
|
54
47
|
*/
|
|
@@ -230,8 +223,6 @@ export interface CreateBlock {
|
|
|
230
223
|
|
|
231
224
|
export type BlockDeleteResponse = unknown;
|
|
232
225
|
|
|
233
|
-
export type BlockCountResponse = number;
|
|
234
|
-
|
|
235
226
|
export interface BlockCreateParams {
|
|
236
227
|
/**
|
|
237
228
|
* Label of the block.
|
|
@@ -457,7 +448,6 @@ export declare namespace Blocks {
|
|
|
457
448
|
type BlockResponse as BlockResponse,
|
|
458
449
|
type CreateBlock as CreateBlock,
|
|
459
450
|
type BlockDeleteResponse as BlockDeleteResponse,
|
|
460
|
-
type BlockCountResponse as BlockCountResponse,
|
|
461
451
|
type BlockResponsesArrayPage as BlockResponsesArrayPage,
|
|
462
452
|
type BlockCreateParams as BlockCreateParams,
|
|
463
453
|
type BlockListParams as BlockListParams,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
5
6
|
import { type Uploadable } from '../../core/uploads';
|
|
6
7
|
import { buildHeaders } from '../../internal/headers';
|
|
7
8
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -16,8 +17,11 @@ export class Files extends APIResource {
|
|
|
16
17
|
folderID: string,
|
|
17
18
|
query: FileListParams | null | undefined = {},
|
|
18
19
|
options?: RequestOptions,
|
|
19
|
-
):
|
|
20
|
-
return this._client.
|
|
20
|
+
): PagePromise<FileListResponsesArrayPage, FileListResponse> {
|
|
21
|
+
return this._client.getAPIList(path`/v1/folders/${folderID}/files`, ArrayPage<FileListResponse>, {
|
|
22
|
+
query,
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
/**
|
|
@@ -47,110 +51,21 @@ export class Files extends APIResource {
|
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
export type
|
|
51
|
-
|
|
52
|
-
export namespace FileListResponse {
|
|
53
|
-
/**
|
|
54
|
-
* Representation of a single FileMetadata
|
|
55
|
-
*/
|
|
56
|
-
export interface FileListResponseItem {
|
|
57
|
-
/**
|
|
58
|
-
* The unique identifier of the source associated with the document.
|
|
59
|
-
*/
|
|
60
|
-
source_id: string;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The human-friendly ID of the File
|
|
64
|
-
*/
|
|
65
|
-
id?: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Number of chunks that have been embedded.
|
|
69
|
-
*/
|
|
70
|
-
chunks_embedded?: number | null;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Optional full-text content of the file; only populated on demand due to its
|
|
74
|
-
* size.
|
|
75
|
-
*/
|
|
76
|
-
content?: string | null;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The creation date of the file.
|
|
80
|
-
*/
|
|
81
|
-
created_at?: string | null;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Optional error message if the file failed processing.
|
|
85
|
-
*/
|
|
86
|
-
error_message?: string | null;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* The creation date of the file.
|
|
90
|
-
*/
|
|
91
|
-
file_creation_date?: string | null;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The last modified date of the file.
|
|
95
|
-
*/
|
|
96
|
-
file_last_modified_date?: string | null;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* The name of the file.
|
|
100
|
-
*/
|
|
101
|
-
file_name?: string | null;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* The path to the file.
|
|
105
|
-
*/
|
|
106
|
-
file_path?: string | null;
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* The size of the file in bytes.
|
|
110
|
-
*/
|
|
111
|
-
file_size?: number | null;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* The type of the file (MIME type).
|
|
115
|
-
*/
|
|
116
|
-
file_type?: string | null;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* The original name of the file as uploaded.
|
|
120
|
-
*/
|
|
121
|
-
original_file_name?: string | null;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* The current processing status of the file (e.g. pending, parsing, embedding,
|
|
125
|
-
* completed, error).
|
|
126
|
-
*/
|
|
127
|
-
processing_status?: 'pending' | 'parsing' | 'embedding' | 'completed' | 'error';
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Total number of chunks for the file.
|
|
131
|
-
*/
|
|
132
|
-
total_chunks?: number | null;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* The update date of the file.
|
|
136
|
-
*/
|
|
137
|
-
updated_at?: string | null;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
54
|
+
export type FileListResponsesArrayPage = ArrayPage<FileListResponse>;
|
|
140
55
|
|
|
141
56
|
/**
|
|
142
57
|
* Representation of a single FileMetadata
|
|
143
58
|
*/
|
|
144
|
-
export interface
|
|
59
|
+
export interface FileListResponse {
|
|
145
60
|
/**
|
|
146
|
-
* The
|
|
61
|
+
* The human-friendly ID of the File
|
|
147
62
|
*/
|
|
148
|
-
|
|
63
|
+
id: string;
|
|
149
64
|
|
|
150
65
|
/**
|
|
151
|
-
* The
|
|
66
|
+
* The unique identifier of the source associated with the document.
|
|
152
67
|
*/
|
|
153
|
-
|
|
68
|
+
source_id: string;
|
|
154
69
|
|
|
155
70
|
/**
|
|
156
71
|
* Number of chunks that have been embedded.
|
|
@@ -225,39 +140,98 @@ export interface FileUploadResponse {
|
|
|
225
140
|
updated_at?: string | null;
|
|
226
141
|
}
|
|
227
142
|
|
|
228
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Representation of a single FileMetadata
|
|
145
|
+
*/
|
|
146
|
+
export interface FileUploadResponse {
|
|
229
147
|
/**
|
|
230
|
-
*
|
|
231
|
-
* specified sort order
|
|
148
|
+
* The human-friendly ID of the File
|
|
232
149
|
*/
|
|
233
|
-
|
|
150
|
+
id: string;
|
|
234
151
|
|
|
235
152
|
/**
|
|
236
|
-
*
|
|
237
|
-
* the specified sort order
|
|
153
|
+
* The unique identifier of the source associated with the document.
|
|
238
154
|
*/
|
|
239
|
-
|
|
155
|
+
source_id: string;
|
|
240
156
|
|
|
241
157
|
/**
|
|
242
|
-
*
|
|
158
|
+
* Number of chunks that have been embedded.
|
|
243
159
|
*/
|
|
244
|
-
|
|
160
|
+
chunks_embedded?: number | null;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Optional full-text content of the file; only populated on demand due to its
|
|
164
|
+
* size.
|
|
165
|
+
*/
|
|
166
|
+
content?: string | null;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The creation date of the file.
|
|
170
|
+
*/
|
|
171
|
+
created_at?: string | null;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Optional error message if the file failed processing.
|
|
175
|
+
*/
|
|
176
|
+
error_message?: string | null;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The creation date of the file.
|
|
180
|
+
*/
|
|
181
|
+
file_creation_date?: string | null;
|
|
245
182
|
|
|
246
183
|
/**
|
|
247
|
-
*
|
|
184
|
+
* The last modified date of the file.
|
|
185
|
+
*/
|
|
186
|
+
file_last_modified_date?: string | null;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* The name of the file.
|
|
190
|
+
*/
|
|
191
|
+
file_name?: string | null;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The path to the file.
|
|
248
195
|
*/
|
|
249
|
-
|
|
196
|
+
file_path?: string | null;
|
|
250
197
|
|
|
251
198
|
/**
|
|
252
|
-
*
|
|
253
|
-
* first
|
|
199
|
+
* The size of the file in bytes.
|
|
254
200
|
*/
|
|
255
|
-
|
|
201
|
+
file_size?: number | null;
|
|
256
202
|
|
|
257
203
|
/**
|
|
258
|
-
*
|
|
204
|
+
* The type of the file (MIME type).
|
|
259
205
|
*/
|
|
260
|
-
|
|
206
|
+
file_type?: string | null;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The original name of the file as uploaded.
|
|
210
|
+
*/
|
|
211
|
+
original_file_name?: string | null;
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* The current processing status of the file (e.g. pending, parsing, embedding,
|
|
215
|
+
* completed, error).
|
|
216
|
+
*/
|
|
217
|
+
processing_status?: 'pending' | 'parsing' | 'embedding' | 'completed' | 'error';
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Total number of chunks for the file.
|
|
221
|
+
*/
|
|
222
|
+
total_chunks?: number | null;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The update date of the file.
|
|
226
|
+
*/
|
|
227
|
+
updated_at?: string | null;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface FileListParams extends ArrayPageParams {
|
|
231
|
+
/**
|
|
232
|
+
* Whether to include full file content
|
|
233
|
+
*/
|
|
234
|
+
include_content?: boolean;
|
|
261
235
|
}
|
|
262
236
|
|
|
263
237
|
export interface FileDeleteParams {
|
|
@@ -288,6 +262,7 @@ export declare namespace Files {
|
|
|
288
262
|
export {
|
|
289
263
|
type FileListResponse as FileListResponse,
|
|
290
264
|
type FileUploadResponse as FileUploadResponse,
|
|
265
|
+
type FileListResponsesArrayPage as FileListResponsesArrayPage,
|
|
291
266
|
type FileListParams as FileListParams,
|
|
292
267
|
type FileDeleteParams as FileDeleteParams,
|
|
293
268
|
type FileUploadParams as FileUploadParams,
|