@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,709 @@
|
|
|
1
|
+
//#region src/lib/constants.ts
|
|
2
|
+
/** Base URL of the AstralBeam API when the mount options give none; versioned routes hang off it. */
|
|
3
|
+
const DEFAULT_API_URL = "https://astralbeam.ai/api";
|
|
4
|
+
/** Host endpoint that mints chat JWTs when the mount options give none. */
|
|
5
|
+
const DEFAULT_CHAT_AUTH_TOKEN_URL = "/api/astralbeam/token";
|
|
6
|
+
/** Color scheme used when the mount options and the React prop give none. */
|
|
7
|
+
const DEFAULT_COLOR_SCHEME = "system";
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/api/api.ts
|
|
10
|
+
function isAstralBeamApiError(error) {
|
|
11
|
+
return error instanceof Error && error.name === "AstralBeamApiError" && "status" in error && typeof error.status === "number";
|
|
12
|
+
}
|
|
13
|
+
function resolveApiUrl(path, apiUrl = DEFAULT_API_URL) {
|
|
14
|
+
return `${apiUrl.replace(/\/+$/, "")}${path.replace(/^\/api(?=\/)/, "")}`;
|
|
15
|
+
}
|
|
16
|
+
function isApiErrorBody(value, status) {
|
|
17
|
+
if (!value || typeof value !== "object") return false;
|
|
18
|
+
const body = value;
|
|
19
|
+
return body.status === status && typeof body.type === "string" && typeof body.title === "string" && typeof body.detail === "string" && (body.reference === void 0 || typeof body.reference === "string") && (body.issues === void 0 || Array.isArray(body.issues) && body.issues.every((issue) => issue && typeof issue.path === "string" && typeof issue.message === "string"));
|
|
20
|
+
}
|
|
21
|
+
async function apiResponse(path, options) {
|
|
22
|
+
const { apiUrl, apiKey, astralBeamToken, fetchClient = globalThis.fetch, ...init } = options;
|
|
23
|
+
const headers = new Headers();
|
|
24
|
+
const entries = init.headers instanceof Headers ? init.headers.entries() : Array.isArray(init.headers) ? init.headers : Object.entries(init.headers ?? {});
|
|
25
|
+
for (const [name, value] of entries) headers.set(name, value);
|
|
26
|
+
headers.delete("authorization");
|
|
27
|
+
headers.delete("x-api-key");
|
|
28
|
+
if (apiKey) headers.set("x-api-key", apiKey);
|
|
29
|
+
if (astralBeamToken) headers.set("authorization", `Bearer ${astralBeamToken}`);
|
|
30
|
+
const response = await fetchClient(resolveApiUrl(path, apiUrl), {
|
|
31
|
+
...init,
|
|
32
|
+
headers,
|
|
33
|
+
...apiKey ? { redirect: "error" } : {}
|
|
34
|
+
});
|
|
35
|
+
if (response.ok) return response;
|
|
36
|
+
const value = await response.json().catch((error) => {
|
|
37
|
+
if (!(error instanceof SyntaxError)) throw error;
|
|
38
|
+
});
|
|
39
|
+
const body = isApiErrorBody(value, response.status) ? value : void 0;
|
|
40
|
+
throw Object.assign(new Error(body?.detail ?? `AstralBeam API returned HTTP ${response.status}`), {
|
|
41
|
+
name: "AstralBeamApiError",
|
|
42
|
+
status: response.status,
|
|
43
|
+
headers: response.headers,
|
|
44
|
+
body
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
async function astralBeamApiFetch(path, options) {
|
|
48
|
+
const response = await apiResponse(path, options);
|
|
49
|
+
if (response.status === 204) return void 0;
|
|
50
|
+
return await response.json();
|
|
51
|
+
}
|
|
52
|
+
function astralBeamJwtFetch(path, options) {
|
|
53
|
+
return astralBeamApiFetch(path, options);
|
|
54
|
+
}
|
|
55
|
+
function astralBeamResourceFetch(path, options) {
|
|
56
|
+
return apiResponse(path, options);
|
|
57
|
+
}
|
|
58
|
+
function astralBeamChatFetch(path, options) {
|
|
59
|
+
return apiResponse(path, options);
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/api/generated/api.ts
|
|
63
|
+
/**
|
|
64
|
+
* Generated by Orval. Do not edit by hand.
|
|
65
|
+
*/
|
|
66
|
+
const ResolveChatToolResultInputEncodedResultsItemOutcome = {
|
|
67
|
+
succeeded: "succeeded",
|
|
68
|
+
failed: "failed",
|
|
69
|
+
skipped: "skipped",
|
|
70
|
+
unknown: "unknown"
|
|
71
|
+
};
|
|
72
|
+
const ChatParticipantEncodedRole = {
|
|
73
|
+
viewer: "viewer",
|
|
74
|
+
member: "member",
|
|
75
|
+
manager: "manager"
|
|
76
|
+
};
|
|
77
|
+
const SetChatParticipantInputEncodedRole = {
|
|
78
|
+
viewer: "viewer",
|
|
79
|
+
member: "member",
|
|
80
|
+
manager: "manager"
|
|
81
|
+
};
|
|
82
|
+
const ChatHistoryPageEncodedMessagesItemRole = {
|
|
83
|
+
user: "user",
|
|
84
|
+
assistant: "assistant",
|
|
85
|
+
tool: "tool"
|
|
86
|
+
};
|
|
87
|
+
const ChatHistoryPageEncodedMessagesItemState = {
|
|
88
|
+
draft: "draft",
|
|
89
|
+
complete: "complete",
|
|
90
|
+
interrupted: "interrupted"
|
|
91
|
+
};
|
|
92
|
+
const ChatHistoryPageEncodedThreadRole = {
|
|
93
|
+
viewer: "viewer",
|
|
94
|
+
member: "member",
|
|
95
|
+
manager: "manager"
|
|
96
|
+
};
|
|
97
|
+
const ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation = {
|
|
98
|
+
server_api: "server_api",
|
|
99
|
+
sandbox: "sandbox",
|
|
100
|
+
browser: "browser"
|
|
101
|
+
};
|
|
102
|
+
const ChatThreadEncodedRole = {
|
|
103
|
+
viewer: "viewer",
|
|
104
|
+
member: "member",
|
|
105
|
+
manager: "manager"
|
|
106
|
+
};
|
|
107
|
+
const ChatUsageUsageLimitsItemScope = {
|
|
108
|
+
global: "global",
|
|
109
|
+
tenant: "tenant",
|
|
110
|
+
tenant_user: "tenant_user",
|
|
111
|
+
thread: "thread"
|
|
112
|
+
};
|
|
113
|
+
const ChatUsageUsageLimitsItemMetric = {
|
|
114
|
+
tokens: "tokens",
|
|
115
|
+
spend: "spend"
|
|
116
|
+
};
|
|
117
|
+
const ChatMessageEncodedRole = {
|
|
118
|
+
user: "user",
|
|
119
|
+
assistant: "assistant",
|
|
120
|
+
tool: "tool"
|
|
121
|
+
};
|
|
122
|
+
const ChatMessageEncodedState = {
|
|
123
|
+
draft: "draft",
|
|
124
|
+
complete: "complete",
|
|
125
|
+
interrupted: "interrupted"
|
|
126
|
+
};
|
|
127
|
+
const ListUsersForTenantFilterAdmin = {
|
|
128
|
+
true: "true",
|
|
129
|
+
false: "false"
|
|
130
|
+
};
|
|
131
|
+
const UploadChatFileBodyType = {
|
|
132
|
+
image: "image",
|
|
133
|
+
document: "document"
|
|
134
|
+
};
|
|
135
|
+
const UploadChatFileBodySourceType = { data: "data" };
|
|
136
|
+
const getListTenantsUrl = (params) => {
|
|
137
|
+
const normalizedParams = new URLSearchParams();
|
|
138
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
139
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
140
|
+
});
|
|
141
|
+
const stringifiedParams = normalizedParams.toString();
|
|
142
|
+
return stringifiedParams.length > 0 ? `/api/v1/tenants?${stringifiedParams}` : `/api/v1/tenants`;
|
|
143
|
+
};
|
|
144
|
+
/**
|
|
145
|
+
* 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.
|
|
146
|
+
* @summary List Tenants
|
|
147
|
+
*/
|
|
148
|
+
const listTenants = (params, options) => {
|
|
149
|
+
return astralBeamApiFetch(getListTenantsUrl(params), {
|
|
150
|
+
...options,
|
|
151
|
+
method: "GET"
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
const getCreateTenantUrl = () => {
|
|
155
|
+
return `/api/v1/tenants`;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* 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.
|
|
159
|
+
* @summary Create a Tenant
|
|
160
|
+
*/
|
|
161
|
+
const createTenant = (createTenantInput, options) => {
|
|
162
|
+
const getHeaders = (h) => {
|
|
163
|
+
if (!h) return {};
|
|
164
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
165
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
166
|
+
const headers = {};
|
|
167
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
168
|
+
return headers;
|
|
169
|
+
};
|
|
170
|
+
return astralBeamApiFetch(getCreateTenantUrl(), {
|
|
171
|
+
...options,
|
|
172
|
+
method: "POST",
|
|
173
|
+
headers: {
|
|
174
|
+
"Content-Type": "application/json",
|
|
175
|
+
...getHeaders(options?.headers)
|
|
176
|
+
},
|
|
177
|
+
body: JSON.stringify(createTenantInput)
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
const getGetTenantUrl = (id) => {
|
|
181
|
+
return `/api/v1/tenants/${encodeURIComponent(String(id))}`;
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Get a Tenant by internal UUID, not external_id.
|
|
185
|
+
* @summary Get a Tenant
|
|
186
|
+
*/
|
|
187
|
+
const getTenant = (id, options) => {
|
|
188
|
+
return astralBeamApiFetch(getGetTenantUrl(id), {
|
|
189
|
+
...options,
|
|
190
|
+
method: "GET"
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
const getUpdateTenantUrl = (id) => {
|
|
194
|
+
return `/api/v1/tenants/${encodeURIComponent(String(id))}`;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* 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.
|
|
198
|
+
* @summary Update a Tenant
|
|
199
|
+
*/
|
|
200
|
+
const updateTenant = (id, updateTenantInput, options) => {
|
|
201
|
+
const getHeaders = (h) => {
|
|
202
|
+
if (!h) return {};
|
|
203
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
204
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
205
|
+
const headers = {};
|
|
206
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
207
|
+
return headers;
|
|
208
|
+
};
|
|
209
|
+
return astralBeamApiFetch(getUpdateTenantUrl(id), {
|
|
210
|
+
...options,
|
|
211
|
+
method: "PATCH",
|
|
212
|
+
headers: {
|
|
213
|
+
"Content-Type": "application/json",
|
|
214
|
+
...getHeaders(options?.headers)
|
|
215
|
+
},
|
|
216
|
+
body: JSON.stringify(updateTenantInput)
|
|
217
|
+
});
|
|
218
|
+
};
|
|
219
|
+
const getListUsersForTenantUrl = (tenantId, params) => {
|
|
220
|
+
const normalizedParams = new URLSearchParams();
|
|
221
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
222
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
223
|
+
});
|
|
224
|
+
const stringifiedParams = normalizedParams.toString();
|
|
225
|
+
return stringifiedParams.length > 0 ? `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/tenant_users?${stringifiedParams}` : `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/tenant_users`;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* 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.
|
|
229
|
+
* @summary List TenantUsers
|
|
230
|
+
*/
|
|
231
|
+
const listUsersForTenant = (tenantId, params, options) => {
|
|
232
|
+
return astralBeamApiFetch(getListUsersForTenantUrl(tenantId, params), {
|
|
233
|
+
...options,
|
|
234
|
+
method: "GET"
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
const getCreateTenantUserUrl = (tenantId) => {
|
|
238
|
+
return `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/tenant_users`;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* 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.
|
|
242
|
+
* @summary Create a TenantUser
|
|
243
|
+
*/
|
|
244
|
+
const createTenantUser = (tenantId, createTenantUserInput, options) => {
|
|
245
|
+
const getHeaders = (h) => {
|
|
246
|
+
if (!h) return {};
|
|
247
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
248
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
249
|
+
const headers = {};
|
|
250
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
251
|
+
return headers;
|
|
252
|
+
};
|
|
253
|
+
return astralBeamApiFetch(getCreateTenantUserUrl(tenantId), {
|
|
254
|
+
...options,
|
|
255
|
+
method: "POST",
|
|
256
|
+
headers: {
|
|
257
|
+
"Content-Type": "application/json",
|
|
258
|
+
...getHeaders(options?.headers)
|
|
259
|
+
},
|
|
260
|
+
body: JSON.stringify(createTenantUserInput)
|
|
261
|
+
});
|
|
262
|
+
};
|
|
263
|
+
const getGetTenantUserUrl = (tenantId, id) => {
|
|
264
|
+
return `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/tenant_users/${encodeURIComponent(String(id))}`;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Get a TenantUser by the internal tenant_id and id pair within the authorized scope. No identity upsert.
|
|
268
|
+
* @summary Get a TenantUser
|
|
269
|
+
*/
|
|
270
|
+
const getTenantUser = (tenantId, id, options) => {
|
|
271
|
+
return astralBeamApiFetch(getGetTenantUserUrl(tenantId, id), {
|
|
272
|
+
...options,
|
|
273
|
+
method: "GET"
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
const getUpdateTenantUserUrl = (tenantId, id) => {
|
|
277
|
+
return `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/tenant_users/${encodeURIComponent(String(id))}`;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* 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.
|
|
281
|
+
* @summary Update a TenantUser
|
|
282
|
+
*/
|
|
283
|
+
const updateTenantUser = (tenantId, id, updateTenantUserInput, options) => {
|
|
284
|
+
const getHeaders = (h) => {
|
|
285
|
+
if (!h) return {};
|
|
286
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
287
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
288
|
+
const headers = {};
|
|
289
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
290
|
+
return headers;
|
|
291
|
+
};
|
|
292
|
+
return astralBeamApiFetch(getUpdateTenantUserUrl(tenantId, id), {
|
|
293
|
+
...options,
|
|
294
|
+
method: "PATCH",
|
|
295
|
+
headers: {
|
|
296
|
+
"Content-Type": "application/json",
|
|
297
|
+
...getHeaders(options?.headers)
|
|
298
|
+
},
|
|
299
|
+
body: JSON.stringify(updateTenantUserInput)
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
const getGetOrganizationUrl = () => {
|
|
303
|
+
return `/api/v1/organization`;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* 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.
|
|
307
|
+
* @summary Get the current Organization
|
|
308
|
+
*/
|
|
309
|
+
const getOrganization = (options) => {
|
|
310
|
+
return astralBeamApiFetch(getGetOrganizationUrl(), {
|
|
311
|
+
...options,
|
|
312
|
+
method: "GET"
|
|
313
|
+
});
|
|
314
|
+
};
|
|
315
|
+
const getListThreadsUrl = (params) => {
|
|
316
|
+
const normalizedParams = new URLSearchParams();
|
|
317
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
318
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
319
|
+
});
|
|
320
|
+
const stringifiedParams = normalizedParams.toString();
|
|
321
|
+
return stringifiedParams.length > 0 ? `/api/v1/threads?${stringifiedParams}` : `/api/v1/threads`;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* 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.
|
|
325
|
+
* @summary List conversations for administration
|
|
326
|
+
*/
|
|
327
|
+
const listThreads = (params, options) => {
|
|
328
|
+
return astralBeamApiFetch(getListThreadsUrl(params), {
|
|
329
|
+
...options,
|
|
330
|
+
method: "GET"
|
|
331
|
+
});
|
|
332
|
+
};
|
|
333
|
+
const getListThreadMessagesUrl = (tenantId, id, params) => {
|
|
334
|
+
const normalizedParams = new URLSearchParams();
|
|
335
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
336
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
337
|
+
});
|
|
338
|
+
const stringifiedParams = normalizedParams.toString();
|
|
339
|
+
return stringifiedParams.length > 0 ? `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/threads/${encodeURIComponent(String(id))}/messages?${stringifiedParams}` : `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/threads/${encodeURIComponent(String(id))}/messages`;
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* @summary Read conversation history for administration
|
|
343
|
+
*/
|
|
344
|
+
const listThreadMessages = (tenantId, id, params, options) => {
|
|
345
|
+
return astralBeamApiFetch(getListThreadMessagesUrl(tenantId, id, params), {
|
|
346
|
+
...options,
|
|
347
|
+
method: "GET"
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
const getGetThreadAttachmentUrl = (tenantId, id, messageId, partId) => {
|
|
351
|
+
return `/api/v1/tenants/${encodeURIComponent(String(tenantId))}/threads/${encodeURIComponent(String(id))}/messages/${encodeURIComponent(String(messageId))}/attachments/${encodeURIComponent(String(partId))}`;
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* @summary Download a saved conversation upload for administration
|
|
355
|
+
*/
|
|
356
|
+
const getThreadAttachment = (tenantId, id, messageId, partId, options) => {
|
|
357
|
+
return astralBeamResourceFetch(getGetThreadAttachmentUrl(tenantId, id, messageId, partId), {
|
|
358
|
+
...options,
|
|
359
|
+
method: "GET"
|
|
360
|
+
});
|
|
361
|
+
};
|
|
362
|
+
const getUploadChatFileUrl = () => {
|
|
363
|
+
return `/api/v1/chat/files`;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* 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.
|
|
367
|
+
* @summary Upload a chat file
|
|
368
|
+
*/
|
|
369
|
+
const uploadChatFile = (uploadChatFileBody, options) => {
|
|
370
|
+
const getHeaders = (h) => {
|
|
371
|
+
if (!h) return {};
|
|
372
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
373
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
374
|
+
const headers = {};
|
|
375
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
376
|
+
return headers;
|
|
377
|
+
};
|
|
378
|
+
return astralBeamJwtFetch(getUploadChatFileUrl(), {
|
|
379
|
+
...options,
|
|
380
|
+
method: "POST",
|
|
381
|
+
headers: {
|
|
382
|
+
"Content-Type": "application/json",
|
|
383
|
+
...getHeaders(options?.headers)
|
|
384
|
+
},
|
|
385
|
+
body: JSON.stringify(uploadChatFileBody)
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
const getGetChatFileUrl = (params) => {
|
|
389
|
+
const normalizedParams = new URLSearchParams();
|
|
390
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
391
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
392
|
+
});
|
|
393
|
+
const stringifiedParams = normalizedParams.toString();
|
|
394
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/files?${stringifiedParams}` : `/api/v1/chat/files`;
|
|
395
|
+
};
|
|
396
|
+
/**
|
|
397
|
+
* 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.
|
|
398
|
+
* @summary Download a chat artifact
|
|
399
|
+
*/
|
|
400
|
+
const getChatFile = (params, options) => {
|
|
401
|
+
return astralBeamChatFetch(getGetChatFileUrl(params), {
|
|
402
|
+
...options,
|
|
403
|
+
method: "GET"
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
const getRunChatUrl = () => {
|
|
407
|
+
return `/api/v1/chat`;
|
|
408
|
+
};
|
|
409
|
+
/**
|
|
410
|
+
* 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.
|
|
411
|
+
* @summary Run chat
|
|
412
|
+
*/
|
|
413
|
+
const runChat = (chatRunInput, options) => {
|
|
414
|
+
const getHeaders = (h) => {
|
|
415
|
+
if (!h) return {};
|
|
416
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
417
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
418
|
+
const headers = {};
|
|
419
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
420
|
+
return headers;
|
|
421
|
+
};
|
|
422
|
+
return astralBeamChatFetch(getRunChatUrl(), {
|
|
423
|
+
...options,
|
|
424
|
+
method: "POST",
|
|
425
|
+
headers: {
|
|
426
|
+
"Content-Type": "application/json",
|
|
427
|
+
...getHeaders(options?.headers)
|
|
428
|
+
},
|
|
429
|
+
body: JSON.stringify(chatRunInput)
|
|
430
|
+
});
|
|
431
|
+
};
|
|
432
|
+
const getGetChatConfigUrl = (params) => {
|
|
433
|
+
const normalizedParams = new URLSearchParams();
|
|
434
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
435
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
436
|
+
});
|
|
437
|
+
const stringifiedParams = normalizedParams.toString();
|
|
438
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/config?${stringifiedParams}` : `/api/v1/chat/config`;
|
|
439
|
+
};
|
|
440
|
+
/**
|
|
441
|
+
* 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.
|
|
442
|
+
* @summary Get chat capabilities
|
|
443
|
+
*/
|
|
444
|
+
const getChatConfig = (params, options) => {
|
|
445
|
+
return astralBeamJwtFetch(getGetChatConfigUrl(params), {
|
|
446
|
+
...options,
|
|
447
|
+
method: "GET"
|
|
448
|
+
});
|
|
449
|
+
};
|
|
450
|
+
const getGetChatUsageUrl = (params) => {
|
|
451
|
+
const normalizedParams = new URLSearchParams();
|
|
452
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
453
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
454
|
+
});
|
|
455
|
+
const stringifiedParams = normalizedParams.toString();
|
|
456
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/usage?${stringifiedParams}` : `/api/v1/chat/usage`;
|
|
457
|
+
};
|
|
458
|
+
/**
|
|
459
|
+
* 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.
|
|
460
|
+
* @summary Get usage limits
|
|
461
|
+
*/
|
|
462
|
+
const getChatUsage = (params, options) => {
|
|
463
|
+
return astralBeamApiFetch(getGetChatUsageUrl(params), {
|
|
464
|
+
...options,
|
|
465
|
+
method: "GET"
|
|
466
|
+
});
|
|
467
|
+
};
|
|
468
|
+
const getCreateChatThreadUrl = () => {
|
|
469
|
+
return `/api/v1/chat/threads`;
|
|
470
|
+
};
|
|
471
|
+
/**
|
|
472
|
+
* @summary Create a saved conversation
|
|
473
|
+
*/
|
|
474
|
+
const createChatThread = (createChatThreadInputEncoded, options) => {
|
|
475
|
+
const getHeaders = (h) => {
|
|
476
|
+
if (!h) return {};
|
|
477
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
478
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
479
|
+
const headers = {};
|
|
480
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
481
|
+
return headers;
|
|
482
|
+
};
|
|
483
|
+
return astralBeamJwtFetch(getCreateChatThreadUrl(), {
|
|
484
|
+
...options,
|
|
485
|
+
method: "POST",
|
|
486
|
+
headers: {
|
|
487
|
+
"Content-Type": "application/json",
|
|
488
|
+
...getHeaders(options?.headers)
|
|
489
|
+
},
|
|
490
|
+
body: JSON.stringify(createChatThreadInputEncoded)
|
|
491
|
+
});
|
|
492
|
+
};
|
|
493
|
+
const getListChatThreadsUrl = (params) => {
|
|
494
|
+
const normalizedParams = new URLSearchParams();
|
|
495
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
496
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
497
|
+
});
|
|
498
|
+
const stringifiedParams = normalizedParams.toString();
|
|
499
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/threads?${stringifiedParams}` : `/api/v1/chat/threads`;
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* @summary List your conversations
|
|
503
|
+
*/
|
|
504
|
+
const listChatThreads = (params, options) => {
|
|
505
|
+
return astralBeamJwtFetch(getListChatThreadsUrl(params), {
|
|
506
|
+
...options,
|
|
507
|
+
method: "GET"
|
|
508
|
+
});
|
|
509
|
+
};
|
|
510
|
+
const getGetChatThreadUrl = (id) => {
|
|
511
|
+
return `/api/v1/chat/threads/${encodeURIComponent(String(id))}`;
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* @summary Get a saved conversation
|
|
515
|
+
*/
|
|
516
|
+
const getChatThread = (id, options) => {
|
|
517
|
+
return astralBeamJwtFetch(getGetChatThreadUrl(id), {
|
|
518
|
+
...options,
|
|
519
|
+
method: "GET"
|
|
520
|
+
});
|
|
521
|
+
};
|
|
522
|
+
const getUpdateChatThreadUrl = (id) => {
|
|
523
|
+
return `/api/v1/chat/threads/${encodeURIComponent(String(id))}`;
|
|
524
|
+
};
|
|
525
|
+
/**
|
|
526
|
+
* @summary Rename a conversation
|
|
527
|
+
*/
|
|
528
|
+
const updateChatThread = (id, updateChatThreadInputEncoded, options) => {
|
|
529
|
+
const getHeaders = (h) => {
|
|
530
|
+
if (!h) return {};
|
|
531
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
532
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
533
|
+
const headers = {};
|
|
534
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
535
|
+
return headers;
|
|
536
|
+
};
|
|
537
|
+
return astralBeamJwtFetch(getUpdateChatThreadUrl(id), {
|
|
538
|
+
...options,
|
|
539
|
+
method: "PATCH",
|
|
540
|
+
headers: {
|
|
541
|
+
"Content-Type": "application/json",
|
|
542
|
+
...getHeaders(options?.headers)
|
|
543
|
+
},
|
|
544
|
+
body: JSON.stringify(updateChatThreadInputEncoded)
|
|
545
|
+
});
|
|
546
|
+
};
|
|
547
|
+
const getDeleteChatThreadUrl = (id, params) => {
|
|
548
|
+
const normalizedParams = new URLSearchParams();
|
|
549
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
550
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
551
|
+
});
|
|
552
|
+
const stringifiedParams = normalizedParams.toString();
|
|
553
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/threads/${encodeURIComponent(String(id))}?${stringifiedParams}` : `/api/v1/chat/threads/${encodeURIComponent(String(id))}`;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* @summary Delete a conversation
|
|
557
|
+
*/
|
|
558
|
+
const deleteChatThread = (id, params, options) => {
|
|
559
|
+
return astralBeamJwtFetch(getDeleteChatThreadUrl(id, params), {
|
|
560
|
+
...options,
|
|
561
|
+
method: "DELETE"
|
|
562
|
+
});
|
|
563
|
+
};
|
|
564
|
+
const getListChatMessagesUrl = (id, params) => {
|
|
565
|
+
const normalizedParams = new URLSearchParams();
|
|
566
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
567
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
568
|
+
});
|
|
569
|
+
const stringifiedParams = normalizedParams.toString();
|
|
570
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/threads/${encodeURIComponent(String(id))}/messages?${stringifiedParams}` : `/api/v1/chat/threads/${encodeURIComponent(String(id))}/messages`;
|
|
571
|
+
};
|
|
572
|
+
/**
|
|
573
|
+
* @summary Read conversation history
|
|
574
|
+
*/
|
|
575
|
+
const listChatMessages = (id, params, options) => {
|
|
576
|
+
return astralBeamJwtFetch(getListChatMessagesUrl(id, params), {
|
|
577
|
+
...options,
|
|
578
|
+
method: "GET"
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
const getListChatParticipantsUrl = (id, params) => {
|
|
582
|
+
const normalizedParams = new URLSearchParams();
|
|
583
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
584
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
585
|
+
});
|
|
586
|
+
const stringifiedParams = normalizedParams.toString();
|
|
587
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/threads/${encodeURIComponent(String(id))}/participants?${stringifiedParams}` : `/api/v1/chat/threads/${encodeURIComponent(String(id))}/participants`;
|
|
588
|
+
};
|
|
589
|
+
/**
|
|
590
|
+
* @summary List conversation participants
|
|
591
|
+
*/
|
|
592
|
+
const listChatParticipants = (id, params, options) => {
|
|
593
|
+
return astralBeamJwtFetch(getListChatParticipantsUrl(id, params), {
|
|
594
|
+
...options,
|
|
595
|
+
method: "GET"
|
|
596
|
+
});
|
|
597
|
+
};
|
|
598
|
+
const getSearchChatTenantUsersUrl = (id, params) => {
|
|
599
|
+
const normalizedParams = new URLSearchParams();
|
|
600
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
601
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
602
|
+
});
|
|
603
|
+
const stringifiedParams = normalizedParams.toString();
|
|
604
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/threads/${encodeURIComponent(String(id))}/tenant-users?${stringifiedParams}` : `/api/v1/chat/threads/${encodeURIComponent(String(id))}/tenant-users`;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* 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.
|
|
608
|
+
* @summary Search same-Tenant users for sharing
|
|
609
|
+
*/
|
|
610
|
+
const searchChatTenantUsers = (id, params, options) => {
|
|
611
|
+
return astralBeamJwtFetch(getSearchChatTenantUsersUrl(id, params), {
|
|
612
|
+
...options,
|
|
613
|
+
method: "GET"
|
|
614
|
+
});
|
|
615
|
+
};
|
|
616
|
+
const getSetChatParticipantUrl = (id, tenantUserId) => {
|
|
617
|
+
return `/api/v1/chat/threads/${encodeURIComponent(String(id))}/participants/${encodeURIComponent(String(tenantUserId))}`;
|
|
618
|
+
};
|
|
619
|
+
/**
|
|
620
|
+
* @summary Add a participant or change their role
|
|
621
|
+
*/
|
|
622
|
+
const setChatParticipant = (id, tenantUserId, setChatParticipantInputEncoded, options) => {
|
|
623
|
+
const getHeaders = (h) => {
|
|
624
|
+
if (!h) return {};
|
|
625
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
626
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
627
|
+
const headers = {};
|
|
628
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
629
|
+
return headers;
|
|
630
|
+
};
|
|
631
|
+
return astralBeamJwtFetch(getSetChatParticipantUrl(id, tenantUserId), {
|
|
632
|
+
...options,
|
|
633
|
+
method: "PUT",
|
|
634
|
+
headers: {
|
|
635
|
+
"Content-Type": "application/json",
|
|
636
|
+
...getHeaders(options?.headers)
|
|
637
|
+
},
|
|
638
|
+
body: JSON.stringify(setChatParticipantInputEncoded)
|
|
639
|
+
});
|
|
640
|
+
};
|
|
641
|
+
const getRemoveChatParticipantUrl = (id, tenantUserId, params) => {
|
|
642
|
+
const normalizedParams = new URLSearchParams();
|
|
643
|
+
Object.entries(params || {}).forEach(([key, value]) => {
|
|
644
|
+
if (value !== void 0) normalizedParams.append(key, value === null ? "null" : String(value));
|
|
645
|
+
});
|
|
646
|
+
const stringifiedParams = normalizedParams.toString();
|
|
647
|
+
return stringifiedParams.length > 0 ? `/api/v1/chat/threads/${encodeURIComponent(String(id))}/participants/${encodeURIComponent(String(tenantUserId))}?${stringifiedParams}` : `/api/v1/chat/threads/${encodeURIComponent(String(id))}/participants/${encodeURIComponent(String(tenantUserId))}`;
|
|
648
|
+
};
|
|
649
|
+
/**
|
|
650
|
+
* @summary Remove a conversation participant
|
|
651
|
+
*/
|
|
652
|
+
const removeChatParticipant = (id, tenantUserId, params, options) => {
|
|
653
|
+
return astralBeamJwtFetch(getRemoveChatParticipantUrl(id, tenantUserId, params), {
|
|
654
|
+
...options,
|
|
655
|
+
method: "DELETE"
|
|
656
|
+
});
|
|
657
|
+
};
|
|
658
|
+
const getResolveChatToolResultUrl = (id) => {
|
|
659
|
+
return `/api/v1/chat/threads/${encodeURIComponent(String(id))}/tool-results`;
|
|
660
|
+
};
|
|
661
|
+
/**
|
|
662
|
+
* @summary Submit a pending tool result
|
|
663
|
+
*/
|
|
664
|
+
const resolveChatToolResult = (id, resolveChatToolResultInputEncoded, options) => {
|
|
665
|
+
const getHeaders = (h) => {
|
|
666
|
+
if (!h) return {};
|
|
667
|
+
if (h instanceof Headers) return Object.fromEntries(h.entries());
|
|
668
|
+
if (Symbol.iterator in h) return Object.fromEntries(Array.from(h, (entry) => Array.from(entry)));
|
|
669
|
+
const headers = {};
|
|
670
|
+
for (const [name, value] of Object.entries(h)) if (value !== void 0) headers[name] = value;
|
|
671
|
+
return headers;
|
|
672
|
+
};
|
|
673
|
+
return astralBeamChatFetch(getResolveChatToolResultUrl(id), {
|
|
674
|
+
...options,
|
|
675
|
+
method: "POST",
|
|
676
|
+
headers: {
|
|
677
|
+
"Content-Type": "application/json",
|
|
678
|
+
...getHeaders(options?.headers)
|
|
679
|
+
},
|
|
680
|
+
body: JSON.stringify(resolveChatToolResultInputEncoded)
|
|
681
|
+
});
|
|
682
|
+
};
|
|
683
|
+
const getGetChatAttachmentUrl = (id, messageId, partId) => {
|
|
684
|
+
return `/api/v1/chat/threads/${encodeURIComponent(String(id))}/messages/${encodeURIComponent(String(messageId))}/attachments/${encodeURIComponent(String(partId))}`;
|
|
685
|
+
};
|
|
686
|
+
/**
|
|
687
|
+
* @summary Download a saved attachment
|
|
688
|
+
*/
|
|
689
|
+
const getChatAttachment = (id, messageId, partId, options) => {
|
|
690
|
+
return astralBeamChatFetch(getGetChatAttachmentUrl(id, messageId, partId), {
|
|
691
|
+
...options,
|
|
692
|
+
method: "GET"
|
|
693
|
+
});
|
|
694
|
+
};
|
|
695
|
+
const getGetCurrentUserUrl = () => {
|
|
696
|
+
return `/api/v1/me`;
|
|
697
|
+
};
|
|
698
|
+
/**
|
|
699
|
+
* 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.
|
|
700
|
+
* @summary Get the current user
|
|
701
|
+
*/
|
|
702
|
+
const getCurrentUser = (options) => {
|
|
703
|
+
return astralBeamJwtFetch(getGetCurrentUserUrl(), {
|
|
704
|
+
...options,
|
|
705
|
+
method: "POST"
|
|
706
|
+
});
|
|
707
|
+
};
|
|
708
|
+
//#endregion
|
|
709
|
+
export { getTenant as $, getGetChatAttachmentUrl as A, getListChatMessagesUrl as B, getChatThread as C, isAstralBeamApiError as Ct, getCreateTenantUserUrl as D, DEFAULT_COLOR_SCHEME as Dt, getCreateTenantUrl as E, DEFAULT_CHAT_AUTH_TOKEN_URL as Et, getGetCurrentUserUrl as F, getListThreadsUrl as G, getListChatThreadsUrl as H, getGetOrganizationUrl as I, getRemoveChatParticipantUrl as J, getListUsersForTenantUrl as K, getGetTenantUrl as L, getGetChatFileUrl as M, getGetChatThreadUrl as N, getCurrentUser as O, getGetChatUsageUrl as P, getSetChatParticipantUrl as Q, getGetTenantUserUrl as R, getChatFile as S, astralBeamChatFetch as St, getCreateChatThreadUrl as T, DEFAULT_API_URL as Tt, getListTenantsUrl as U, getListChatParticipantsUrl as V, getListThreadMessagesUrl as W, getRunChatUrl as X, getResolveChatToolResultUrl as Y, getSearchChatTenantUsersUrl as Z, createTenant as _, setChatParticipant as _t, ChatMessageEncodedRole as a, getUploadChatFileUrl as at, getChatAttachment as b, updateTenantUser as bt, ChatThreadEncodedRole as c, listChatThreads as ct, ListUsersForTenantFilterAdmin as d, listThreads as dt, getTenantUser as et, ResolveChatToolResultInputEncodedResultsItemOutcome as f, listUsersForTenant as ft, createChatThread as g, searchChatTenantUsers as gt, UploadChatFileBodyType as h, runChat as ht, ChatHistoryPageEncodedThreadRole as i, getUpdateTenantUserUrl as it, getGetChatConfigUrl as j, getDeleteChatThreadUrl as k, ChatUsageUsageLimitsItemMetric as l, listTenants as lt, UploadChatFileBodySourceType as m, resolveChatToolResult as mt, ChatHistoryPageEncodedMessagesItemState as n, getUpdateChatThreadUrl as nt, ChatMessageEncodedState as o, listChatMessages as ot, SetChatParticipantInputEncodedRole as p, removeChatParticipant as pt, getOrganization as q, ChatHistoryPageEncodedPendingInteractionsItemExecutionLocation as r, getUpdateTenantUrl as rt, ChatParticipantEncodedRole as s, listChatParticipants as st, ChatHistoryPageEncodedMessagesItemRole as t, getThreadAttachment as tt, ChatUsageUsageLimitsItemScope as u, listThreadMessages as ut, createTenantUser as v, updateChatThread as vt, getChatUsage as w, resolveApiUrl as wt, getChatConfig as x, uploadChatFile as xt, deleteChatThread as y, updateTenant as yt, getGetThreadAttachmentUrl as z };
|