@astralbeam/sdk 0.15.2 → 0.16.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.
@@ -0,0 +1,827 @@
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
+ type FileOptions = ApiRequestOptions & {
16
+ apiKey?: never;
17
+ astralBeamToken?: never;
18
+ };
19
+ interface AstralBeamApiError$1 extends Error {
20
+ name: "AstralBeamApiError";
21
+ status: number;
22
+ headers: Headers;
23
+ body?: AstralBeamApiError;
24
+ }
25
+ declare function isAstralBeamApiError(error: unknown): error is AstralBeamApiError$1;
26
+ declare function astralBeamApiFetch<T>(path: string, options: ApiOptions): Promise<T>;
27
+ declare function astralBeamJwtFetch<T>(path: string, options: JwtOptions): Promise<T>;
28
+ declare function astralBeamResourceFetch<_T>(path: string, options: ApiOptions): Promise<Response>;
29
+ declare function astralBeamChatFetch<_T>(path: string, options: JwtOptions): Promise<Response>;
30
+ declare function astralBeamFileFetch<_T>(path: string, options?: FileOptions): Promise<Response>;
31
+ //#endregion
32
+ //#region src/api/generated/api.d.ts
33
+ type AstralBeamApiErrorIssuesItem = {
34
+ path: string;
35
+ message: string;
36
+ };
37
+ interface AstralBeamApiError {
38
+ type: string;
39
+ title: string;
40
+ status: number;
41
+ detail: string;
42
+ issues?: AstralBeamApiErrorIssuesItem[];
43
+ /** Identifies the server log entry of an internal error. Quote it for support. */
44
+ reference?: string;
45
+ }
46
+ /**
47
+ * Customer-defined JSON object; keys are preserved.
48
+ */
49
+ type TenantRecordEncodedMetadata = {
50
+ [key: string]: unknown;
51
+ };
52
+ /**
53
+ * Persisted Tenant; id is internal, external_id is the customer's exact identity.
54
+ */
55
+ interface TenantRecordEncoded {
56
+ id: string;
57
+ external_id: string;
58
+ name: string | null;
59
+ /** Customer-defined JSON object; keys are preserved. */
60
+ metadata: TenantRecordEncodedMetadata;
61
+ created_at: string;
62
+ updated_at: string;
63
+ }
64
+ /**
65
+ * Customer-defined JSON object; keys are preserved.
66
+ */
67
+ type TenantUserRecordEncodedMetadata = {
68
+ [key: string]: unknown;
69
+ };
70
+ /**
71
+ * Persisted TenantUser. Stored admin does not grant or revoke signed JWT authority.
72
+ */
73
+ interface TenantUserRecordEncoded {
74
+ id: string;
75
+ external_id: string;
76
+ name: string | null;
77
+ /** Customer-defined JSON object; keys are preserved. */
78
+ metadata: TenantUserRecordEncodedMetadata;
79
+ created_at: string;
80
+ updated_at: string;
81
+ tenant_id: string;
82
+ admin: boolean;
83
+ }
84
+ type CurrentUser = {
85
+ scope: "tenant";
86
+ organization: {
87
+ id: string;
88
+ };
89
+ tenant: TenantRecordEncoded;
90
+ user: TenantUserRecordEncoded;
91
+ } | {
92
+ scope: "organization";
93
+ organization: {
94
+ id: string;
95
+ };
96
+ user: {
97
+ id: string;
98
+ name: string;
99
+ email: string;
100
+ role: string;
101
+ };
102
+ };
103
+ interface ChatSubmissionReceiptEncoded {
104
+ thread_id: string;
105
+ accepted_message_id: string;
106
+ /** @minimum 0 */
107
+ thread_version: number;
108
+ }
109
+ type ResolveChatToolResultInputEncodedResultsItemOutcome = (typeof ResolveChatToolResultInputEncodedResultsItemOutcome)[keyof typeof ResolveChatToolResultInputEncodedResultsItemOutcome];
110
+ declare const ResolveChatToolResultInputEncodedResultsItemOutcome: {
111
+ readonly succeeded: "succeeded";
112
+ readonly failed: "failed";
113
+ readonly skipped: "skipped";
114
+ readonly unknown: "unknown";
115
+ };
116
+ type ResolveChatToolResultInputEncodedResultsItem = {
117
+ source_message_id: string; /** @minLength 1 */
118
+ source_part_id: string;
119
+ response_target_id: string;
120
+ outcome: ResolveChatToolResultInputEncodedResultsItemOutcome;
121
+ output: unknown;
122
+ };
123
+ interface ResolveChatToolResultInputEncoded {
124
+ /**
125
+ * @minItems 1
126
+ * @maxItems 100
127
+ */
128
+ results: ResolveChatToolResultInputEncodedResultsItem[];
129
+ client_id: string;
130
+ /**
131
+ * @minLength 1
132
+ * @maxLength 200
133
+ */
134
+ run_id?: string;
135
+ /**
136
+ * @minLength 1
137
+ * @maxLength 200
138
+ */
139
+ parent_run_id?: string;
140
+ }
141
+ type ChatParticipantEncodedRole = (typeof ChatParticipantEncodedRole)[keyof typeof ChatParticipantEncodedRole];
142
+ declare const ChatParticipantEncodedRole: {
143
+ readonly viewer: "viewer";
144
+ readonly member: "member";
145
+ readonly manager: "manager";
146
+ };
147
+ interface ChatParticipantEncoded {
148
+ tenant_user_id: string;
149
+ role: ChatParticipantEncodedRole;
150
+ name: string | null;
151
+ external_id: string;
152
+ email: string | null;
153
+ }
154
+ type SetChatParticipantInputEncodedRole = (typeof SetChatParticipantInputEncodedRole)[keyof typeof SetChatParticipantInputEncodedRole];
155
+ declare const SetChatParticipantInputEncodedRole: {
156
+ readonly viewer: "viewer";
157
+ readonly member: "member";
158
+ readonly manager: "manager";
159
+ };
160
+ interface SetChatParticipantInputEncoded {
161
+ role: SetChatParticipantInputEncodedRole;
162
+ /** @minimum 0 */
163
+ expected_version: number;
164
+ }
165
+ interface ChatTenantUserEncoded {
166
+ id: string;
167
+ name: string | null;
168
+ external_id: string;
169
+ email: string | null;
170
+ }
171
+ interface ChatTenantUserPage {
172
+ items: ChatTenantUserEncoded[];
173
+ /** Pass as page_after to fetch the next page; null means no next page. */
174
+ page_after: string | null;
175
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
176
+ page_before: string | null;
177
+ }
178
+ interface ChatParticipantPage {
179
+ items: ChatParticipantEncoded[];
180
+ /** Pass as page_after to fetch the next page; null means no next page. */
181
+ page_after: string | null;
182
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
183
+ page_before: string | null;
184
+ }
185
+ type ChatHistoryPageEncodedMessagesItemRole = (typeof ChatHistoryPageEncodedMessagesItemRole)[keyof typeof ChatHistoryPageEncodedMessagesItemRole];
186
+ declare const ChatHistoryPageEncodedMessagesItemRole: {
187
+ readonly user: "user";
188
+ readonly assistant: "assistant";
189
+ readonly tool: "tool";
190
+ };
191
+ type ChatHistoryPageEncodedMessagesItemState = (typeof ChatHistoryPageEncodedMessagesItemState)[keyof typeof ChatHistoryPageEncodedMessagesItemState];
192
+ declare const ChatHistoryPageEncodedMessagesItemState: {
193
+ readonly draft: "draft";
194
+ readonly complete: "complete";
195
+ readonly interrupted: "interrupted";
196
+ };
197
+ type ChatHistoryPageEncodedMessagesItemPartsItem = {
198
+ [key: string]: unknown;
199
+ };
200
+ type ChatHistoryPageEncodedMessagesItem = {
201
+ id: string;
202
+ role: ChatHistoryPageEncodedMessagesItemRole;
203
+ state: ChatHistoryPageEncodedMessagesItemState;
204
+ parent_message_id: string | null;
205
+ parts: ChatHistoryPageEncodedMessagesItemPartsItem[];
206
+ author_tenant_user_id: string | null;
207
+ source_assistant_message_id: string | null;
208
+ source_tool_part_id: string | null;
209
+ response_target_id: string | null;
210
+ created_at: string;
211
+ };
212
+ type ChatHistoryPageEncodedThreadRole = (typeof ChatHistoryPageEncodedThreadRole)[keyof typeof ChatHistoryPageEncodedThreadRole];
213
+ declare const ChatHistoryPageEncodedThreadRole: {
214
+ readonly viewer: "viewer";
215
+ readonly member: "member";
216
+ readonly manager: "manager";
217
+ };
218
+ type ChatHistoryPageEncodedThread = {
219
+ id: string;
220
+ title: string | null;
221
+ agent_id: string | null; /** @minimum 0 */
222
+ version: number;
223
+ current_leaf_message_id: string | null;
224
+ role: ChatHistoryPageEncodedThreadRole;
225
+ writer_active: boolean;
226
+ created_at: string;
227
+ updated_at: string;
228
+ };
229
+ type ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation = (typeof ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation)[keyof typeof ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation];
230
+ declare const ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation: {
231
+ readonly server_api: "server_api";
232
+ readonly sandbox: "sandbox";
233
+ readonly browser: "browser";
234
+ };
235
+ type ChatHistoryPageEncodedPendingInteractionsItem = {
236
+ source_message_id: string;
237
+ source_part_id: string;
238
+ response_target_id: string;
239
+ tool_call_id: string;
240
+ target_tenant_user_id: string | null;
241
+ target_client_id: string | null;
242
+ execution_location: ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation;
243
+ };
244
+ interface ChatHistoryPageEncoded {
245
+ messages: ChatHistoryPageEncodedMessagesItem[];
246
+ thread: ChatHistoryPageEncodedThread;
247
+ pending_interactions: ChatHistoryPageEncodedPendingInteractionsItem[];
248
+ /** Pass as page_after to fetch the next page; null means no next page. */
249
+ page_after: string | null;
250
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
251
+ page_before: string | null;
252
+ }
253
+ type ChatThreadEncodedRole = (typeof ChatThreadEncodedRole)[keyof typeof ChatThreadEncodedRole];
254
+ declare const ChatThreadEncodedRole: {
255
+ readonly viewer: "viewer";
256
+ readonly member: "member";
257
+ readonly manager: "manager";
258
+ };
259
+ interface ChatThreadEncoded {
260
+ id: string;
261
+ title: string | null;
262
+ agent_id: string | null;
263
+ /** @minimum 0 */
264
+ version: number;
265
+ current_leaf_message_id: string | null;
266
+ role: ChatThreadEncodedRole;
267
+ writer_active: boolean;
268
+ created_at: string;
269
+ updated_at: string;
270
+ }
271
+ interface UpdateChatThreadInputEncoded {
272
+ /**
273
+ * @minLength 1
274
+ * @maxLength 200
275
+ */
276
+ title: string;
277
+ /** @minimum 0 */
278
+ expected_version: number;
279
+ }
280
+ interface ChatThreadPage {
281
+ items: ChatThreadEncoded[];
282
+ /** Pass as page_after to fetch the next page; null means no next page. */
283
+ page_after: string | null;
284
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
285
+ page_before: string | null;
286
+ }
287
+ interface CreateChatThreadInputEncoded {
288
+ /**
289
+ * @minLength 1
290
+ * @maxLength 200
291
+ */
292
+ title?: string;
293
+ agent_id?: string;
294
+ }
295
+ type ChatConfigurationCapabilities = {
296
+ attachments: boolean;
297
+ };
298
+ interface ChatConfiguration {
299
+ capabilities: ChatConfigurationCapabilities;
300
+ }
301
+ type ChatRunInputForwardedProps = {
302
+ [key: string]: unknown;
303
+ } & {
304
+ clientId: string;
305
+ };
306
+ /**
307
+ * Legacy mirror of forwardedProps sent by TanStack AI clients.
308
+ */
309
+ type ChatRunInputData = {
310
+ [key: string]: unknown;
311
+ };
312
+ /**
313
+ * 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.
314
+ */
315
+ interface ChatRunInput {
316
+ threadId: string;
317
+ runId: string;
318
+ messages: unknown[];
319
+ tools: unknown[];
320
+ context: unknown[];
321
+ forwardedProps: ChatRunInputForwardedProps;
322
+ /** Legacy mirror of forwardedProps sent by TanStack AI clients. */
323
+ data?: ChatRunInputData;
324
+ state?: unknown;
325
+ parentRunId?: string;
326
+ }
327
+ type ChatMessageEncodedRole = (typeof ChatMessageEncodedRole)[keyof typeof ChatMessageEncodedRole];
328
+ declare const ChatMessageEncodedRole: {
329
+ readonly user: "user";
330
+ readonly assistant: "assistant";
331
+ readonly tool: "tool";
332
+ };
333
+ type ChatMessageEncodedState = (typeof ChatMessageEncodedState)[keyof typeof ChatMessageEncodedState];
334
+ declare const ChatMessageEncodedState: {
335
+ readonly draft: "draft";
336
+ readonly complete: "complete";
337
+ readonly interrupted: "interrupted";
338
+ };
339
+ type ChatMessageEncodedPartsItem = {
340
+ [key: string]: unknown;
341
+ };
342
+ interface ChatMessageEncoded {
343
+ id: string;
344
+ role: ChatMessageEncodedRole;
345
+ state: ChatMessageEncodedState;
346
+ parent_message_id: string | null;
347
+ parts: ChatMessageEncodedPartsItem[];
348
+ author_tenant_user_id: string | null;
349
+ source_assistant_message_id: string | null;
350
+ source_tool_part_id: string | null;
351
+ response_target_id: string | null;
352
+ created_at: string;
353
+ }
354
+ type DirectoryThreadEncodedParticipantsItem = {
355
+ name: string | null;
356
+ external_id: string;
357
+ };
358
+ interface DirectoryThreadEncoded {
359
+ id: string;
360
+ tenant_id: string;
361
+ tenant_name: string | null;
362
+ tenant_external_id: string;
363
+ participants: DirectoryThreadEncodedParticipantsItem[];
364
+ title: string | null;
365
+ agent_id: string | null;
366
+ created_at: string;
367
+ updated_at: string;
368
+ }
369
+ interface DirectoryThreadHistoryPage {
370
+ messages: ChatMessageEncoded[];
371
+ thread: DirectoryThreadEncoded;
372
+ /** Pass as page_after to fetch the next page; null means no next page. */
373
+ page_after: string | null;
374
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
375
+ page_before: string | null;
376
+ }
377
+ interface DirectoryThreadPage {
378
+ items: DirectoryThreadEncoded[];
379
+ /** Pass as page_after to fetch the next page; null means no next page. */
380
+ page_after: string | null;
381
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
382
+ page_before: string | null;
383
+ }
384
+ interface Organization {
385
+ id: string;
386
+ name: string;
387
+ /** Editable dashboard URL segment. Use id, not slug, as the stable identity. */
388
+ slug: string;
389
+ }
390
+ /**
391
+ * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
392
+ */
393
+ type UpdateTenantUserInputMetadata = {
394
+ [key: string]: unknown;
395
+ };
396
+ interface UpdateTenantUserInput {
397
+ /** Defaults to null on creation. Send null to clear the name. */
398
+ name?: string | null;
399
+ /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
400
+ metadata?: UpdateTenantUserInputMetadata;
401
+ /** Defaults to false on creation. Stored admin does not change signed JWT authority. */
402
+ admin?: boolean;
403
+ }
404
+ /**
405
+ * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
406
+ */
407
+ type CreateTenantUserInputMetadata = {
408
+ [key: string]: unknown;
409
+ };
410
+ interface CreateTenantUserInput {
411
+ /**
412
+ * Your stable external identity. Exact and case-sensitive; whitespace is preserved. Immutable after creation.
413
+ * @minLength 1
414
+ * @maxLength 255
415
+ */
416
+ external_id: string;
417
+ /** Defaults to null on creation. Send null to clear the name. */
418
+ name?: string | null;
419
+ /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
420
+ metadata?: CreateTenantUserInputMetadata;
421
+ /** Defaults to false on creation. Stored admin does not change signed JWT authority. */
422
+ admin?: boolean;
423
+ }
424
+ /**
425
+ * Live keyset page in ascending ID order within one Tenant. Pass either non-null continuation value as the same-named request parameter.
426
+ */
427
+ interface TenantUserPage {
428
+ items: TenantUserRecordEncoded[];
429
+ /** Pass as page_after to fetch the next page; null means no next page. */
430
+ page_after: string | null;
431
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
432
+ page_before: string | null;
433
+ }
434
+ /**
435
+ * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
436
+ */
437
+ type UpdateTenantInputMetadata = {
438
+ [key: string]: unknown;
439
+ };
440
+ interface UpdateTenantInput {
441
+ /** Defaults to null on creation. Send null to clear the name. */
442
+ name?: string | null;
443
+ /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
444
+ metadata?: UpdateTenantInputMetadata;
445
+ }
446
+ /**
447
+ * Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object.
448
+ */
449
+ type CreateTenantInputMetadata = {
450
+ [key: string]: unknown;
451
+ };
452
+ interface CreateTenantInput {
453
+ /**
454
+ * Your stable external identity. Exact and case-sensitive; whitespace is preserved. Immutable after creation.
455
+ * @minLength 1
456
+ * @maxLength 255
457
+ */
458
+ external_id: string;
459
+ /** Defaults to null on creation. Send null to clear the name. */
460
+ name?: string | null;
461
+ /** Customer-defined JSON object; keys are preserved. Defaults to {} on creation. Updates replace the entire object. */
462
+ metadata?: CreateTenantInputMetadata;
463
+ }
464
+ /**
465
+ * Live keyset page. Pass either non-null continuation value as the same-named request parameter.
466
+ */
467
+ interface TenantPage {
468
+ items: TenantRecordEncoded[];
469
+ /** Pass as page_after to fetch the next page; null means no next page. */
470
+ page_after: string | null;
471
+ /** Pass as page_before to fetch the previous page; null means no previous page. */
472
+ page_before: string | null;
473
+ }
474
+ type ListTenantsParams = {
475
+ /**
476
+ * Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
477
+ * @maxLength 255
478
+ * @pattern ^[^\u0000]*$
479
+ */
480
+ q?: string;
481
+ /**
482
+ * Exact, case-sensitive external ID; whitespace is preserved. Returns zero or one item.
483
+ * @minLength 1
484
+ * @maxLength 255
485
+ */
486
+ "filter[external_id]"?: string;
487
+ /**
488
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
489
+ * @minimum 1
490
+ */
491
+ page_size?: number;
492
+ /**
493
+ * @minLength 1
494
+ * @maxLength 2048
495
+ */
496
+ page_after?: string;
497
+ /**
498
+ * @minLength 1
499
+ * @maxLength 2048
500
+ */
501
+ page_before?: string;
502
+ };
503
+ type ListUsersForTenantParams = {
504
+ /**
505
+ * Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
506
+ * @maxLength 255
507
+ * @pattern ^[^\u0000]*$
508
+ */
509
+ q?: string;
510
+ /**
511
+ * Exact, case-sensitive external ID; whitespace is preserved. Returns zero or one item.
512
+ * @minLength 1
513
+ * @maxLength 255
514
+ */
515
+ "filter[external_id]"?: string;
516
+ /**
517
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
518
+ * @minimum 1
519
+ */
520
+ page_size?: number;
521
+ /**
522
+ * @minLength 1
523
+ * @maxLength 2048
524
+ */
525
+ page_after?: string;
526
+ /**
527
+ * @minLength 1
528
+ * @maxLength 2048
529
+ */
530
+ page_before?: string;
531
+ "filter[admin]"?: ListUsersForTenantFilterAdmin;
532
+ };
533
+ type ListUsersForTenantFilterAdmin = (typeof ListUsersForTenantFilterAdmin)[keyof typeof ListUsersForTenantFilterAdmin];
534
+ declare const ListUsersForTenantFilterAdmin: {
535
+ readonly true: "true";
536
+ readonly false: "false";
537
+ };
538
+ type ListThreadsParams = {
539
+ /**
540
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
541
+ * @minimum 1
542
+ */
543
+ page_size?: number;
544
+ /**
545
+ * @minLength 1
546
+ * @maxLength 2048
547
+ */
548
+ page_after?: string;
549
+ /**
550
+ * @minLength 1
551
+ * @maxLength 2048
552
+ */
553
+ page_before?: string;
554
+ /**
555
+ * Case-insensitive literal substring of the conversation title. Trimmed, blank means no search.
556
+ * @maxLength 255
557
+ * @pattern ^[^\u0000]*$
558
+ */
559
+ q?: string;
560
+ "filter[tenant_id]"?: string;
561
+ };
562
+ type ListThreadMessagesParams = {
563
+ /**
564
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
565
+ * @minimum 1
566
+ */
567
+ page_size?: number;
568
+ /**
569
+ * @minLength 1
570
+ * @maxLength 2048
571
+ */
572
+ page_after?: string;
573
+ /**
574
+ * @minLength 1
575
+ * @maxLength 2048
576
+ */
577
+ page_before?: string;
578
+ };
579
+ type GetChatConfigParams = {
580
+ agentId?: string;
581
+ };
582
+ type GetChatFileParams = {
583
+ ticket: string;
584
+ };
585
+ type ListChatThreadsParams = {
586
+ /**
587
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
588
+ * @minimum 1
589
+ */
590
+ page_size?: number;
591
+ /**
592
+ * @minLength 1
593
+ * @maxLength 2048
594
+ */
595
+ page_after?: string;
596
+ /**
597
+ * @minLength 1
598
+ * @maxLength 2048
599
+ */
600
+ page_before?: string;
601
+ /**
602
+ * Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
603
+ * @maxLength 255
604
+ * @pattern ^[^\u0000]*$
605
+ */
606
+ q?: string;
607
+ };
608
+ type DeleteChatThreadParams = {
609
+ expected_version: string;
610
+ };
611
+ type ListChatMessagesParams = {
612
+ /**
613
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
614
+ * @minimum 1
615
+ */
616
+ page_size?: number;
617
+ /**
618
+ * @minLength 1
619
+ * @maxLength 2048
620
+ */
621
+ page_after?: string;
622
+ /**
623
+ * @minLength 1
624
+ * @maxLength 2048
625
+ */
626
+ page_before?: string;
627
+ };
628
+ type ListChatParticipantsParams = {
629
+ /**
630
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
631
+ * @minimum 1
632
+ */
633
+ page_size?: number;
634
+ /**
635
+ * @minLength 1
636
+ * @maxLength 2048
637
+ */
638
+ page_after?: string;
639
+ /**
640
+ * @minLength 1
641
+ * @maxLength 2048
642
+ */
643
+ page_before?: string;
644
+ };
645
+ type SearchChatTenantUsersParams = {
646
+ /**
647
+ * Positive integer, default 20. Values above 100 are accepted and capped. page_after and page_before are mutually exclusive.
648
+ * @minimum 1
649
+ */
650
+ page_size?: number;
651
+ /**
652
+ * @minLength 1
653
+ * @maxLength 2048
654
+ */
655
+ page_after?: string;
656
+ /**
657
+ * @minLength 1
658
+ * @maxLength 2048
659
+ */
660
+ page_before?: string;
661
+ /**
662
+ * Case-insensitive literal substring of name or external_id. Trimmed, blank means no search.
663
+ * @maxLength 255
664
+ * @pattern ^[^\u0000]*$
665
+ */
666
+ q?: string;
667
+ };
668
+ type RemoveChatParticipantParams = {
669
+ expected_version: string;
670
+ };
671
+ declare const getListTenantsUrl: (params: ListTenantsParams) => string;
672
+ /**
673
+ * 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.
674
+ * @summary List Tenants
675
+ */
676
+ declare const listTenants: (params: ListTenantsParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantPage>;
677
+ declare const getCreateTenantUrl: () => string;
678
+ /**
679
+ * 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.
680
+ * @summary Create a Tenant
681
+ */
682
+ declare const createTenant: (createTenantInput: CreateTenantInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantRecordEncoded>;
683
+ declare const getGetTenantUrl: (id: string) => string;
684
+ /**
685
+ * Get a Tenant by internal UUID, not external_id.
686
+ * @summary Get a Tenant
687
+ */
688
+ declare const getTenant: (id: string, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantRecordEncoded>;
689
+ declare const getUpdateTenantUrl: (id: string) => string;
690
+ /**
691
+ * 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.
692
+ * @summary Update a Tenant
693
+ */
694
+ declare const updateTenant: (id: string, updateTenantInput: UpdateTenantInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantRecordEncoded>;
695
+ declare const getListUsersForTenantUrl: (tenantId: string, params: ListUsersForTenantParams) => string;
696
+ /**
697
+ * 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.
698
+ * @summary List TenantUsers
699
+ */
700
+ declare const listUsersForTenant: (tenantId: string, params: ListUsersForTenantParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserPage>;
701
+ declare const getCreateTenantUserUrl: (tenantId: string) => string;
702
+ /**
703
+ * 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.
704
+ * @summary Create a TenantUser
705
+ */
706
+ declare const createTenantUser: (tenantId: string, createTenantUserInput: CreateTenantUserInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserRecordEncoded>;
707
+ declare const getGetTenantUserUrl: (tenantId: string, id: string) => string;
708
+ /**
709
+ * Get a TenantUser by the internal tenant_id and id pair within the authorized scope. No identity upsert.
710
+ * @summary Get a TenantUser
711
+ */
712
+ declare const getTenantUser: (tenantId: string, id: string, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserRecordEncoded>;
713
+ declare const getUpdateTenantUserUrl: (tenantId: string, id: string) => string;
714
+ /**
715
+ * 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.
716
+ * @summary Update a TenantUser
717
+ */
718
+ declare const updateTenantUser: (tenantId: string, id: string, updateTenantUserInput: UpdateTenantUserInput, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<TenantUserRecordEncoded>;
719
+ declare const getGetOrganizationUrl: () => string;
720
+ /**
721
+ * 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.
722
+ * @summary Get the current Organization
723
+ */
724
+ declare const getOrganization: (options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<Organization>;
725
+ declare const getListThreadsUrl: (params: ListThreadsParams) => string;
726
+ /**
727
+ * 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.
728
+ * @summary List conversations for administration
729
+ */
730
+ declare const listThreads: (params: ListThreadsParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<DirectoryThreadPage>;
731
+ declare const getListThreadMessagesUrl: (tenantId: string, id: string, params: ListThreadMessagesParams) => string;
732
+ /**
733
+ * @summary Read conversation history for administration
734
+ */
735
+ declare const listThreadMessages: (tenantId: string, id: string, params: ListThreadMessagesParams, options: Parameters<typeof astralBeamApiFetch>[1]) => Promise<DirectoryThreadHistoryPage>;
736
+ declare const getGetThreadAttachmentUrl: (tenantId: string, id: string, messageId: string, partId: string) => string;
737
+ /**
738
+ * @summary Download a saved conversation upload for administration
739
+ */
740
+ declare const getThreadAttachment: (tenantId: string, id: string, messageId: string, partId: string, options: Parameters<typeof astralBeamResourceFetch>[1]) => Promise<Response>;
741
+ declare const getRunChatUrl: () => string;
742
+ /**
743
+ * 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.
744
+ * @summary Run chat
745
+ */
746
+ declare const runChat: (chatRunInput: ChatRunInput, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
747
+ declare const getGetChatConfigUrl: (params: GetChatConfigParams) => string;
748
+ /**
749
+ * 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.
750
+ * @summary Get chat capabilities
751
+ */
752
+ declare const getChatConfig: (params: GetChatConfigParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatConfiguration>;
753
+ declare const getGetChatFileUrl: (params: GetChatFileParams) => string;
754
+ /**
755
+ * Use the signed ticket returned when chat publishes an artifact. No bearer token is required. Returns the original bytes with a content-sniffed Content-Type and Content-Disposition filename. Invalid or expired tickets, a missing sandbox, and rejected artifact checks return 404. Provider or file-read failures return 500.
756
+ * @summary Download a chat artifact
757
+ */
758
+ declare const getChatFile: (params: GetChatFileParams, options?: Parameters<typeof astralBeamFileFetch>[1]) => Promise<Response>;
759
+ declare const getCreateChatThreadUrl: () => string;
760
+ /**
761
+ * @summary Create a saved conversation
762
+ */
763
+ declare const createChatThread: (createChatThreadInputEncoded: CreateChatThreadInputEncoded, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadEncoded>;
764
+ declare const getListChatThreadsUrl: (params: ListChatThreadsParams) => string;
765
+ /**
766
+ * @summary List your conversations
767
+ */
768
+ declare const listChatThreads: (params: ListChatThreadsParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadPage>;
769
+ declare const getGetChatThreadUrl: (id: string) => string;
770
+ /**
771
+ * @summary Get a saved conversation
772
+ */
773
+ declare const getChatThread: (id: string, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadEncoded>;
774
+ declare const getUpdateChatThreadUrl: (id: string) => string;
775
+ /**
776
+ * @summary Rename a conversation
777
+ */
778
+ declare const updateChatThread: (id: string, updateChatThreadInputEncoded: UpdateChatThreadInputEncoded, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatThreadEncoded>;
779
+ declare const getDeleteChatThreadUrl: (id: string, params: DeleteChatThreadParams) => string;
780
+ /**
781
+ * @summary Delete a conversation
782
+ */
783
+ declare const deleteChatThread: (id: string, params: DeleteChatThreadParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<void>;
784
+ declare const getListChatMessagesUrl: (id: string, params: ListChatMessagesParams) => string;
785
+ /**
786
+ * @summary Read conversation history
787
+ */
788
+ declare const listChatMessages: (id: string, params: ListChatMessagesParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatHistoryPageEncoded>;
789
+ declare const getListChatParticipantsUrl: (id: string, params: ListChatParticipantsParams) => string;
790
+ /**
791
+ * @summary List conversation participants
792
+ */
793
+ declare const listChatParticipants: (id: string, params: ListChatParticipantsParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatParticipantPage>;
794
+ declare const getSearchChatTenantUsersUrl: (id: string, params: SearchChatTenantUsersParams) => string;
795
+ /**
796
+ * 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.
797
+ * @summary Search same-Tenant users for sharing
798
+ */
799
+ declare const searchChatTenantUsers: (id: string, params: SearchChatTenantUsersParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatTenantUserPage>;
800
+ declare const getSetChatParticipantUrl: (id: string, tenantUserId: string) => string;
801
+ /**
802
+ * @summary Add a participant or change their role
803
+ */
804
+ declare const setChatParticipant: (id: string, tenantUserId: string, setChatParticipantInputEncoded: SetChatParticipantInputEncoded, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<ChatParticipantEncoded>;
805
+ declare const getRemoveChatParticipantUrl: (id: string, tenantUserId: string, params: RemoveChatParticipantParams) => string;
806
+ /**
807
+ * @summary Remove a conversation participant
808
+ */
809
+ declare const removeChatParticipant: (id: string, tenantUserId: string, params: RemoveChatParticipantParams, options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<void>;
810
+ declare const getResolveChatToolResultUrl: (id: string) => string;
811
+ /**
812
+ * @summary Submit a pending tool result
813
+ */
814
+ declare const resolveChatToolResult: (id: string, resolveChatToolResultInputEncoded: ResolveChatToolResultInputEncoded, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
815
+ declare const getGetChatAttachmentUrl: (id: string, messageId: string, partId: string) => string;
816
+ /**
817
+ * @summary Download a saved attachment
818
+ */
819
+ declare const getChatAttachment: (id: string, messageId: string, partId: string, options: Parameters<typeof astralBeamChatFetch>[1]) => Promise<Response>;
820
+ declare const getGetCurrentUserUrl: () => string;
821
+ /**
822
+ * 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.
823
+ * @summary Get the current user
824
+ */
825
+ declare const getCurrentUser: (options: Parameters<typeof astralBeamJwtFetch>[1]) => Promise<CurrentUser>;
826
+ //#endregion
827
+ export { ResolveChatToolResultInputEncoded as $, getThreadAttachment as $t, CreateChatThreadInputEncoded as A, getGetChatConfigUrl as At, DirectoryThreadPage as B, getListChatThreadsUrl as Bt, ChatRunInputForwardedProps as C, JwtOptions as Cn, getChatThread as Ct, ChatThreadEncoded as D, getCurrentUser as Dt, ChatTenantUserPage as E, getCreateTenantUserUrl as Et, CurrentUser as F, getGetTenantUrl as Ft, ListChatThreadsParams as G, getOrganization as Gt, GetChatFileParams as H, getListThreadMessagesUrl as Ht, DeleteChatThreadParams as I, getGetTenantUserUrl as It, ListThreadsParams as J, getRunChatUrl as Jt, ListTenantsParams as K, getRemoveChatParticipantUrl as Kt, DirectoryThreadEncoded as L, getGetThreadAttachmentUrl as Lt, CreateTenantInputMetadata as M, getGetChatThreadUrl as Mt, CreateTenantUserInput as N, getGetCurrentUserUrl as Nt, ChatThreadEncodedRole as O, getDeleteChatThreadUrl as Ot, CreateTenantUserInputMetadata as P, getGetOrganizationUrl as Pt, RemoveChatParticipantParams as Q, getTenantUser as Qt, DirectoryThreadEncodedParticipantsItem as R, getListChatMessagesUrl as Rt, ChatRunInputData as S, FileOptions as Sn, getChatFile as St, ChatTenantUserEncoded as T, getCreateTenantUrl as Tt, ListChatMessagesParams as U, getListThreadsUrl as Ut, GetChatConfigParams as V, getListTenantsUrl as Vt, ListChatParticipantsParams as W, getListUsersForTenantUrl as Wt, ListUsersForTenantParams as X, getSetChatParticipantUrl as Xt, ListUsersForTenantFilterAdmin as Y, getSearchChatTenantUsersUrl as Yt, Organization as Z, getTenant as Zt, ChatMessageEncodedState as _, updateTenantUser as _n, createTenant as _t, ChatHistoryPageEncoded as a, listChatThreads as an, TenantPage as at, ChatParticipantPage as b, ApiRequestOptions as bn, getChatAttachment as bt, ChatHistoryPageEncodedMessagesItemRole as c, listThreads as cn, TenantUserPage as ct, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as d, resolveChatToolResult as dn, UpdateChatThreadInputEncoded as dt, getUpdateChatThreadUrl as en, ResolveChatToolResultInputEncodedResultsItem as et, ChatHistoryPageEncodedThread as f, runChat as fn, UpdateTenantInput as ft, ChatMessageEncodedRole as g, updateTenant as gn, createChatThread as gt, ChatMessageEncodedPartsItem as h, updateChatThread as hn, UpdateTenantUserInputMetadata as ht, ChatConfigurationCapabilities as i, listChatParticipants as in, SetChatParticipantInputEncodedRole as it, CreateTenantInput as j, getGetChatFileUrl as jt, ChatThreadPage as k, getGetChatAttachmentUrl as kt, ChatHistoryPageEncodedMessagesItemState as l, listUsersForTenant as ln, TenantUserRecordEncoded as lt, ChatMessageEncoded as m, setChatParticipant as mn, UpdateTenantUserInput as mt, AstralBeamApiErrorIssuesItem as n, getUpdateTenantUserUrl as nn, SearchChatTenantUsersParams as nt, ChatHistoryPageEncodedMessagesItem as o, listTenants as on, TenantRecordEncoded as ot, ChatHistoryPageEncodedThreadRole as p, searchChatTenantUsers as pn, UpdateTenantInputMetadata as pt, ListThreadMessagesParams as q, getResolveChatToolResultUrl as qt, ChatConfiguration as r, listChatMessages as rn, SetChatParticipantInputEncoded as rt, ChatHistoryPageEncodedMessagesItemPartsItem as s, listThreadMessages as sn, TenantRecordEncodedMetadata as st, AstralBeamApiError as t, getUpdateTenantUrl as tn, ResolveChatToolResultInputEncodedResultsItemOutcome as tt, ChatHistoryPageEncodedPendingInteractionsItem as u, removeChatParticipant as un, TenantUserRecordEncodedMetadata as ut, ChatParticipantEncoded as v, ApiKeyOptions as vn, createTenantUser as vt, ChatSubmissionReceiptEncoded as w, isAstralBeamApiError as wn, getCreateChatThreadUrl as wt, ChatRunInput as x, AstralBeamApiError$1 as xn, getChatConfig as xt, ChatParticipantEncodedRole as y, ApiOptions as yn, deleteChatThread as yt, DirectoryThreadHistoryPage as z, getListChatParticipantsUrl as zt };