@arbidocs/sdk 0.5.183 → 0.5.185
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/dist/{browser-C6CegUoQ.d.ts → browser-BFJyzgh7.d.ts} +25 -2
- package/dist/{browser-BJb_3-Ac.d.cts → browser-BjrMoXTh.d.cts} +25 -2
- package/dist/browser.cjs +21 -0
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +21 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +21 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/examples/human-review/package.json +1 -1
- package/examples/react-chat/package.json +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -10957,6 +10957,7 @@ __export(databases_exports, {
|
|
|
10957
10957
|
deleteDatabaseRows: () => deleteDatabaseRows,
|
|
10958
10958
|
exportDatabase: () => exportDatabase,
|
|
10959
10959
|
getDatabase: () => getDatabase,
|
|
10960
|
+
getDatabaseCapabilities: () => getDatabaseCapabilities,
|
|
10960
10961
|
importDatabase: () => importDatabase,
|
|
10961
10962
|
importDatabaseRows: () => importDatabaseRows,
|
|
10962
10963
|
listDatabaseRows: () => listDatabaseRows,
|
|
@@ -10965,6 +10966,23 @@ __export(databases_exports, {
|
|
|
10965
10966
|
updateDatabase: () => updateDatabase,
|
|
10966
10967
|
updateDatabaseRow: () => updateDatabaseRow
|
|
10967
10968
|
});
|
|
10969
|
+
var NO_DATABASE_CAPABILITIES = Object.freeze({
|
|
10970
|
+
column_types: [],
|
|
10971
|
+
view_layouts: []
|
|
10972
|
+
});
|
|
10973
|
+
async function getDatabaseCapabilities(arbi) {
|
|
10974
|
+
try {
|
|
10975
|
+
const { data, error } = await arbi.fetch.GET(
|
|
10976
|
+
"/v1/databases/capabilities"
|
|
10977
|
+
);
|
|
10978
|
+
if (error || !data || typeof data !== "object") return NO_DATABASE_CAPABILITIES;
|
|
10979
|
+
const { column_types, view_layouts } = data;
|
|
10980
|
+
const strings = (v2) => Array.isArray(v2) ? v2.filter((x2) => typeof x2 === "string") : [];
|
|
10981
|
+
return { column_types: strings(column_types), view_layouts: strings(view_layouts) };
|
|
10982
|
+
} catch {
|
|
10983
|
+
return NO_DATABASE_CAPABILITIES;
|
|
10984
|
+
}
|
|
10985
|
+
}
|
|
10968
10986
|
var path2 = (databaseId) => ({ path: { database_id: databaseId } });
|
|
10969
10987
|
function spreadsheet(file) {
|
|
10970
10988
|
const form = new FormData();
|
|
@@ -14534,6 +14552,7 @@ var Arbi = class {
|
|
|
14534
14552
|
const call = await createCall(client$1, {
|
|
14535
14553
|
...params.threadExtId ? { thread_ext_id: params.threadExtId } : {},
|
|
14536
14554
|
...params.chatExtId ? { chat_ext_id: params.chatExtId } : {},
|
|
14555
|
+
...params.workspaceExtId ? { workspace_ext_id: params.workspaceExtId } : {},
|
|
14537
14556
|
mode: params.mode ?? "call",
|
|
14538
14557
|
...params.joinPolicy ? { join_policy: params.joinPolicy } : {},
|
|
14539
14558
|
title: title ? await client.encryptCallTitle(title, fresh) : null,
|
|
@@ -15020,6 +15039,8 @@ var Arbi = class {
|
|
|
15020
15039
|
// ── Databases (user-defined tables of the open workspace) ──────────
|
|
15021
15040
|
databases = {
|
|
15022
15041
|
list: () => listDatabases(this.requireClient()),
|
|
15042
|
+
/** What this deployment's databases accept; any failure is the empty answer (the original types). */
|
|
15043
|
+
capabilities: () => getDatabaseCapabilities(this.requireClient()),
|
|
15023
15044
|
get: (databaseId) => getDatabase(this.requireClient(), databaseId),
|
|
15024
15045
|
/** A search of the rows (any cell), sorted and paged on the server. */
|
|
15025
15046
|
rows: (databaseId, query2) => listDatabaseRows(this.requireClient(), databaseId, query2),
|