@astralbeam/sdk 0.15.2 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -8
- package/dist/api-BaIPbj-Q.js +709 -0
- package/dist/api.d.ts +2 -2
- package/dist/api.js +2 -2
- package/dist/client.d.ts +21 -7
- package/dist/client.js +1 -1
- package/dist/{core-BGDo_tQ4.js → core-DeMY6_wQ.js} +2276 -203
- package/dist/core.d.ts +2 -2
- package/dist/core.js +1 -1
- package/dist/index-CfGnT6Od.d.ts +938 -0
- package/dist/{index-DUznpmNz.d.ts → index-NT05_Yw_.d.ts} +245 -69
- package/dist/listings-BH_hPkxx.js +1 -0
- package/dist/react.d.ts +14 -6
- package/dist/react.js +22 -7
- package/dist/rolldown-runtime-QTnfLwEv.js +1 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +6 -2
- package/dist/styles.generated-D8sDOLu3.js +98 -0
- package/dist/widget-BdiuWvPf.js +24 -0
- package/package.json +6 -6
- package/dist/api-DUe8JSVU.d.ts +0 -372
- package/dist/api-r11gRy91.js +0 -323
- package/dist/index-BVVgDSdq.d.ts +0 -1
- package/dist/listings-6eaCXB6G.js +0 -21
- package/dist/styles.generated-Bub4csY_.js +0 -60
- package/dist/widget-Bjm0sUjE.js +0 -26
|
@@ -0,0 +1,938 @@
|
|
|
1
|
+
//#region src/api/api.d.ts
|
|
2
|
+
interface ApiRequestOptions extends RequestInit {
|
|
3
|
+
apiUrl?: string | undefined;
|
|
4
|
+
fetchClient?: typeof globalThis.fetch;
|
|
5
|
+
}
|
|
6
|
+
type ApiKeyOptions = ApiRequestOptions & {
|
|
7
|
+
apiKey: string;
|
|
8
|
+
astralBeamToken?: never;
|
|
9
|
+
};
|
|
10
|
+
type JwtOptions = ApiRequestOptions & {
|
|
11
|
+
astralBeamToken: string;
|
|
12
|
+
apiKey?: never;
|
|
13
|
+
};
|
|
14
|
+
type ApiOptions = ApiKeyOptions | JwtOptions;
|
|
15
|
+
interface AstralBeamApiError$1 extends Error {
|
|
16
|
+
name: "AstralBeamApiError";
|
|
17
|
+
status: number;
|
|
18
|
+
headers: Headers;
|
|
19
|
+
body?: AstralBeamApiError;
|
|
20
|
+
}
|
|
21
|
+
declare function isAstralBeamApiError(error: unknown): error is AstralBeamApiError$1;
|
|
22
|
+
declare function astralBeamApiFetch<T>(path: string, options: ApiOptions): Promise<T>;
|
|
23
|
+
declare function astralBeamJwtFetch<T>(path: string, options: JwtOptions): Promise<T>;
|
|
24
|
+
declare function astralBeamResourceFetch<_T>(path: string, options: ApiOptions): Promise<Response>;
|
|
25
|
+
declare function astralBeamChatFetch<_T>(path: string, options: JwtOptions): Promise<Response>;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/api/generated/api.d.ts
|
|
28
|
+
type AstralBeamApiErrorIssuesItem = {
|
|
29
|
+
path: string;
|
|
30
|
+
message: string;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The usage limit a 429 reached, by its display name, and when it resets.
|
|
34
|
+
*/
|
|
35
|
+
type AstralBeamApiErrorUsageLimit = {
|
|
36
|
+
name: string;
|
|
37
|
+
resets_at: string;
|
|
38
|
+
};
|
|
39
|
+
interface AstralBeamApiError {
|
|
40
|
+
type: string;
|
|
41
|
+
title: string;
|
|
42
|
+
/**
|
|
43
|
+
* @minimum -9007199254740991
|
|
44
|
+
* @maximum 9007199254740991
|
|
45
|
+
*/
|
|
46
|
+
status: number;
|
|
47
|
+
detail: string;
|
|
48
|
+
issues?: AstralBeamApiErrorIssuesItem[];
|
|
49
|
+
/** The usage limit a 429 reached, by its display name, and when it resets. */
|
|
50
|
+
usage_limit?: AstralBeamApiErrorUsageLimit;
|
|
51
|
+
/** Identifies the server log entry of an internal error. Quote it for support. */
|
|
52
|
+
reference?: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Customer-defined JSON object; keys are preserved.
|
|
56
|
+
*/
|
|
57
|
+
type TenantRecordEncodedMetadata = {
|
|
58
|
+
[key: string]: unknown;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Persisted Tenant; id is internal, external_id is the customer's exact identity.
|
|
62
|
+
*/
|
|
63
|
+
interface TenantRecordEncoded {
|
|
64
|
+
id: string;
|
|
65
|
+
external_id: string;
|
|
66
|
+
name: string | null;
|
|
67
|
+
/** Customer-defined JSON object; keys are preserved. */
|
|
68
|
+
metadata: TenantRecordEncodedMetadata;
|
|
69
|
+
created_at: string;
|
|
70
|
+
updated_at: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Customer-defined JSON object; keys are preserved.
|
|
74
|
+
*/
|
|
75
|
+
type TenantUserRecordEncodedMetadata = {
|
|
76
|
+
[key: string]: unknown;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Persisted TenantUser. Stored admin does not grant or revoke signed JWT authority.
|
|
80
|
+
*/
|
|
81
|
+
interface TenantUserRecordEncoded {
|
|
82
|
+
id: string;
|
|
83
|
+
external_id: string;
|
|
84
|
+
name: string | null;
|
|
85
|
+
/** Customer-defined JSON object; keys are preserved. */
|
|
86
|
+
metadata: TenantUserRecordEncodedMetadata;
|
|
87
|
+
created_at: string;
|
|
88
|
+
updated_at: string;
|
|
89
|
+
tenant_id: string;
|
|
90
|
+
admin: boolean;
|
|
91
|
+
}
|
|
92
|
+
type CurrentUser = {
|
|
93
|
+
scope: "tenant";
|
|
94
|
+
organization: {
|
|
95
|
+
id: string;
|
|
96
|
+
};
|
|
97
|
+
tenant: TenantRecordEncoded;
|
|
98
|
+
user: TenantUserRecordEncoded;
|
|
99
|
+
} | {
|
|
100
|
+
scope: "organization";
|
|
101
|
+
organization: {
|
|
102
|
+
id: string;
|
|
103
|
+
};
|
|
104
|
+
user: {
|
|
105
|
+
id: string;
|
|
106
|
+
name: string;
|
|
107
|
+
email: string;
|
|
108
|
+
role: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
type ChatToolResultReceiptEncodedUsageLimit = {
|
|
112
|
+
name: string;
|
|
113
|
+
resets_at: string;
|
|
114
|
+
};
|
|
115
|
+
interface ChatToolResultReceiptEncoded {
|
|
116
|
+
thread_id: string;
|
|
117
|
+
accepted_message_id: string;
|
|
118
|
+
/**
|
|
119
|
+
* @minimum 0
|
|
120
|
+
* @maximum 9007199254740991
|
|
121
|
+
*/
|
|
122
|
+
thread_version: number;
|
|
123
|
+
usage_limit?: ChatToolResultReceiptEncodedUsageLimit;
|
|
124
|
+
}
|
|
125
|
+
type ResolveChatToolResultInputEncodedResultsItemOutcome = (typeof ResolveChatToolResultInputEncodedResultsItemOutcome)[keyof typeof ResolveChatToolResultInputEncodedResultsItemOutcome];
|
|
126
|
+
declare const ResolveChatToolResultInputEncodedResultsItemOutcome: {
|
|
127
|
+
readonly succeeded: "succeeded";
|
|
128
|
+
readonly failed: "failed";
|
|
129
|
+
readonly skipped: "skipped";
|
|
130
|
+
readonly unknown: "unknown";
|
|
131
|
+
};
|
|
132
|
+
type ResolveChatToolResultInputEncodedResultsItem = {
|
|
133
|
+
source_message_id: string; /** @minLength 1 */
|
|
134
|
+
source_part_id: string;
|
|
135
|
+
response_target_id: string;
|
|
136
|
+
outcome: ResolveChatToolResultInputEncodedResultsItemOutcome;
|
|
137
|
+
output: unknown;
|
|
138
|
+
};
|
|
139
|
+
interface ResolveChatToolResultInputEncoded {
|
|
140
|
+
/**
|
|
141
|
+
* @minItems 1
|
|
142
|
+
* @maxItems 100
|
|
143
|
+
*/
|
|
144
|
+
results: ResolveChatToolResultInputEncodedResultsItem[];
|
|
145
|
+
client_id: string;
|
|
146
|
+
/**
|
|
147
|
+
* @minLength 1
|
|
148
|
+
* @maxLength 200
|
|
149
|
+
*/
|
|
150
|
+
run_id?: string;
|
|
151
|
+
/**
|
|
152
|
+
* @minLength 1
|
|
153
|
+
* @maxLength 200
|
|
154
|
+
*/
|
|
155
|
+
parent_run_id?: string;
|
|
156
|
+
}
|
|
157
|
+
type ChatParticipantEncodedRole = (typeof ChatParticipantEncodedRole)[keyof typeof ChatParticipantEncodedRole];
|
|
158
|
+
declare const ChatParticipantEncodedRole: {
|
|
159
|
+
readonly viewer: "viewer";
|
|
160
|
+
readonly member: "member";
|
|
161
|
+
readonly manager: "manager";
|
|
162
|
+
};
|
|
163
|
+
interface ChatParticipantEncoded {
|
|
164
|
+
tenant_user_id: string;
|
|
165
|
+
role: ChatParticipantEncodedRole;
|
|
166
|
+
name: string | null;
|
|
167
|
+
external_id: string;
|
|
168
|
+
email: string | null;
|
|
169
|
+
}
|
|
170
|
+
type SetChatParticipantInputEncodedRole = (typeof SetChatParticipantInputEncodedRole)[keyof typeof SetChatParticipantInputEncodedRole];
|
|
171
|
+
declare const SetChatParticipantInputEncodedRole: {
|
|
172
|
+
readonly viewer: "viewer";
|
|
173
|
+
readonly member: "member";
|
|
174
|
+
readonly manager: "manager";
|
|
175
|
+
};
|
|
176
|
+
interface SetChatParticipantInputEncoded {
|
|
177
|
+
role: SetChatParticipantInputEncodedRole;
|
|
178
|
+
/**
|
|
179
|
+
* @minimum 0
|
|
180
|
+
* @maximum 9007199254740991
|
|
181
|
+
*/
|
|
182
|
+
expected_version: number;
|
|
183
|
+
}
|
|
184
|
+
interface ChatTenantUserEncoded {
|
|
185
|
+
id: string;
|
|
186
|
+
name: string | null;
|
|
187
|
+
external_id: string;
|
|
188
|
+
email: string | null;
|
|
189
|
+
}
|
|
190
|
+
interface ChatTenantUserPage {
|
|
191
|
+
items: ChatTenantUserEncoded[];
|
|
192
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
193
|
+
page_after: string | null;
|
|
194
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
195
|
+
page_before: string | null;
|
|
196
|
+
}
|
|
197
|
+
interface ChatParticipantPage {
|
|
198
|
+
items: ChatParticipantEncoded[];
|
|
199
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
200
|
+
page_after: string | null;
|
|
201
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
202
|
+
page_before: string | null;
|
|
203
|
+
}
|
|
204
|
+
type ChatHistoryPageEncodedMessagesItemRole = (typeof ChatHistoryPageEncodedMessagesItemRole)[keyof typeof ChatHistoryPageEncodedMessagesItemRole];
|
|
205
|
+
declare const ChatHistoryPageEncodedMessagesItemRole: {
|
|
206
|
+
readonly user: "user";
|
|
207
|
+
readonly assistant: "assistant";
|
|
208
|
+
readonly tool: "tool";
|
|
209
|
+
};
|
|
210
|
+
type ChatHistoryPageEncodedMessagesItemState = (typeof ChatHistoryPageEncodedMessagesItemState)[keyof typeof ChatHistoryPageEncodedMessagesItemState];
|
|
211
|
+
declare const ChatHistoryPageEncodedMessagesItemState: {
|
|
212
|
+
readonly draft: "draft";
|
|
213
|
+
readonly complete: "complete";
|
|
214
|
+
readonly interrupted: "interrupted";
|
|
215
|
+
};
|
|
216
|
+
type ChatHistoryPageEncodedMessagesItemPartsItem = {
|
|
217
|
+
[key: string]: unknown;
|
|
218
|
+
};
|
|
219
|
+
type ChatHistoryPageEncodedMessagesItem = {
|
|
220
|
+
id: string;
|
|
221
|
+
role: ChatHistoryPageEncodedMessagesItemRole;
|
|
222
|
+
state: ChatHistoryPageEncodedMessagesItemState;
|
|
223
|
+
parent_message_id: string | null;
|
|
224
|
+
parts: ChatHistoryPageEncodedMessagesItemPartsItem[];
|
|
225
|
+
author_tenant_user_id: string | null;
|
|
226
|
+
source_assistant_message_id: string | null;
|
|
227
|
+
source_tool_part_id: string | null;
|
|
228
|
+
response_target_id: string | null;
|
|
229
|
+
created_at: string;
|
|
230
|
+
};
|
|
231
|
+
type ChatHistoryPageEncodedThreadRole = (typeof ChatHistoryPageEncodedThreadRole)[keyof typeof ChatHistoryPageEncodedThreadRole];
|
|
232
|
+
declare const ChatHistoryPageEncodedThreadRole: {
|
|
233
|
+
readonly viewer: "viewer";
|
|
234
|
+
readonly member: "member";
|
|
235
|
+
readonly manager: "manager";
|
|
236
|
+
};
|
|
237
|
+
type ChatHistoryPageEncodedThread = {
|
|
238
|
+
id: string;
|
|
239
|
+
title: string | null;
|
|
240
|
+
agent_id: string | null;
|
|
241
|
+
/**
|
|
242
|
+
* @minimum 0
|
|
243
|
+
* @maximum 9007199254740991
|
|
244
|
+
*/
|
|
245
|
+
version: number;
|
|
246
|
+
current_leaf_message_id: string | null;
|
|
247
|
+
role: ChatHistoryPageEncodedThreadRole;
|
|
248
|
+
writer_active: boolean;
|
|
249
|
+
created_at: string;
|
|
250
|
+
updated_at: string;
|
|
251
|
+
};
|
|
252
|
+
type ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation = (typeof ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation)[keyof typeof ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation];
|
|
253
|
+
declare const ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation: {
|
|
254
|
+
readonly server_api: "server_api";
|
|
255
|
+
readonly sandbox: "sandbox";
|
|
256
|
+
readonly browser: "browser";
|
|
257
|
+
};
|
|
258
|
+
type ChatHistoryPageEncodedPendingInteractionsItem = {
|
|
259
|
+
source_message_id: string;
|
|
260
|
+
source_part_id: string;
|
|
261
|
+
response_target_id: string;
|
|
262
|
+
tool_call_id: string;
|
|
263
|
+
target_tenant_user_id: string | null;
|
|
264
|
+
target_client_id: string | null;
|
|
265
|
+
execution_location: ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation;
|
|
266
|
+
};
|
|
267
|
+
interface ChatHistoryPageEncoded {
|
|
268
|
+
messages: ChatHistoryPageEncodedMessagesItem[];
|
|
269
|
+
thread: ChatHistoryPageEncodedThread;
|
|
270
|
+
pending_interactions: ChatHistoryPageEncodedPendingInteractionsItem[];
|
|
271
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
272
|
+
page_after: string | null;
|
|
273
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
274
|
+
page_before: string | null;
|
|
275
|
+
}
|
|
276
|
+
type ChatThreadEncodedRole = (typeof ChatThreadEncodedRole)[keyof typeof ChatThreadEncodedRole];
|
|
277
|
+
declare const ChatThreadEncodedRole: {
|
|
278
|
+
readonly viewer: "viewer";
|
|
279
|
+
readonly member: "member";
|
|
280
|
+
readonly manager: "manager";
|
|
281
|
+
};
|
|
282
|
+
interface ChatThreadEncoded {
|
|
283
|
+
id: string;
|
|
284
|
+
title: string | null;
|
|
285
|
+
agent_id: string | null;
|
|
286
|
+
/**
|
|
287
|
+
* @minimum 0
|
|
288
|
+
* @maximum 9007199254740991
|
|
289
|
+
*/
|
|
290
|
+
version: number;
|
|
291
|
+
current_leaf_message_id: string | null;
|
|
292
|
+
role: ChatThreadEncodedRole;
|
|
293
|
+
writer_active: boolean;
|
|
294
|
+
created_at: string;
|
|
295
|
+
updated_at: string;
|
|
296
|
+
}
|
|
297
|
+
interface UpdateChatThreadInputEncoded {
|
|
298
|
+
/**
|
|
299
|
+
* @minLength 1
|
|
300
|
+
* @maxLength 200
|
|
301
|
+
*/
|
|
302
|
+
title: string;
|
|
303
|
+
/**
|
|
304
|
+
* @minimum 0
|
|
305
|
+
* @maximum 9007199254740991
|
|
306
|
+
*/
|
|
307
|
+
expected_version: number;
|
|
308
|
+
}
|
|
309
|
+
interface ChatThreadPage {
|
|
310
|
+
items: ChatThreadEncoded[];
|
|
311
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
312
|
+
page_after: string | null;
|
|
313
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
314
|
+
page_before: string | null;
|
|
315
|
+
}
|
|
316
|
+
interface CreateChatThreadInputEncoded {
|
|
317
|
+
/**
|
|
318
|
+
* @minLength 1
|
|
319
|
+
* @maxLength 200
|
|
320
|
+
*/
|
|
321
|
+
title?: string;
|
|
322
|
+
agent_id?: string;
|
|
323
|
+
}
|
|
324
|
+
type ChatUsageUsageLimitsItemScope = (typeof ChatUsageUsageLimitsItemScope)[keyof typeof ChatUsageUsageLimitsItemScope];
|
|
325
|
+
declare const ChatUsageUsageLimitsItemScope: {
|
|
326
|
+
readonly global: "global";
|
|
327
|
+
readonly tenant: "tenant";
|
|
328
|
+
readonly tenant_user: "tenant_user";
|
|
329
|
+
readonly thread: "thread";
|
|
330
|
+
};
|
|
331
|
+
type ChatUsageUsageLimitsItemMetric = (typeof ChatUsageUsageLimitsItemMetric)[keyof typeof ChatUsageUsageLimitsItemMetric];
|
|
332
|
+
declare const ChatUsageUsageLimitsItemMetric: {
|
|
333
|
+
readonly tokens: "tokens";
|
|
334
|
+
readonly spend: "spend";
|
|
335
|
+
};
|
|
336
|
+
type ChatUsageUsageLimitsItem = {
|
|
337
|
+
id: string;
|
|
338
|
+
name: string;
|
|
339
|
+
scope: ChatUsageUsageLimitsItemScope;
|
|
340
|
+
metric: ChatUsageUsageLimitsItemMetric;
|
|
341
|
+
amount: string;
|
|
342
|
+
used: string;
|
|
343
|
+
resetsAt: string | null;
|
|
344
|
+
};
|
|
345
|
+
interface ChatUsage {
|
|
346
|
+
usageLimits: ChatUsageUsageLimitsItem[];
|
|
347
|
+
}
|
|
348
|
+
type ChatConfigurationCapabilities = {
|
|
349
|
+
attachments: boolean;
|
|
350
|
+
};
|
|
351
|
+
interface ChatConfiguration {
|
|
352
|
+
capabilities: ChatConfigurationCapabilities;
|
|
353
|
+
}
|
|
354
|
+
interface ChatSubmissionReceiptEncoded {
|
|
355
|
+
thread_id: string;
|
|
356
|
+
accepted_message_id: string;
|
|
357
|
+
/**
|
|
358
|
+
* @minimum 0
|
|
359
|
+
* @maximum 9007199254740991
|
|
360
|
+
*/
|
|
361
|
+
thread_version: number;
|
|
362
|
+
}
|
|
363
|
+
type ChatRunInputForwardedProps = {
|
|
364
|
+
[key: string]: unknown;
|
|
365
|
+
} & {
|
|
366
|
+
clientId: string;
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Legacy mirror of forwardedProps sent by TanStack AI clients.
|
|
370
|
+
*/
|
|
371
|
+
type ChatRunInputData = {
|
|
372
|
+
[key: string]: unknown;
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* AG-UI RunAgentInput, validated by TanStack AI. Use the saved conversation UUID as threadId, send exactly one new user message and set forwardedProps.clientId. The server appends to the current history path, loads saved context, and uses the conversation's selected agent. Replacement history, resume entries, and systemPrompt are rejected. forwardedProps.debug is development-only. Maximum request size: 32 MiB.
|
|
376
|
+
*/
|
|
377
|
+
interface ChatRunInput {
|
|
378
|
+
threadId: string;
|
|
379
|
+
runId: string;
|
|
380
|
+
messages: unknown[];
|
|
381
|
+
tools: unknown[];
|
|
382
|
+
context: unknown[];
|
|
383
|
+
forwardedProps: ChatRunInputForwardedProps;
|
|
384
|
+
/** Legacy mirror of forwardedProps sent by TanStack AI clients. */
|
|
385
|
+
data?: ChatRunInputData;
|
|
386
|
+
state?: unknown;
|
|
387
|
+
parentRunId?: string;
|
|
388
|
+
}
|
|
389
|
+
interface UploadedChatFile {
|
|
390
|
+
fileId: string;
|
|
391
|
+
mimeType: string;
|
|
392
|
+
/**
|
|
393
|
+
* @minimum -9007199254740991
|
|
394
|
+
* @maximum 9007199254740991
|
|
395
|
+
*/
|
|
396
|
+
byteSize: number;
|
|
397
|
+
}
|
|
398
|
+
type ChatMessageEncodedRole = (typeof ChatMessageEncodedRole)[keyof typeof ChatMessageEncodedRole];
|
|
399
|
+
declare const ChatMessageEncodedRole: {
|
|
400
|
+
readonly user: "user";
|
|
401
|
+
readonly assistant: "assistant";
|
|
402
|
+
readonly tool: "tool";
|
|
403
|
+
};
|
|
404
|
+
type ChatMessageEncodedState = (typeof ChatMessageEncodedState)[keyof typeof ChatMessageEncodedState];
|
|
405
|
+
declare const ChatMessageEncodedState: {
|
|
406
|
+
readonly draft: "draft";
|
|
407
|
+
readonly complete: "complete";
|
|
408
|
+
readonly interrupted: "interrupted";
|
|
409
|
+
};
|
|
410
|
+
type ChatMessageEncodedPartsItem = {
|
|
411
|
+
[key: string]: unknown;
|
|
412
|
+
};
|
|
413
|
+
interface ChatMessageEncoded {
|
|
414
|
+
id: string;
|
|
415
|
+
role: ChatMessageEncodedRole;
|
|
416
|
+
state: ChatMessageEncodedState;
|
|
417
|
+
parent_message_id: string | null;
|
|
418
|
+
parts: ChatMessageEncodedPartsItem[];
|
|
419
|
+
author_tenant_user_id: string | null;
|
|
420
|
+
source_assistant_message_id: string | null;
|
|
421
|
+
source_tool_part_id: string | null;
|
|
422
|
+
response_target_id: string | null;
|
|
423
|
+
created_at: string;
|
|
424
|
+
}
|
|
425
|
+
type DirectoryThreadEncodedParticipantsItem = {
|
|
426
|
+
name: string | null;
|
|
427
|
+
external_id: string;
|
|
428
|
+
};
|
|
429
|
+
interface DirectoryThreadEncoded {
|
|
430
|
+
id: string;
|
|
431
|
+
tenant_id: string;
|
|
432
|
+
tenant_name: string | null;
|
|
433
|
+
tenant_external_id: string;
|
|
434
|
+
participants: DirectoryThreadEncodedParticipantsItem[];
|
|
435
|
+
title: string | null;
|
|
436
|
+
agent_id: string | null;
|
|
437
|
+
created_at: string;
|
|
438
|
+
updated_at: string;
|
|
439
|
+
}
|
|
440
|
+
interface DirectoryThreadHistoryPage {
|
|
441
|
+
messages: ChatMessageEncoded[];
|
|
442
|
+
thread: DirectoryThreadEncoded;
|
|
443
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
444
|
+
page_after: string | null;
|
|
445
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
446
|
+
page_before: string | null;
|
|
447
|
+
}
|
|
448
|
+
interface DirectoryThreadPage {
|
|
449
|
+
items: DirectoryThreadEncoded[];
|
|
450
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
451
|
+
page_after: string | null;
|
|
452
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
453
|
+
page_before: string | null;
|
|
454
|
+
}
|
|
455
|
+
interface Organization {
|
|
456
|
+
id: string;
|
|
457
|
+
name: string;
|
|
458
|
+
/** Editable dashboard URL segment. Use id, not slug, as the stable identity. */
|
|
459
|
+
slug: string;
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
|
|
463
|
+
*/
|
|
464
|
+
type UpdateTenantUserInputMetadata = {
|
|
465
|
+
[key: string]: unknown;
|
|
466
|
+
};
|
|
467
|
+
interface UpdateTenantUserInput {
|
|
468
|
+
/** Defaults to null on creation. Send null to clear the name. */
|
|
469
|
+
name?: string | null;
|
|
470
|
+
/** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
|
|
471
|
+
metadata?: UpdateTenantUserInputMetadata;
|
|
472
|
+
/** Defaults to false on creation. Stored admin does not change signed JWT authority. */
|
|
473
|
+
admin?: boolean;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
|
|
477
|
+
*/
|
|
478
|
+
type CreateTenantUserInputMetadata = {
|
|
479
|
+
[key: string]: unknown;
|
|
480
|
+
};
|
|
481
|
+
interface CreateTenantUserInput {
|
|
482
|
+
/**
|
|
483
|
+
* Your stable external identity. Exact and case-sensitive; whitespace is preserved. Immutable after creation.
|
|
484
|
+
* @minLength 1
|
|
485
|
+
* @maxLength 255
|
|
486
|
+
*/
|
|
487
|
+
external_id: string;
|
|
488
|
+
/** Defaults to null on creation. Send null to clear the name. */
|
|
489
|
+
name?: string | null;
|
|
490
|
+
/** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
|
|
491
|
+
metadata?: CreateTenantUserInputMetadata;
|
|
492
|
+
/** Defaults to false on creation. Stored admin does not change signed JWT authority. */
|
|
493
|
+
admin?: boolean;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Live keyset page in ascending ID order within one Tenant. Pass either non-null continuation value as the same-named request parameter.
|
|
497
|
+
*/
|
|
498
|
+
interface TenantUserPage {
|
|
499
|
+
items: TenantUserRecordEncoded[];
|
|
500
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
501
|
+
page_after: string | null;
|
|
502
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
503
|
+
page_before: string | null;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
|
|
507
|
+
*/
|
|
508
|
+
type UpdateTenantInputMetadata = {
|
|
509
|
+
[key: string]: unknown;
|
|
510
|
+
};
|
|
511
|
+
interface UpdateTenantInput {
|
|
512
|
+
/** Defaults to null on creation. Send null to clear the name. */
|
|
513
|
+
name?: string | null;
|
|
514
|
+
/** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
|
|
515
|
+
metadata?: UpdateTenantInputMetadata;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
|
|
519
|
+
*/
|
|
520
|
+
type CreateTenantInputMetadata = {
|
|
521
|
+
[key: string]: unknown;
|
|
522
|
+
};
|
|
523
|
+
interface CreateTenantInput {
|
|
524
|
+
/**
|
|
525
|
+
* Your stable external identity. Exact and case-sensitive; whitespace is preserved. Immutable after creation.
|
|
526
|
+
* @minLength 1
|
|
527
|
+
* @maxLength 255
|
|
528
|
+
*/
|
|
529
|
+
external_id: string;
|
|
530
|
+
/** Defaults to null on creation. Send null to clear the name. */
|
|
531
|
+
name?: string | null;
|
|
532
|
+
/** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
|
|
533
|
+
metadata?: CreateTenantInputMetadata;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Live keyset page. Pass either non-null continuation value as the same-named request parameter.
|
|
537
|
+
*/
|
|
538
|
+
interface TenantPage {
|
|
539
|
+
items: TenantRecordEncoded[];
|
|
540
|
+
/** Pass as page_after to fetch the next page; null means no next page. */
|
|
541
|
+
page_after: string | null;
|
|
542
|
+
/** Pass as page_before to fetch the previous page; null means no previous page. */
|
|
543
|
+
page_before: string | null;
|
|
544
|
+
}
|
|
545
|
+
type ListTenantsParams = {
|
|
546
|
+
/**
|
|
547
|
+
* Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
|
|
548
|
+
* @maxLength 255
|
|
549
|
+
* @pattern ^[^\u0000]*$
|
|
550
|
+
*/
|
|
551
|
+
q?: string;
|
|
552
|
+
/**
|
|
553
|
+
* Exact, case-sensitive external ID; whitespace is preserved. Returns zero or one item.
|
|
554
|
+
* @minLength 1
|
|
555
|
+
* @maxLength 255
|
|
556
|
+
*/
|
|
557
|
+
"filter[external_id]"?: string;
|
|
558
|
+
/**
|
|
559
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
560
|
+
* @minimum 1
|
|
561
|
+
*/
|
|
562
|
+
page_size?: number;
|
|
563
|
+
/**
|
|
564
|
+
* @minLength 1
|
|
565
|
+
* @maxLength 2048
|
|
566
|
+
*/
|
|
567
|
+
page_after?: string;
|
|
568
|
+
/**
|
|
569
|
+
* @minLength 1
|
|
570
|
+
* @maxLength 2048
|
|
571
|
+
*/
|
|
572
|
+
page_before?: string;
|
|
573
|
+
};
|
|
574
|
+
type ListUsersForTenantParams = {
|
|
575
|
+
/**
|
|
576
|
+
* Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
|
|
577
|
+
* @maxLength 255
|
|
578
|
+
* @pattern ^[^\u0000]*$
|
|
579
|
+
*/
|
|
580
|
+
q?: string;
|
|
581
|
+
/**
|
|
582
|
+
* Exact, case-sensitive external ID; whitespace is preserved. Returns zero or one item.
|
|
583
|
+
* @minLength 1
|
|
584
|
+
* @maxLength 255
|
|
585
|
+
*/
|
|
586
|
+
"filter[external_id]"?: string;
|
|
587
|
+
/**
|
|
588
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
589
|
+
* @minimum 1
|
|
590
|
+
*/
|
|
591
|
+
page_size?: number;
|
|
592
|
+
/**
|
|
593
|
+
* @minLength 1
|
|
594
|
+
* @maxLength 2048
|
|
595
|
+
*/
|
|
596
|
+
page_after?: string;
|
|
597
|
+
/**
|
|
598
|
+
* @minLength 1
|
|
599
|
+
* @maxLength 2048
|
|
600
|
+
*/
|
|
601
|
+
page_before?: string;
|
|
602
|
+
"filter[admin]"?: ListUsersForTenantFilterAdmin;
|
|
603
|
+
};
|
|
604
|
+
type ListUsersForTenantFilterAdmin = (typeof ListUsersForTenantFilterAdmin)[keyof typeof ListUsersForTenantFilterAdmin];
|
|
605
|
+
declare const ListUsersForTenantFilterAdmin: {
|
|
606
|
+
readonly true: "true";
|
|
607
|
+
readonly false: "false";
|
|
608
|
+
};
|
|
609
|
+
type ListThreadsParams = {
|
|
610
|
+
/**
|
|
611
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
612
|
+
* @minimum 1
|
|
613
|
+
*/
|
|
614
|
+
page_size?: number;
|
|
615
|
+
/**
|
|
616
|
+
* @minLength 1
|
|
617
|
+
* @maxLength 2048
|
|
618
|
+
*/
|
|
619
|
+
page_after?: string;
|
|
620
|
+
/**
|
|
621
|
+
* @minLength 1
|
|
622
|
+
* @maxLength 2048
|
|
623
|
+
*/
|
|
624
|
+
page_before?: string;
|
|
625
|
+
/**
|
|
626
|
+
* Case-insensitive literal substring of the conversation title. Trimmed, blank means no search.
|
|
627
|
+
* @maxLength 255
|
|
628
|
+
* @pattern ^[^\u0000]*$
|
|
629
|
+
*/
|
|
630
|
+
q?: string;
|
|
631
|
+
"filter[tenant_id]"?: string;
|
|
632
|
+
};
|
|
633
|
+
type ListThreadMessagesParams = {
|
|
634
|
+
/**
|
|
635
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
636
|
+
* @minimum 1
|
|
637
|
+
*/
|
|
638
|
+
page_size?: number;
|
|
639
|
+
/**
|
|
640
|
+
* @minLength 1
|
|
641
|
+
* @maxLength 2048
|
|
642
|
+
*/
|
|
643
|
+
page_after?: string;
|
|
644
|
+
/**
|
|
645
|
+
* @minLength 1
|
|
646
|
+
* @maxLength 2048
|
|
647
|
+
*/
|
|
648
|
+
page_before?: string;
|
|
649
|
+
};
|
|
650
|
+
type UploadChatFileBodyType = (typeof UploadChatFileBodyType)[keyof typeof UploadChatFileBodyType];
|
|
651
|
+
declare const UploadChatFileBodyType: {
|
|
652
|
+
readonly image: "image";
|
|
653
|
+
readonly document: "document";
|
|
654
|
+
};
|
|
655
|
+
type UploadChatFileBodySourceType = (typeof UploadChatFileBodySourceType)[keyof typeof UploadChatFileBodySourceType];
|
|
656
|
+
declare const UploadChatFileBodySourceType: {
|
|
657
|
+
readonly data: "data";
|
|
658
|
+
};
|
|
659
|
+
type UploadChatFileBodySource = {
|
|
660
|
+
type: UploadChatFileBodySourceType;
|
|
661
|
+
value: string;
|
|
662
|
+
mimeType: string;
|
|
663
|
+
};
|
|
664
|
+
type UploadChatFileBodyMetadata = {
|
|
665
|
+
filename: string;
|
|
666
|
+
};
|
|
667
|
+
type UploadChatFileBody = {
|
|
668
|
+
agentId?: string;
|
|
669
|
+
type: UploadChatFileBodyType;
|
|
670
|
+
source: UploadChatFileBodySource;
|
|
671
|
+
metadata: UploadChatFileBodyMetadata;
|
|
672
|
+
};
|
|
673
|
+
type GetChatFileParams = {
|
|
674
|
+
threadId: string;
|
|
675
|
+
fileId: string;
|
|
676
|
+
filename?: string;
|
|
677
|
+
};
|
|
678
|
+
type GetChatConfigParams = {
|
|
679
|
+
agentId?: string;
|
|
680
|
+
};
|
|
681
|
+
type GetChatUsageParams = {
|
|
682
|
+
threadId?: string;
|
|
683
|
+
};
|
|
684
|
+
type ListChatThreadsParams = {
|
|
685
|
+
/**
|
|
686
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
687
|
+
* @minimum 1
|
|
688
|
+
*/
|
|
689
|
+
page_size?: number;
|
|
690
|
+
/**
|
|
691
|
+
* @minLength 1
|
|
692
|
+
* @maxLength 2048
|
|
693
|
+
*/
|
|
694
|
+
page_after?: string;
|
|
695
|
+
/**
|
|
696
|
+
* @minLength 1
|
|
697
|
+
* @maxLength 2048
|
|
698
|
+
*/
|
|
699
|
+
page_before?: string;
|
|
700
|
+
/**
|
|
701
|
+
* Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
|
|
702
|
+
* @maxLength 255
|
|
703
|
+
* @pattern ^[^\u0000]*$
|
|
704
|
+
*/
|
|
705
|
+
q?: string;
|
|
706
|
+
};
|
|
707
|
+
type DeleteChatThreadParams = {
|
|
708
|
+
expected_version: string;
|
|
709
|
+
};
|
|
710
|
+
type ListChatMessagesParams = {
|
|
711
|
+
/**
|
|
712
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
713
|
+
* @minimum 1
|
|
714
|
+
*/
|
|
715
|
+
page_size?: number;
|
|
716
|
+
/**
|
|
717
|
+
* @minLength 1
|
|
718
|
+
* @maxLength 2048
|
|
719
|
+
*/
|
|
720
|
+
page_after?: string;
|
|
721
|
+
/**
|
|
722
|
+
* @minLength 1
|
|
723
|
+
* @maxLength 2048
|
|
724
|
+
*/
|
|
725
|
+
page_before?: string;
|
|
726
|
+
};
|
|
727
|
+
type ListChatParticipantsParams = {
|
|
728
|
+
/**
|
|
729
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
730
|
+
* @minimum 1
|
|
731
|
+
*/
|
|
732
|
+
page_size?: number;
|
|
733
|
+
/**
|
|
734
|
+
* @minLength 1
|
|
735
|
+
* @maxLength 2048
|
|
736
|
+
*/
|
|
737
|
+
page_after?: string;
|
|
738
|
+
/**
|
|
739
|
+
* @minLength 1
|
|
740
|
+
* @maxLength 2048
|
|
741
|
+
*/
|
|
742
|
+
page_before?: string;
|
|
743
|
+
};
|
|
744
|
+
type SearchChatTenantUsersParams = {
|
|
745
|
+
/**
|
|
746
|
+
* Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
|
|
747
|
+
* @minimum 1
|
|
748
|
+
*/
|
|
749
|
+
page_size?: number;
|
|
750
|
+
/**
|
|
751
|
+
* @minLength 1
|
|
752
|
+
* @maxLength 2048
|
|
753
|
+
*/
|
|
754
|
+
page_after?: string;
|
|
755
|
+
/**
|
|
756
|
+
* @minLength 1
|
|
757
|
+
* @maxLength 2048
|
|
758
|
+
*/
|
|
759
|
+
page_before?: string;
|
|
760
|
+
/**
|
|
761
|
+
* Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
|
|
762
|
+
* @maxLength 255
|
|
763
|
+
* @pattern ^[^\u0000]*$
|
|
764
|
+
*/
|
|
765
|
+
q?: string;
|
|
766
|
+
};
|
|
767
|
+
type RemoveChatParticipantParams = {
|
|
768
|
+
expected_version: string;
|
|
769
|
+
};
|
|
770
|
+
declare const getListTenantsUrl: (params: ListTenantsParams) => string;
|
|
771
|
+
/**
|
|
772
|
+
* List Tenants in internal ID order. q searches name or external ID as a case-insensitive literal substring. filter[external_id] adds an exact match. Organization keys and organization-management JWTs see their organization; admin tenant JWTs see only their signed Tenant. Keep filters unchanged when reusing cursors. Live listing, not a snapshot.
|
|
773
|
+
* @summary List Tenants
|
|
774
|
+
*/
|
|
775
|
+
declare const listTenants: (params: ListTenantsParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantPage>;
|
|
776
|
+
declare const getCreateTenantUrl: () => string;
|
|
777
|
+
/**
|
|
778
|
+
* Create a Tenant with an exact customer-provided external_id. Requires an organization API key or organization-management JWT with a current owner/developer role. An external_id already used in this organization returns 409; creation never upserts.
|
|
779
|
+
* @summary Create a Tenant
|
|
780
|
+
*/
|
|
781
|
+
declare const createTenant: (createTenantInput: CreateTenantInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantRecordEncoded>;
|
|
782
|
+
declare const getGetTenantUrl: (id: string) => string;
|
|
783
|
+
/**
|
|
784
|
+
* Get a Tenant by internal UUID, not external_id.
|
|
785
|
+
* @summary Get a Tenant
|
|
786
|
+
*/
|
|
787
|
+
declare const getTenant: (id: string, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantRecordEncoded>;
|
|
788
|
+
declare const getUpdateTenantUrl: (id: string) => string;
|
|
789
|
+
/**
|
|
790
|
+
* Update supplied name/metadata fields only. Requires an organization API key or organization-management JWT with a current owner/developer role. name:null clears the name; metadata replaces the object. Last-write-wins; no upsert.
|
|
791
|
+
* @summary Update a Tenant
|
|
792
|
+
*/
|
|
793
|
+
declare const updateTenant: (id: string, updateTenantInput: UpdateTenantInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantRecordEncoded>;
|
|
794
|
+
declare const getListUsersForTenantUrl: (tenantId: string, params: ListUsersForTenantParams) => string;
|
|
795
|
+
/**
|
|
796
|
+
* List users of one Tenant in internal ID order. q searches name or external ID as a case-insensitive literal substring. Exact filter[external_id] and filter[admin] combine with AND. No matching user returns an empty page; missing and out-of-scope Tenants return 404. Cursors cannot be reused for another Tenant or filter. Live listing, not a snapshot.
|
|
797
|
+
* @summary List TenantUsers
|
|
798
|
+
*/
|
|
799
|
+
declare const listUsersForTenant: (tenantId: string, params: ListUsersForTenantParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserPage>;
|
|
800
|
+
declare const getCreateTenantUserUrl: (tenantId: string) => string;
|
|
801
|
+
/**
|
|
802
|
+
* Create a TenantUser under the internal tenant_id path identifier, with a customer-provided tenant-local external_id. An external_id already used in this Tenant returns 409; the same external_id in another Tenant is allowed. Stored admin does not change signed JWT authority.
|
|
803
|
+
* @summary Create a TenantUser
|
|
804
|
+
*/
|
|
805
|
+
declare const createTenantUser: (tenantId: string, createTenantUserInput: CreateTenantUserInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserRecordEncoded>;
|
|
806
|
+
declare const getGetTenantUserUrl: (tenantId: string, id: string) => string;
|
|
807
|
+
/**
|
|
808
|
+
* Get a TenantUser by the internal tenant_id and id pair within the authorized scope. No identity upsert.
|
|
809
|
+
* @summary Get a TenantUser
|
|
810
|
+
*/
|
|
811
|
+
declare const getTenantUser: (tenantId: string, id: string, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserRecordEncoded>;
|
|
812
|
+
declare const getUpdateTenantUserUrl: (tenantId: string, id: string) => string;
|
|
813
|
+
/**
|
|
814
|
+
* Update supplied name/metadata/admin fields only. Stored admin does not grant or revoke JWT authority. name:null clears the name; metadata replaces the object.
|
|
815
|
+
* @summary Update a TenantUser
|
|
816
|
+
*/
|
|
817
|
+
declare const updateTenantUser: (tenantId: string, id: string, updateTenantUserInput: UpdateTenantUserInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserRecordEncoded>;
|
|
818
|
+
declare const getGetOrganizationUrl: () => string;
|
|
819
|
+
/**
|
|
820
|
+
* Return the id, name, and slug of the Organization that owns the credential. Accepts an organization API key or organization-management JWT, including a viewer's. Tenant JWTs are forbidden.
|
|
821
|
+
* @summary Get the current Organization
|
|
822
|
+
*/
|
|
823
|
+
declare const getOrganization: (options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<Organization>;
|
|
824
|
+
declare const getListThreadsUrl: (params: ListThreadsParams) => string;
|
|
825
|
+
/**
|
|
826
|
+
* List nonempty conversations by activity, Tenant ID and thread ID descending. q searches titles as a case-insensitive literal substring. filter[tenant_id] narrows the verified scope. Keep filters unchanged when reusing cursors. This is a live listing, not a snapshot.
|
|
827
|
+
* @summary List conversations for administration
|
|
828
|
+
*/
|
|
829
|
+
declare const listThreads: (params: ListThreadsParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<DirectoryThreadPage>;
|
|
830
|
+
declare const getListThreadMessagesUrl: (tenantId: string, id: string, params: ListThreadMessagesParams) => string;
|
|
831
|
+
/**
|
|
832
|
+
* @summary Read conversation history for administration
|
|
833
|
+
*/
|
|
834
|
+
declare const listThreadMessages: (tenantId: string, id: string, params: ListThreadMessagesParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<DirectoryThreadHistoryPage>;
|
|
835
|
+
declare const getGetThreadAttachmentUrl: (tenantId: string, id: string, messageId: string, partId: string) => string;
|
|
836
|
+
/**
|
|
837
|
+
* @summary Download a saved conversation upload for administration
|
|
838
|
+
*/
|
|
839
|
+
declare const getThreadAttachment: (tenantId: string, id: string, messageId: string, partId: string, options: Parameters<typeof astralBeamResourceFetch>[1]) => Promise<Response>;
|
|
840
|
+
declare const getUploadChatFileUrl: () => string;
|
|
841
|
+
/**
|
|
842
|
+
* Upload a file before sending a message using a synchronized tenant user JWT. The returned fileId is private to the uploader until sending attaches it to a message. Send it as source: { type: 'file', value: fileId }. Uploads do not expire. Maximum request size: 32 MiB.
|
|
843
|
+
* @summary Upload a chat file
|
|
844
|
+
*/
|
|
845
|
+
declare const uploadChatFile: (uploadChatFileBody: UploadChatFileBody, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<UploadedChatFile>;
|
|
846
|
+
declare const getGetChatFileUrl: (params: GetChatFileParams) => string;
|
|
847
|
+
/**
|
|
848
|
+
* Download a stored file using a tenant JWT and current conversation membership. Pass its fileId, conversation threadId, and optional download filename. Published artifacts survive sandbox shutdown. The server verifies the stored size and hash before returning content-sniffed bytes.
|
|
849
|
+
* @summary Download a chat artifact
|
|
850
|
+
*/
|
|
851
|
+
declare const getChatFile: (params: GetChatFileParams, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
|
|
852
|
+
declare const getRunChatUrl: () => string;
|
|
853
|
+
/**
|
|
854
|
+
* Save one new user message and stream an AG-UI agent run for a conversation participant using a synchronized tenant user JWT. An optional Idempotency-Key retains acceptance for 24 hours. An identical retry returns an application/json admission receipt without generation. Changed input under the same key returns 400 and simultaneous use returns 409. HTTP failures before streaming use AstralBeamApiError. Once streaming starts, failures use RUN_ERROR events. Submit tool results to the conversation's tool-results endpoint. Disconnecting cancels the foreground run and preserves saved history. Limited to 20 new turns per minute per organization, tenant, and user.
|
|
855
|
+
* @summary Run chat
|
|
856
|
+
*/
|
|
857
|
+
declare const runChat: (chatRunInput: ChatRunInput, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
|
|
858
|
+
declare const getGetChatConfigUrl: (params: GetChatConfigParams) => string;
|
|
859
|
+
/**
|
|
860
|
+
* Read the selected agent's attachment grant using a tenant user JWT. Omit agentId to use the organization's default agent. Client settings may narrow this grant, never widen it.
|
|
861
|
+
* @summary Get chat capabilities
|
|
862
|
+
*/
|
|
863
|
+
declare const getChatConfig: (params: GetChatConfigParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatConfiguration>;
|
|
864
|
+
declare const getGetChatUsageUrl: (params: GetChatUsageParams) => string;
|
|
865
|
+
/**
|
|
866
|
+
* Read the usage limits that apply to the current tenant user and how much of each is used, using a tenant user JWT. Amounts and usage are decimal strings, in tokens or US dollars. resetsAt is null until usage opens a window. Pass the threadId of a conversation you participate in to include per-conversation limits.
|
|
867
|
+
* @summary Get usage limits
|
|
868
|
+
*/
|
|
869
|
+
declare const getChatUsage: (params: GetChatUsageParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<ChatUsage>;
|
|
870
|
+
declare const getCreateChatThreadUrl: () => string;
|
|
871
|
+
/**
|
|
872
|
+
* @summary Create a saved conversation
|
|
873
|
+
*/
|
|
874
|
+
declare const createChatThread: (createChatThreadInputEncoded: CreateChatThreadInputEncoded, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadEncoded>;
|
|
875
|
+
declare const getListChatThreadsUrl: (params: ListChatThreadsParams) => string;
|
|
876
|
+
/**
|
|
877
|
+
* @summary List your conversations
|
|
878
|
+
*/
|
|
879
|
+
declare const listChatThreads: (params: ListChatThreadsParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadPage>;
|
|
880
|
+
declare const getGetChatThreadUrl: (id: string) => string;
|
|
881
|
+
/**
|
|
882
|
+
* @summary Get a saved conversation
|
|
883
|
+
*/
|
|
884
|
+
declare const getChatThread: (id: string, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadEncoded>;
|
|
885
|
+
declare const getUpdateChatThreadUrl: (id: string) => string;
|
|
886
|
+
/**
|
|
887
|
+
* @summary Rename a conversation
|
|
888
|
+
*/
|
|
889
|
+
declare const updateChatThread: (id: string, updateChatThreadInputEncoded: UpdateChatThreadInputEncoded, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadEncoded>;
|
|
890
|
+
declare const getDeleteChatThreadUrl: (id: string, params: DeleteChatThreadParams) => string;
|
|
891
|
+
/**
|
|
892
|
+
* @summary Delete a conversation
|
|
893
|
+
*/
|
|
894
|
+
declare const deleteChatThread: (id: string, params: DeleteChatThreadParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<void>;
|
|
895
|
+
declare const getListChatMessagesUrl: (id: string, params: ListChatMessagesParams) => string;
|
|
896
|
+
/**
|
|
897
|
+
* @summary Read conversation history
|
|
898
|
+
*/
|
|
899
|
+
declare const listChatMessages: (id: string, params: ListChatMessagesParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatHistoryPageEncoded>;
|
|
900
|
+
declare const getListChatParticipantsUrl: (id: string, params: ListChatParticipantsParams) => string;
|
|
901
|
+
/**
|
|
902
|
+
* @summary List conversation participants
|
|
903
|
+
*/
|
|
904
|
+
declare const listChatParticipants: (id: string, params: ListChatParticipantsParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatParticipantPage>;
|
|
905
|
+
declare const getSearchChatTenantUsersUrl: (id: string, params: SearchChatTenantUsersParams) => string;
|
|
906
|
+
/**
|
|
907
|
+
* Requires a conversation manager. Searches names and external IDs within the conversation's Tenant. Returns only identity and display fields, without user metadata or administrative flags.
|
|
908
|
+
* @summary Search same-Tenant users for sharing
|
|
909
|
+
*/
|
|
910
|
+
declare const searchChatTenantUsers: (id: string, params: SearchChatTenantUsersParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatTenantUserPage>;
|
|
911
|
+
declare const getSetChatParticipantUrl: (id: string, tenantUserId: string) => string;
|
|
912
|
+
/**
|
|
913
|
+
* @summary Add a participant or change their role
|
|
914
|
+
*/
|
|
915
|
+
declare const setChatParticipant: (id: string, tenantUserId: string, setChatParticipantInputEncoded: SetChatParticipantInputEncoded, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatParticipantEncoded>;
|
|
916
|
+
declare const getRemoveChatParticipantUrl: (id: string, tenantUserId: string, params: RemoveChatParticipantParams) => string;
|
|
917
|
+
/**
|
|
918
|
+
* @summary Remove a conversation participant
|
|
919
|
+
*/
|
|
920
|
+
declare const removeChatParticipant: (id: string, tenantUserId: string, params: RemoveChatParticipantParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<void>;
|
|
921
|
+
declare const getResolveChatToolResultUrl: (id: string) => string;
|
|
922
|
+
/**
|
|
923
|
+
* @summary Submit a pending tool result
|
|
924
|
+
*/
|
|
925
|
+
declare const resolveChatToolResult: (id: string, resolveChatToolResultInputEncoded: ResolveChatToolResultInputEncoded, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
|
|
926
|
+
declare const getGetChatAttachmentUrl: (id: string, messageId: string, partId: string) => string;
|
|
927
|
+
/**
|
|
928
|
+
* @summary Download a saved attachment
|
|
929
|
+
*/
|
|
930
|
+
declare const getChatAttachment: (id: string, messageId: string, partId: string, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
|
|
931
|
+
declare const getGetCurrentUserUrl: () => string;
|
|
932
|
+
/**
|
|
933
|
+
* Use a tenant JWT to upsert its own Tenant and TenantUser atomically, without requiring admin authority. Supplied names and metadata replace stored values, omitted profile fields and admin are preserved, and an explicit admin claim updates stored admin. An organization JWT returns existing user membership and the current database role without provisioning identities. API keys and cookies are not accepted. Limited to 100 requests per five minutes per identity.
|
|
934
|
+
* @summary Get the current user
|
|
935
|
+
*/
|
|
936
|
+
declare const getCurrentUser: (options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<CurrentUser>;
|
|
937
|
+
//#endregion
|
|
938
|
+
export { ListChatThreadsParams as $, getGetThreadAttachmentUrl as $t, ChatThreadPage as A, searchChatTenantUsers as An, createChatThread as At, CreateTenantUserInput as B, JwtOptions as Bn, getCreateTenantUrl as Bt, ChatRunInputData as C, listTenants as Cn, UpdateTenantUserInputMetadata as Ct, ChatTenantUserPage as D, removeChatParticipant as Dn, UploadChatFileBodySourceType as Dt, ChatTenantUserEncoded as E, listUsersForTenant as En, UploadChatFileBodySource as Et, ChatUsageUsageLimitsItemMetric as F, uploadChatFile as Fn, getChatConfig as Ft, DirectoryThreadEncodedParticipantsItem as G, getGetChatConfigUrl as Gt, CurrentUser as H, getCurrentUser as Ht, ChatUsageUsageLimitsItemScope as I, ApiKeyOptions as In, getChatFile as It, GetChatConfigParams as J, getGetChatUsageUrl as Jt, DirectoryThreadHistoryPage as K, getGetChatFileUrl as Kt, CreateChatThreadInputEncoded as L, ApiOptions as Ln, getChatThread as Lt, ChatToolResultReceiptEncodedUsageLimit as M, updateChatThread as Mn, createTenantUser as Mt, ChatUsage as N, updateTenant as Nn, deleteChatThread as Nt, ChatThreadEncoded as O, resolveChatToolResult as On, UploadChatFileBodyType as Ot, ChatUsageUsageLimitsItem as P, updateTenantUser as Pn, getChatAttachment as Pt, ListChatParticipantsParams as Q, getGetTenantUserUrl as Qt, CreateTenantInput as R, ApiRequestOptions as Rn, getChatUsage as Rt, ChatRunInput as S, listChatThreads as Sn, UpdateTenantUserInput as St, ChatSubmissionReceiptEncoded as T, listThreads as Tn, UploadChatFileBodyMetadata as Tt, DeleteChatThreadParams as U, getDeleteChatThreadUrl as Ut, CreateTenantUserInputMetadata as V, isAstralBeamApiError as Vn, getCreateTenantUserUrl as Vt, DirectoryThreadEncoded as W, getGetChatAttachmentUrl as Wt, GetChatUsageParams as X, getGetOrganizationUrl as Xt, GetChatFileParams as Y, getGetCurrentUserUrl as Yt, ListChatMessagesParams as Z, getGetTenantUrl as Zt, ChatMessageEncodedRole as _, getUpdateTenantUrl as _n, TenantUserRecordEncoded as _t, ChatConfigurationCapabilities as a, getListThreadsUrl as an, Organization as at, ChatParticipantEncodedRole as b, listChatMessages as bn, UpdateTenantInput as bt, ChatHistoryPageEncodedMessagesItemPartsItem as c, getRemoveChatParticipantUrl as cn, ResolveChatToolResultInputEncodedResultsItem as ct, ChatHistoryPageEncodedPendingInteractionsItem as d, getSearchChatTenantUsersUrl as dn, SetChatParticipantInputEncoded as dt, getListChatMessagesUrl as en, ListTenantsParams as et, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as f, getSetChatParticipantUrl as fn, SetChatParticipantInputEncodedRole as ft, ChatMessageEncodedPartsItem as g, getUpdateChatThreadUrl as gn, TenantUserPage as gt, ChatMessageEncoded as h, getThreadAttachment as hn, TenantRecordEncodedMetadata as ht, ChatConfiguration as i, getListThreadMessagesUrl as in, ListUsersForTenantParams as it, ChatToolResultReceiptEncoded as j, setChatParticipant as jn, createTenant as jt, ChatThreadEncodedRole as k, runChat as kn, UploadedChatFile as kt, ChatHistoryPageEncodedMessagesItemRole as l, getResolveChatToolResultUrl as ln, ResolveChatToolResultInputEncodedResultsItemOutcome as lt, ChatHistoryPageEncodedThreadRole as m, getTenantUser as mn, TenantRecordEncoded as mt, AstralBeamApiErrorIssuesItem as n, getListChatThreadsUrl as nn, ListThreadsParams as nt, ChatHistoryPageEncoded as o, getListUsersForTenantUrl as on, RemoveChatParticipantParams as ot, ChatHistoryPageEncodedThread as p, getTenant as pn, TenantPage as pt, DirectoryThreadPage as q, getGetChatThreadUrl as qt, AstralBeamApiErrorUsageLimit as r, getListTenantsUrl as rn, ListUsersForTenantFilterAdmin as rt, ChatHistoryPageEncodedMessagesItem as s, getOrganization as sn, ResolveChatToolResultInputEncoded as st, AstralBeamApiError as t, getListChatParticipantsUrl as tn, ListThreadMessagesParams as tt, ChatHistoryPageEncodedMessagesItemState as u, getRunChatUrl as un, SearchChatTenantUsersParams as ut, ChatMessageEncodedState as v, getUpdateTenantUserUrl as vn, TenantUserRecordEncodedMetadata as vt, ChatRunInputForwardedProps as w, listThreadMessages as wn, UploadChatFileBody as wt, ChatParticipantPage as x, listChatParticipants as xn, UpdateTenantInputMetadata as xt, ChatParticipantEncoded as y, getUploadChatFileUrl as yn, UpdateChatThreadInputEncoded as yt, CreateTenantInputMetadata as z, AstralBeamApiError$1 as zn, getCreateChatThreadUrl as zt };
|