@arbidocs/sdk 0.5.152 → 0.5.154
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-BeaN-7Ro.d.ts → browser-BIVXanUk.d.ts} +72 -5
- package/dist/{browser-C-SMeI_V.d.cts → browser-Dk_nISGa.d.cts} +72 -5
- package/dist/browser.cjs +32 -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 +32 -0
- package/dist/browser.js.map +1 -1
- package/dist/index.cjs +32 -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 +32 -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/browser.cjs
CHANGED
|
@@ -4752,6 +4752,7 @@ __export(workspaces_exports, {
|
|
|
4752
4752
|
addWorkspaceMembers: () => addWorkspaceMembers,
|
|
4753
4753
|
addWorkspaceMembersBody: () => addWorkspaceMembersBody,
|
|
4754
4754
|
addWorkspaceUsers: () => addWorkspaceUsers,
|
|
4755
|
+
aggregateWorkspace: () => aggregateWorkspace,
|
|
4755
4756
|
archiveWorkspace: () => archiveWorkspace,
|
|
4756
4757
|
cancelWorkspaceTransfer: () => cancelWorkspaceTransfer,
|
|
4757
4758
|
copyDocuments: () => copyDocuments,
|
|
@@ -4933,6 +4934,15 @@ async function copyDocuments(arbi, targetWorkspaceId, docIds, targetWorkspaceKey
|
|
|
4933
4934
|
"Failed to copy documents"
|
|
4934
4935
|
);
|
|
4935
4936
|
}
|
|
4937
|
+
async function aggregateWorkspace(arbi, workspaceExtId, queries) {
|
|
4938
|
+
return requireData(
|
|
4939
|
+
await arbi.fetch.POST("/v1/workspace/{workspace_ext_id}/aggregate", {
|
|
4940
|
+
params: { path: { workspace_ext_id: workspaceExtId } },
|
|
4941
|
+
body: { queries }
|
|
4942
|
+
}),
|
|
4943
|
+
"Failed to count the workspace"
|
|
4944
|
+
).results;
|
|
4945
|
+
}
|
|
4936
4946
|
async function getWorkspaceActivity(arbi, workspaceExtId, options = {}) {
|
|
4937
4947
|
return requireData(
|
|
4938
4948
|
await arbi.fetch.GET("/v1/workspace/{workspace_ext_id}/activity", {
|
|
@@ -8875,6 +8885,7 @@ __export(projects_exports, {
|
|
|
8875
8885
|
listProducts: () => listProducts,
|
|
8876
8886
|
listProjectEvents: () => listProjectEvents,
|
|
8877
8887
|
listProjects: () => listProjects,
|
|
8888
|
+
listProjectsUsage: () => listProjectsUsage,
|
|
8878
8889
|
parseBudget: () => parseBudget,
|
|
8879
8890
|
previewPlanChange: () => previewPlanChange,
|
|
8880
8891
|
quoteAddon: () => quoteAddon,
|
|
@@ -8994,6 +9005,14 @@ async function getProjectUsage(arbi, projectExtId, monthsBack) {
|
|
|
8994
9005
|
"Failed to fetch project usage"
|
|
8995
9006
|
);
|
|
8996
9007
|
}
|
|
9008
|
+
async function listProjectsUsage(arbi, monthsBack) {
|
|
9009
|
+
return requireData(
|
|
9010
|
+
await arbi.fetch.GET("/v1/user/projects/usage", {
|
|
9011
|
+
params: { query: monthsBack === void 0 ? void 0 : { months_back: monthsBack } }
|
|
9012
|
+
}),
|
|
9013
|
+
"Failed to fetch the usage of your projects"
|
|
9014
|
+
);
|
|
9015
|
+
}
|
|
8997
9016
|
async function getProjectInvoices(arbi, projectExtId) {
|
|
8998
9017
|
return requireData(
|
|
8999
9018
|
await arbi.fetch.GET("/v1/user/projects/{project_ext_id}/invoices", {
|
|
@@ -10332,6 +10351,7 @@ __export(views_exports, {
|
|
|
10332
10351
|
deleteTableView: () => deleteTableView,
|
|
10333
10352
|
filterText: () => filterText,
|
|
10334
10353
|
getTableView: () => getTableView,
|
|
10354
|
+
getTableViewRows: () => getTableViewRows,
|
|
10335
10355
|
listTableViews: () => listTableViews,
|
|
10336
10356
|
shareTableView: () => shareTableView,
|
|
10337
10357
|
updateTableView: () => updateTableView
|
|
@@ -10350,6 +10370,12 @@ async function getTableView(arbi, viewId) {
|
|
|
10350
10370
|
"Failed to read the view"
|
|
10351
10371
|
);
|
|
10352
10372
|
}
|
|
10373
|
+
async function getTableViewRows(arbi, viewId, page = {}) {
|
|
10374
|
+
return requireData(
|
|
10375
|
+
await arbi.fetch.GET("/v1/views/{view_id}/rows", { params: { ...path2(viewId), query: page } }),
|
|
10376
|
+
"Failed to read the view"
|
|
10377
|
+
);
|
|
10378
|
+
}
|
|
10353
10379
|
async function createTableView(arbi, target, spec, options = {}) {
|
|
10354
10380
|
return requireData(
|
|
10355
10381
|
await arbi.fetch.POST("/v1/views", {
|
|
@@ -12356,6 +12382,8 @@ var Arbi = class {
|
|
|
12356
12382
|
refresh: (projectExtId) => refreshProject(this.requireClient(), projectExtId),
|
|
12357
12383
|
/** AI usage + spend breakdown for a project's billing period. */
|
|
12358
12384
|
usage: (projectExtId, monthsBack) => getProjectUsage(this.requireClient(), projectExtId, monthsBack),
|
|
12385
|
+
/** The usage of every project the caller owns, in one request. */
|
|
12386
|
+
usageOfOwned: (monthsBack) => listProjectsUsage(this.requireClient(), monthsBack),
|
|
12359
12387
|
/** Stripe invoices for a project's subscription. */
|
|
12360
12388
|
invoices: (projectExtId) => getProjectInvoices(this.requireClient(), projectExtId),
|
|
12361
12389
|
/** Delete a project (only when empty: no workspaces, no subscription). */
|
|
@@ -12600,6 +12628,8 @@ var Arbi = class {
|
|
|
12600
12628
|
listUsers: () => listWorkspaceUsers(this.requireClient()),
|
|
12601
12629
|
/** One page of a workspace's activity feed, newest first (see `getWorkspaceActivity`). */
|
|
12602
12630
|
activity: (workspaceId, options) => getWorkspaceActivity(this.requireClient(), workspaceId, options),
|
|
12631
|
+
/** Count a workspace's items on the server, grouped (see `aggregateWorkspace`). */
|
|
12632
|
+
aggregate: (workspaceId, queries) => aggregateWorkspace(this.requireClient(), workspaceId, queries),
|
|
12603
12633
|
/**
|
|
12604
12634
|
* Add users to the open workspace; `confirmInvite` also invites emails not on ARBI yet. `role`
|
|
12605
12635
|
* defaults to `collaborator`; `guest` makes a read-only member (shown as "Viewer").
|
|
@@ -14249,6 +14279,8 @@ var Arbi = class {
|
|
|
14249
14279
|
/** The views the caller can see: of one table, or of every table of the open workspace. */
|
|
14250
14280
|
list: (target) => listTableViews(this.requireClient(), target),
|
|
14251
14281
|
get: (viewId) => getTableView(this.requireClient(), viewId),
|
|
14282
|
+
/** The view with its database, columns and rows (filters and sort applied), in one read. */
|
|
14283
|
+
rows: (viewId, page) => getTableViewRows(this.requireClient(), viewId, page),
|
|
14252
14284
|
create: (target, spec, options) => createTableView(this.requireClient(), target, spec, options),
|
|
14253
14285
|
update: (viewId, spec) => updateTableView(this.requireClient(), viewId, spec),
|
|
14254
14286
|
/** Share with the workspace (one way: it is never made private again). */
|