@arbidocs/sdk 0.4.85 → 0.4.88

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.
@@ -1,4 +1,3 @@
1
- import * as _arbidocs_client from '@arbidocs/client';
2
1
  import { SessionStorageProvider, ArbiClient, LoginResult, components, WebSocketServerMessage, WsAuthResultMessage, WsTaskUpdateMessage, KeyPair, LoginProfile } from '@arbidocs/client';
3
2
 
4
3
  /**
@@ -1368,108 +1367,415 @@ declare namespace documents {
1368
1367
  }
1369
1368
 
1370
1369
  /**
1371
- * Conversation operations — list, threads, delete, messages, import.
1370
+ * Workspace operations — list, create, delete, update, users, copy.
1372
1371
  */
1373
1372
 
1374
- type ConversationImportResponse = components['schemas']['ConversationImportResponse'];
1375
- type PostMessageRequest = components['schemas']['PostMessageRequest'];
1376
- type MessageMention = components['schemas']['MessageMention'];
1377
- type AssistantMode = components['schemas']['AssistantMode'];
1378
-
1379
- /** The caller's conversations. A conversation with a `status` is also a task (work item). */
1380
- declare function listConversations(arbi: ArbiClient): Promise<{
1381
- label_ext_ids?: string[] | undefined;
1373
+ type WorkspaceUpdateRequest$1 = components['schemas']['WorkspaceUpdateRequest'];
1374
+ declare function listWorkspaces(arbi: ArbiClient): Promise<{
1382
1375
  external_id: string;
1383
- title: string | null;
1376
+ name: string;
1377
+ description: string | null;
1378
+ is_public: boolean;
1379
+ workspace_type: components["schemas"]["WorkspaceType"];
1384
1380
  created_by_ext_id: string;
1385
1381
  updated_by_ext_id?: string | null | undefined;
1386
1382
  created_at: string;
1387
1383
  updated_at: string;
1388
- is_shared: boolean;
1389
- message_count: number;
1390
- last_message_actor?: {
1384
+ wrapped_key?: string | null | undefined;
1385
+ is_member: boolean;
1386
+ shared_conversation_count: number;
1387
+ private_conversation_count: number;
1388
+ shared_document_count: number;
1389
+ private_document_count: number;
1390
+ user_files_mb: number;
1391
+ users: {
1392
+ user: {
1393
+ external_id: string;
1394
+ parent_ext_id?: string | null | undefined;
1395
+ email: string;
1396
+ given_name: string;
1397
+ family_name?: string | null | undefined;
1398
+ picture?: string | null | undefined;
1399
+ encryption_public_key: string;
1400
+ is_sso: boolean;
1401
+ is_identity_verified: boolean;
1402
+ };
1403
+ role: components["schemas"]["WorkspaceRole"];
1404
+ joined_at: string;
1405
+ conversation_count: number;
1406
+ document_count: number;
1407
+ files_mb: number;
1408
+ agent_ext_id?: string | null | undefined;
1409
+ is_temporary: boolean;
1410
+ }[];
1411
+ project_ext_id?: string | null | undefined;
1412
+ project_name?: string | null | undefined;
1413
+ project_subscription?: string | null | undefined;
1414
+ project_owner_ext_id?: string | null | undefined;
1415
+ }[]>;
1416
+ /**
1417
+ * Create a workspace with a pre-encrypted workspace key.
1418
+ *
1419
+ * The caller must generate a random 32-byte key, encrypt it with the session
1420
+ * public key (SealedBox via `sealKeyForSession`), and pass it here.
1421
+ * Use `Arbi.workspaces.create()` for automatic key generation.
1422
+ */
1423
+ declare function createWorkspace(arbi: ArbiClient, name: string, encryptedWorkspaceKey: string, projectExtId: string, description?: string | null, isPublic?: boolean): Promise<{
1424
+ external_id: string;
1425
+ name: string;
1426
+ description: string | null;
1427
+ is_public: boolean;
1428
+ workspace_type: components["schemas"]["WorkspaceType"];
1429
+ created_by_ext_id: string;
1430
+ updated_by_ext_id?: string | null | undefined;
1431
+ created_at: string;
1432
+ updated_at: string;
1433
+ wrapped_key?: string | null | undefined;
1434
+ is_member: boolean;
1435
+ shared_conversation_count: number;
1436
+ private_conversation_count: number;
1437
+ shared_document_count: number;
1438
+ private_document_count: number;
1439
+ user_files_mb: number;
1440
+ users: {
1441
+ user: {
1442
+ external_id: string;
1443
+ parent_ext_id?: string | null | undefined;
1444
+ email: string;
1445
+ given_name: string;
1446
+ family_name?: string | null | undefined;
1447
+ picture?: string | null | undefined;
1448
+ encryption_public_key: string;
1449
+ is_sso: boolean;
1450
+ is_identity_verified: boolean;
1451
+ };
1452
+ role: components["schemas"]["WorkspaceRole"];
1453
+ joined_at: string;
1454
+ conversation_count: number;
1455
+ document_count: number;
1456
+ files_mb: number;
1457
+ agent_ext_id?: string | null | undefined;
1458
+ is_temporary: boolean;
1459
+ }[];
1460
+ project_ext_id?: string | null | undefined;
1461
+ project_name?: string | null | undefined;
1462
+ project_subscription?: string | null | undefined;
1463
+ project_owner_ext_id?: string | null | undefined;
1464
+ }>;
1465
+ declare function deleteWorkspaces(arbi: ArbiClient, workspaceIds: string[]): Promise<void>;
1466
+ declare function updateWorkspace(arbi: ArbiClient, body: WorkspaceUpdateRequest$1): Promise<{
1467
+ external_id: string;
1468
+ name: string;
1469
+ description: string | null;
1470
+ is_public: boolean;
1471
+ workspace_type: components["schemas"]["WorkspaceType"];
1472
+ created_by_ext_id: string;
1473
+ updated_by_ext_id?: string | null | undefined;
1474
+ created_at: string;
1475
+ updated_at: string;
1476
+ wrapped_key?: string | null | undefined;
1477
+ is_member: boolean;
1478
+ shared_conversation_count: number;
1479
+ private_conversation_count: number;
1480
+ shared_document_count: number;
1481
+ private_document_count: number;
1482
+ user_files_mb: number;
1483
+ users: {
1484
+ user: {
1485
+ external_id: string;
1486
+ parent_ext_id?: string | null | undefined;
1487
+ email: string;
1488
+ given_name: string;
1489
+ family_name?: string | null | undefined;
1490
+ picture?: string | null | undefined;
1491
+ encryption_public_key: string;
1492
+ is_sso: boolean;
1493
+ is_identity_verified: boolean;
1494
+ };
1495
+ role: components["schemas"]["WorkspaceRole"];
1496
+ joined_at: string;
1497
+ conversation_count: number;
1498
+ document_count: number;
1499
+ files_mb: number;
1500
+ agent_ext_id?: string | null | undefined;
1501
+ is_temporary: boolean;
1502
+ }[];
1503
+ project_ext_id?: string | null | undefined;
1504
+ project_name?: string | null | undefined;
1505
+ project_subscription?: string | null | undefined;
1506
+ project_owner_ext_id?: string | null | undefined;
1507
+ }>;
1508
+ declare function listWorkspaceUsers(arbi: ArbiClient): Promise<{
1509
+ user: {
1391
1510
  external_id: string;
1511
+ parent_ext_id?: string | null | undefined;
1512
+ email: string;
1392
1513
  given_name: string;
1393
1514
  family_name?: string | null | undefined;
1394
1515
  picture?: string | null | undefined;
1516
+ encryption_public_key: string;
1517
+ is_sso: boolean;
1518
+ is_identity_verified: boolean;
1519
+ };
1520
+ role: components["schemas"]["WorkspaceRole"];
1521
+ joined_at: string;
1522
+ conversation_count: number;
1523
+ document_count: number;
1524
+ files_mb: number;
1525
+ agent_ext_id?: string | null | undefined;
1526
+ is_temporary: boolean;
1527
+ }[]>;
1528
+ declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'owner' | 'collaborator' | 'guest',
1529
+ /** Share a workspace other than the open one: its id and its key sealed to the caller's session. */
1530
+ target?: {
1531
+ workspaceExtId: string;
1532
+ workspaceKey: string;
1533
+ }): Promise<{
1534
+ user: {
1535
+ external_id: string;
1395
1536
  parent_ext_id?: string | null | undefined;
1396
- } | null | undefined;
1397
- last_message_ext_id?: string | null | undefined;
1398
- last_message_role?: string | null | undefined;
1399
- last_message_updated_at?: string | null | undefined;
1400
- last_message_status?: string | null | undefined;
1401
- assistant_mode: components["schemas"]["AssistantMode"];
1402
- status?: (components["schemas"]["WorkStatus"] | null) | undefined;
1403
- description?: string | null | undefined;
1404
- due_at?: string | null | undefined;
1405
- completed_at?: string | null | undefined;
1406
- completed_by_ext_id?: string | null | undefined;
1407
- parent_conversation_ext_id?: string | null | undefined;
1408
- workflow_ext_id?: string | null | undefined;
1537
+ email: string;
1538
+ given_name: string;
1539
+ family_name?: string | null | undefined;
1540
+ picture?: string | null | undefined;
1541
+ encryption_public_key: string;
1542
+ is_sso: boolean;
1543
+ is_identity_verified: boolean;
1544
+ };
1545
+ role: components["schemas"]["WorkspaceRole"];
1546
+ joined_at: string;
1547
+ conversation_count: number;
1548
+ document_count: number;
1549
+ files_mb: number;
1409
1550
  agent_ext_id?: string | null | undefined;
1410
- skill_ref?: string | null | undefined;
1411
- skill_inputs?: {
1412
- [x: string]: unknown;
1413
- } | null | undefined;
1414
- has_agent_action: boolean;
1415
- auth_mode?: (components["schemas"]["src__models__work__AuthMode"] | null) | undefined;
1416
- plan?: {
1417
- goal: string;
1418
- criteria: {
1419
- id: string;
1420
- text: string;
1421
- }[];
1422
- max_passes: number;
1423
- documents: string[];
1424
- steps: {
1425
- id: string;
1426
- title: string;
1427
- kind: "form" | "upload" | "agent" | "review" | "action";
1428
- after?: string[] | null | undefined;
1429
- skill?: string | null | undefined;
1430
- prompt?: string | null | undefined;
1431
- inputs?: {
1432
- [x: string]: string;
1433
- } | null | undefined;
1434
- branch: boolean;
1435
- requires_files: boolean;
1436
- ui?: {
1437
- [x: string]: unknown;
1438
- } | null | undefined;
1439
- signals?: {
1440
- name: string;
1441
- when?: {
1442
- field?: string | null | undefined;
1443
- equals?: string | number | boolean | null | undefined;
1444
- contains?: string | null | undefined;
1445
- matches?: string | null | undefined;
1446
- approved?: boolean | null | undefined;
1447
- } | null | undefined;
1448
- }[] | undefined;
1449
- assignee?: {
1450
- user?: string | null | undefined;
1451
- run_owner?: true | null | undefined;
1452
- input?: string | null | undefined;
1453
- project_lead?: true | null | undefined;
1454
- } | null | undefined;
1455
- remind_after_hours?: number | null | undefined;
1456
- fields?: {
1457
- [x: string]: unknown;
1458
- name: string;
1459
- type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
1460
- label?: string | null | undefined;
1461
- required: boolean;
1462
- options?: {
1463
- [x: string]: unknown;
1464
- value: string;
1465
- label?: string | null | undefined;
1466
- }[] | null | undefined;
1467
- min?: number | null | undefined;
1468
- max?: number | null | undefined;
1469
- }[] | null | undefined;
1470
- action?: {
1471
- type: "sign";
1472
- document: string | {
1551
+ is_temporary: boolean;
1552
+ }[]>;
1553
+ /**
1554
+ * Grant users a TEMPORARY, session-scoped workspace key (`session_pubkey_b64` path of
1555
+ * `POST /v1/workspace/users`). The key is deposited onto the recipient's session (typically an
1556
+ * agent run session) and the membership row expires with it; no standing membership is created.
1557
+ *
1558
+ * `workspaceKey` is the workspace key sealed to the CALLER's own session (what `/open` takes), so
1559
+ * the workspace need not be the open one. Use `Arbi.workspaces.grantTemporaryAccess()` to have the
1560
+ * key derived for you.
1561
+ */
1562
+ declare function grantTemporaryWorkspaceAccess(arbi: ArbiClient, params: {
1563
+ emails: string[];
1564
+ workspaceExtId: string;
1565
+ workspaceKey: string;
1566
+ sessionPubkeyB64: string;
1567
+ role?: 'owner' | 'collaborator' | 'guest';
1568
+ }): Promise<{
1569
+ user: {
1570
+ external_id: string;
1571
+ parent_ext_id?: string | null | undefined;
1572
+ email: string;
1573
+ given_name: string;
1574
+ family_name?: string | null | undefined;
1575
+ picture?: string | null | undefined;
1576
+ encryption_public_key: string;
1577
+ is_sso: boolean;
1578
+ is_identity_verified: boolean;
1579
+ };
1580
+ role: components["schemas"]["WorkspaceRole"];
1581
+ joined_at: string;
1582
+ conversation_count: number;
1583
+ document_count: number;
1584
+ files_mb: number;
1585
+ agent_ext_id?: string | null | undefined;
1586
+ is_temporary: boolean;
1587
+ }[]>;
1588
+ declare function removeWorkspaceUsers(arbi: ArbiClient, userIds: string[]): Promise<void>;
1589
+ declare function setUserRole(arbi: ArbiClient, userIds: string[], role: 'owner' | 'collaborator' | 'guest'): Promise<{
1590
+ user: {
1591
+ external_id: string;
1592
+ parent_ext_id?: string | null | undefined;
1593
+ email: string;
1594
+ given_name: string;
1595
+ family_name?: string | null | undefined;
1596
+ picture?: string | null | undefined;
1597
+ encryption_public_key: string;
1598
+ is_sso: boolean;
1599
+ is_identity_verified: boolean;
1600
+ };
1601
+ role: components["schemas"]["WorkspaceRole"];
1602
+ joined_at: string;
1603
+ conversation_count: number;
1604
+ document_count: number;
1605
+ files_mb: number;
1606
+ agent_ext_id?: string | null | undefined;
1607
+ is_temporary: boolean;
1608
+ }[]>;
1609
+ declare function copyDocuments(arbi: ArbiClient, targetWorkspaceId: string, docIds: string[], targetWorkspaceKey: string): Promise<{
1610
+ detail: string;
1611
+ documents_copied: number;
1612
+ items_copied: number;
1613
+ copied_by_kind: {
1614
+ [x: string]: number;
1615
+ };
1616
+ results: {
1617
+ source_doc_ext_id: string;
1618
+ success: boolean;
1619
+ new_doc_ext_id?: string | null | undefined;
1620
+ error?: string | null | undefined;
1621
+ kind: components["schemas"]["CopyItemKind"];
1622
+ warning?: string | null | undefined;
1623
+ skipped: boolean;
1624
+ }[];
1625
+ }>;
1626
+ interface WorkspaceActivityOptions {
1627
+ /** `next_cursor` of the previous page. */
1628
+ cursor?: string | null;
1629
+ /** Entries per page (1–100, server default 30). */
1630
+ limit?: number;
1631
+ }
1632
+ /**
1633
+ * One page of a workspace's activity feed, newest first: thread history, people posting, documents
1634
+ * uploaded, new versions and signatures, and workflow runs — only what the caller can see. Pass
1635
+ * `next_cursor` back as `cursor` for the next page (`null`: the end).
1636
+ */
1637
+ declare function getWorkspaceActivity(arbi: ArbiClient, workspaceExtId: string, options?: WorkspaceActivityOptions): Promise<{
1638
+ items: {
1639
+ external_id: string;
1640
+ source: components["schemas"]["WorkspaceActivitySource"];
1641
+ kind: string;
1642
+ actor_ext_id?: string | null | undefined;
1643
+ conversation_ext_id?: string | null | undefined;
1644
+ conversation_title?: string | null | undefined;
1645
+ message_ext_id?: string | null | undefined;
1646
+ document_ext_id?: string | null | undefined;
1647
+ document_name?: string | null | undefined;
1648
+ version?: number | null | undefined;
1649
+ workflow_ext_id?: string | null | undefined;
1650
+ workflow_name?: string | null | undefined;
1651
+ status?: string | null | undefined;
1652
+ detail?: {
1653
+ [x: string]: unknown;
1654
+ } | null | undefined;
1655
+ created_at: string;
1656
+ }[];
1657
+ next_cursor?: string | null | undefined;
1658
+ }>;
1659
+
1660
+ type workspaces_WorkspaceActivityOptions = WorkspaceActivityOptions;
1661
+ declare const workspaces_addWorkspaceUsers: typeof addWorkspaceUsers;
1662
+ declare const workspaces_copyDocuments: typeof copyDocuments;
1663
+ declare const workspaces_createWorkspace: typeof createWorkspace;
1664
+ declare const workspaces_deleteWorkspaces: typeof deleteWorkspaces;
1665
+ declare const workspaces_getWorkspaceActivity: typeof getWorkspaceActivity;
1666
+ declare const workspaces_grantTemporaryWorkspaceAccess: typeof grantTemporaryWorkspaceAccess;
1667
+ declare const workspaces_listWorkspaceUsers: typeof listWorkspaceUsers;
1668
+ declare const workspaces_listWorkspaces: typeof listWorkspaces;
1669
+ declare const workspaces_removeWorkspaceUsers: typeof removeWorkspaceUsers;
1670
+ declare const workspaces_setUserRole: typeof setUserRole;
1671
+ declare const workspaces_updateWorkspace: typeof updateWorkspace;
1672
+ declare namespace workspaces {
1673
+ export { type workspaces_WorkspaceActivityOptions as WorkspaceActivityOptions, workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_getWorkspaceActivity as getWorkspaceActivity, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_setUserRole as setUserRole, workspaces_updateWorkspace as updateWorkspace };
1674
+ }
1675
+
1676
+ /**
1677
+ * Conversation operations — list, threads, delete, messages, import.
1678
+ */
1679
+
1680
+ type ConversationImportResponse = components['schemas']['ConversationImportResponse'];
1681
+ type PostMessageRequest = components['schemas']['PostMessageRequest'];
1682
+ type MessageMention = components['schemas']['MessageMention'];
1683
+ type AssistantMode = components['schemas']['AssistantMode'];
1684
+
1685
+ /** The caller's conversations. A conversation with a `status` is also a task (work item). */
1686
+ declare function listConversations(arbi: ArbiClient): Promise<{
1687
+ label_ext_ids?: string[] | undefined;
1688
+ external_id: string;
1689
+ title: string | null;
1690
+ created_by_ext_id: string;
1691
+ updated_by_ext_id?: string | null | undefined;
1692
+ created_at: string;
1693
+ updated_at: string;
1694
+ is_shared: boolean;
1695
+ message_count: number;
1696
+ last_message_actor?: {
1697
+ external_id: string;
1698
+ given_name: string;
1699
+ family_name?: string | null | undefined;
1700
+ picture?: string | null | undefined;
1701
+ parent_ext_id?: string | null | undefined;
1702
+ } | null | undefined;
1703
+ last_message_ext_id?: string | null | undefined;
1704
+ last_message_role?: string | null | undefined;
1705
+ last_message_updated_at?: string | null | undefined;
1706
+ last_message_status?: string | null | undefined;
1707
+ assistant_mode: components["schemas"]["AssistantMode"];
1708
+ status?: (components["schemas"]["WorkStatus"] | null) | undefined;
1709
+ description?: string | null | undefined;
1710
+ due_at?: string | null | undefined;
1711
+ completed_at?: string | null | undefined;
1712
+ completed_by_ext_id?: string | null | undefined;
1713
+ parent_conversation_ext_id?: string | null | undefined;
1714
+ workflow_ext_id?: string | null | undefined;
1715
+ agent_ext_id?: string | null | undefined;
1716
+ skill_ref?: string | null | undefined;
1717
+ skill_inputs?: {
1718
+ [x: string]: unknown;
1719
+ } | null | undefined;
1720
+ has_agent_action: boolean;
1721
+ auth_mode?: (components["schemas"]["src__models__work__AuthMode"] | null) | undefined;
1722
+ plan?: {
1723
+ goal: string;
1724
+ criteria: {
1725
+ id: string;
1726
+ text: string;
1727
+ }[];
1728
+ max_passes: number;
1729
+ documents: string[];
1730
+ steps: {
1731
+ id: string;
1732
+ title: string;
1733
+ kind: "form" | "upload" | "agent" | "review" | "action";
1734
+ after?: string[] | null | undefined;
1735
+ skill?: string | null | undefined;
1736
+ prompt?: string | null | undefined;
1737
+ inputs?: {
1738
+ [x: string]: string;
1739
+ } | null | undefined;
1740
+ branch: boolean;
1741
+ requires_files: boolean;
1742
+ ui?: {
1743
+ [x: string]: unknown;
1744
+ } | null | undefined;
1745
+ signals?: {
1746
+ name: string;
1747
+ when?: {
1748
+ field?: string | null | undefined;
1749
+ equals?: string | number | boolean | null | undefined;
1750
+ contains?: string | null | undefined;
1751
+ matches?: string | null | undefined;
1752
+ approved?: boolean | null | undefined;
1753
+ } | null | undefined;
1754
+ }[] | undefined;
1755
+ assignee?: {
1756
+ user?: string | null | undefined;
1757
+ run_owner?: true | null | undefined;
1758
+ input?: string | null | undefined;
1759
+ project_lead?: true | null | undefined;
1760
+ } | null | undefined;
1761
+ remind_after_hours?: number | null | undefined;
1762
+ fields?: {
1763
+ [x: string]: unknown;
1764
+ name: string;
1765
+ type: "text" | "longtext" | "boolean" | "select" | "number" | "date" | "scope" | "documents" | "person";
1766
+ label?: string | null | undefined;
1767
+ required: boolean;
1768
+ options?: {
1769
+ [x: string]: unknown;
1770
+ value: string;
1771
+ label?: string | null | undefined;
1772
+ }[] | null | undefined;
1773
+ min?: number | null | undefined;
1774
+ max?: number | null | undefined;
1775
+ }[] | null | undefined;
1776
+ action?: {
1777
+ type: "sign";
1778
+ document: string | {
1473
1779
  step?: string | null | undefined;
1474
1780
  input?: string | null | undefined;
1475
1781
  };
@@ -3118,42 +3424,162 @@ declare namespace dm {
3118
3424
  }
3119
3425
 
3120
3426
  /**
3121
- * File operations — OpenAI-compatible Files API (list, get, delete, upload, content).
3427
+ * User settings operations — get, update, and the follow / mute lists.
3122
3428
  */
3123
3429
 
3124
- type FileObject = components['schemas']['FileObject'];
3125
- type FileDeleteResponse = components['schemas']['FileDeleteResponse'];
3126
- type FileListResponse = components['schemas']['FileListResponse'];
3127
-
3128
- interface ListFilesOptions {
3129
- purpose?: string | null;
3130
- limit?: number;
3131
- order?: string;
3132
- after?: string | null;
3133
- }
3134
- declare function listFiles(arbi: ArbiClient, options?: ListFilesOptions): Promise<{
3135
- object: string;
3136
- data: {
3137
- id: string;
3138
- object: string;
3139
- bytes: number;
3140
- created_at: number;
3141
- filename: string;
3142
- purpose: string;
3430
+ type UserSettingsUpdate$1 = components['schemas']['UserSettingsUpdate'];
3431
+ declare function getSettings(arbi: ArbiClient): Promise<{
3432
+ [x: string]: unknown;
3433
+ subscription?: {
3143
3434
  status: string;
3144
- expires_at?: number | null | undefined;
3145
- status_details?: string | null | undefined;
3435
+ } | null | undefined;
3436
+ last_workspace?: string | null | undefined;
3437
+ last_config?: string | null | undefined;
3438
+ pinned_workspaces: string[];
3439
+ pinned_templates: string[];
3440
+ pinned_skills: string[];
3441
+ tableviews: {
3442
+ workspace: string;
3443
+ name: string;
3444
+ columns: string[];
3445
+ column_widths?: {
3446
+ [x: string]: number;
3447
+ } | null | undefined;
3448
+ tile_size?: number | null | undefined;
3449
+ row_height?: number | null | undefined;
3146
3450
  }[];
3147
- has_more: boolean;
3148
- first_id?: string | null | undefined;
3149
- last_id?: string | null | undefined;
3150
- }>;
3151
- declare function getFile(arbi: ArbiClient, fileId: string): Promise<{
3152
- id: string;
3153
- object: string;
3154
- bytes: number;
3155
- created_at: number;
3156
- filename: string;
3451
+ developer: boolean;
3452
+ show_document_navigator: boolean;
3453
+ show_thread_visualization: boolean;
3454
+ show_security_settings: boolean;
3455
+ show_invite_tab: boolean;
3456
+ show_help_page: boolean;
3457
+ show_templates: boolean;
3458
+ show_skills: boolean;
3459
+ show_pa_mode: boolean;
3460
+ show_conversation_search: boolean;
3461
+ show_agent_sessions: boolean;
3462
+ show_mcp_connectors: boolean;
3463
+ show_connector_microsoft: boolean;
3464
+ show_connector_sharepoint: boolean;
3465
+ show_connector_google: boolean;
3466
+ show_connector_imanage: boolean;
3467
+ show_appearance: boolean;
3468
+ show_file_explorer: boolean;
3469
+ show_hints: boolean;
3470
+ show_tasks: boolean;
3471
+ show_agent_builder: boolean;
3472
+ dismissed_tips?: string[] | undefined;
3473
+ use_s3_direct_upload: boolean;
3474
+ hide_online_status: boolean;
3475
+ muted_users: string[];
3476
+ muted_workspaces: string[];
3477
+ followed_workspaces: string[];
3478
+ followed_threads: string[];
3479
+ email_notifications?: {
3480
+ messages: boolean;
3481
+ workspace_added: boolean;
3482
+ workspace_access_request: boolean;
3483
+ contact_accepted: boolean;
3484
+ referral_reward: boolean;
3485
+ product_updates: boolean;
3486
+ } | undefined;
3487
+ premium_model?: string | null | undefined;
3488
+ retired_premium_model?: string | null | undefined;
3489
+ retired_premium_model_suggestion?: string | null | undefined;
3490
+ picture?: string | null | undefined;
3491
+ extra_discount?: {
3492
+ [x: string]: unknown;
3493
+ } | null | undefined;
3494
+ }>;
3495
+ declare function updateSettings(arbi: ArbiClient, body: UserSettingsUpdate$1): Promise<void>;
3496
+ /**
3497
+ * The relevance lists in user settings. A workspace member is notified only of what is relevant to
3498
+ * them (a mention, an assignment, a reply in a thread they take part in). Following a workspace or a
3499
+ * thread opts in to everything from it; muting a workspace or a person silences it, and muting wins.
3500
+ */
3501
+ type RelevanceList = 'muted_users' | 'muted_workspaces' | 'followed_workspaces' | 'followed_threads';
3502
+ /** `list` with `id` added (`on`) or removed, in order, without duplicates. */
3503
+ declare function withMembership(list: readonly string[] | null | undefined, id: string, on: boolean): string[];
3504
+ /**
3505
+ * Add or remove one id in one of the lists. The server takes each list whole, so this reads the
3506
+ * current settings and sends the full new list. Returns the list as sent.
3507
+ */
3508
+ declare function setListMembership(arbi: ArbiClient, list: RelevanceList, id: string, on: boolean): Promise<string[]>;
3509
+ /** The two workspace lists, as the settings record carries them. */
3510
+ interface WorkspaceRelevanceLists {
3511
+ muted_workspaces?: readonly string[] | null;
3512
+ followed_workspaces?: readonly string[] | null;
3513
+ }
3514
+ /**
3515
+ * How much of a workspace reaches the bell: `default` (what names or involves you), `following`
3516
+ * (everything) or `muted` (nothing: a mute overrides mentions and assignments too).
3517
+ */
3518
+ type WorkspaceNotificationLevel = 'default' | 'following' | 'muted';
3519
+ /** The level the lists give a workspace. A workspace on both lists is muted: muting wins. */
3520
+ declare function workspaceNotificationLevel(lists: WorkspaceRelevanceLists | null | undefined, workspaceId: string): WorkspaceNotificationLevel;
3521
+ /** Both workspace lists with `workspaceId` at `level`: on at most one of them. */
3522
+ declare function workspaceLevelPatch(lists: WorkspaceRelevanceLists | null | undefined, workspaceId: string, level: WorkspaceNotificationLevel): {
3523
+ muted_workspaces: string[];
3524
+ followed_workspaces: string[];
3525
+ };
3526
+ /** Set a workspace's level, both lists sent whole in one write. Returns the lists as sent. */
3527
+ declare function setWorkspaceNotificationLevel(arbi: ArbiClient, workspaceId: string, level: WorkspaceNotificationLevel): Promise<{
3528
+ muted_workspaces: string[];
3529
+ followed_workspaces: string[];
3530
+ }>;
3531
+
3532
+ type settings_RelevanceList = RelevanceList;
3533
+ type settings_WorkspaceNotificationLevel = WorkspaceNotificationLevel;
3534
+ type settings_WorkspaceRelevanceLists = WorkspaceRelevanceLists;
3535
+ declare const settings_getSettings: typeof getSettings;
3536
+ declare const settings_setListMembership: typeof setListMembership;
3537
+ declare const settings_setWorkspaceNotificationLevel: typeof setWorkspaceNotificationLevel;
3538
+ declare const settings_updateSettings: typeof updateSettings;
3539
+ declare const settings_withMembership: typeof withMembership;
3540
+ declare const settings_workspaceLevelPatch: typeof workspaceLevelPatch;
3541
+ declare const settings_workspaceNotificationLevel: typeof workspaceNotificationLevel;
3542
+ declare namespace settings {
3543
+ export { type settings_RelevanceList as RelevanceList, type settings_WorkspaceNotificationLevel as WorkspaceNotificationLevel, type settings_WorkspaceRelevanceLists as WorkspaceRelevanceLists, settings_getSettings as getSettings, settings_setListMembership as setListMembership, settings_setWorkspaceNotificationLevel as setWorkspaceNotificationLevel, settings_updateSettings as updateSettings, settings_withMembership as withMembership, settings_workspaceLevelPatch as workspaceLevelPatch, settings_workspaceNotificationLevel as workspaceNotificationLevel };
3544
+ }
3545
+
3546
+ /**
3547
+ * File operations — OpenAI-compatible Files API (list, get, delete, upload, content).
3548
+ */
3549
+
3550
+ type FileObject = components['schemas']['FileObject'];
3551
+ type FileDeleteResponse = components['schemas']['FileDeleteResponse'];
3552
+ type FileListResponse = components['schemas']['FileListResponse'];
3553
+
3554
+ interface ListFilesOptions {
3555
+ purpose?: string | null;
3556
+ limit?: number;
3557
+ order?: string;
3558
+ after?: string | null;
3559
+ }
3560
+ declare function listFiles(arbi: ArbiClient, options?: ListFilesOptions): Promise<{
3561
+ object: string;
3562
+ data: {
3563
+ id: string;
3564
+ object: string;
3565
+ bytes: number;
3566
+ created_at: number;
3567
+ filename: string;
3568
+ purpose: string;
3569
+ status: string;
3570
+ expires_at?: number | null | undefined;
3571
+ status_details?: string | null | undefined;
3572
+ }[];
3573
+ has_more: boolean;
3574
+ first_id?: string | null | undefined;
3575
+ last_id?: string | null | undefined;
3576
+ }>;
3577
+ declare function getFile(arbi: ArbiClient, fileId: string): Promise<{
3578
+ id: string;
3579
+ object: string;
3580
+ bytes: number;
3581
+ created_at: number;
3582
+ filename: string;
3157
3583
  purpose: string;
3158
3584
  status: string;
3159
3585
  expires_at?: number | null | undefined;
@@ -3634,7 +4060,7 @@ declare function listProjects(arbi: ArbiClient, filters?: {
3634
4060
  field_schema?: {
3635
4061
  key: string;
3636
4062
  label?: string | null | undefined;
3637
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
4063
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
3638
4064
  options?: string[] | null | undefined;
3639
4065
  }[] | null | undefined;
3640
4066
  plan_interval?: ("month" | "year") | null | undefined;
@@ -3751,7 +4177,7 @@ declare function createProject(arbi: ArbiClient, name: string, plan?: 'free' | '
3751
4177
  field_schema?: {
3752
4178
  key: string;
3753
4179
  label?: string | null | undefined;
3754
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
4180
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
3755
4181
  options?: string[] | null | undefined;
3756
4182
  }[] | null | undefined;
3757
4183
  plan_interval?: ("month" | "year") | null | undefined;
@@ -3881,7 +4307,7 @@ declare function updateProject(arbi: ArbiClient, projectExtId: string, body: Pro
3881
4307
  field_schema?: {
3882
4308
  key: string;
3883
4309
  label?: string | null | undefined;
3884
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
4310
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
3885
4311
  options?: string[] | null | undefined;
3886
4312
  }[] | null | undefined;
3887
4313
  plan_interval?: ("month" | "year") | null | undefined;
@@ -3994,7 +4420,7 @@ declare function renameProject(arbi: ArbiClient, projectExtId: string, name: str
3994
4420
  field_schema?: {
3995
4421
  key: string;
3996
4422
  label?: string | null | undefined;
3997
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
4423
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
3998
4424
  options?: string[] | null | undefined;
3999
4425
  }[] | null | undefined;
4000
4426
  plan_interval?: ("month" | "year") | null | undefined;
@@ -4107,7 +4533,7 @@ declare function refreshProject(arbi: ArbiClient, projectExtId: string): Promise
4107
4533
  field_schema?: {
4108
4534
  key: string;
4109
4535
  label?: string | null | undefined;
4110
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
4536
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
4111
4537
  options?: string[] | null | undefined;
4112
4538
  }[] | null | undefined;
4113
4539
  plan_interval?: ("month" | "year") | null | undefined;
@@ -4730,10 +5156,10 @@ declare namespace facts {
4730
5156
  }
4731
5157
 
4732
5158
  type DocUpdateRequest = components['schemas']['DocUpdateRequest'];
4733
- type WorkspaceUpdateRequest$1 = components['schemas']['WorkspaceUpdateRequest'];
5159
+ type WorkspaceUpdateRequest = components['schemas']['WorkspaceUpdateRequest'];
4734
5160
  type TagFormat = components['schemas']['TagFormat'];
4735
5161
  type CitationSources$1 = components['schemas']['CitationSources'];
4736
- type UserSettingsUpdate$1 = components['schemas']['UserSettingsUpdate'];
5162
+ type UserSettingsUpdate = components['schemas']['UserSettingsUpdate'];
4737
5163
  type ConfigUpdateData$1 = components['schemas']['ConfigUpdateData'];
4738
5164
 
4739
5165
  interface ArbiOptions {
@@ -4933,7 +5359,7 @@ declare class Arbi {
4933
5359
  field_schema?: {
4934
5360
  key: string;
4935
5361
  label?: string | null | undefined;
4936
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
5362
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
4937
5363
  options?: string[] | null | undefined;
4938
5364
  }[] | null | undefined;
4939
5365
  plan_interval?: ("month" | "year") | null | undefined;
@@ -5045,7 +5471,7 @@ declare class Arbi {
5045
5471
  field_schema?: {
5046
5472
  key: string;
5047
5473
  label?: string | null | undefined;
5048
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
5474
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
5049
5475
  options?: string[] | null | undefined;
5050
5476
  }[] | null | undefined;
5051
5477
  plan_interval?: ("month" | "year") | null | undefined;
@@ -5158,7 +5584,7 @@ declare class Arbi {
5158
5584
  field_schema?: {
5159
5585
  key: string;
5160
5586
  label?: string | null | undefined;
5161
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
5587
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
5162
5588
  options?: string[] | null | undefined;
5163
5589
  }[] | null | undefined;
5164
5590
  plan_interval?: ("month" | "year") | null | undefined;
@@ -5296,7 +5722,7 @@ declare class Arbi {
5296
5722
  field_schema?: {
5297
5723
  key: string;
5298
5724
  label?: string | null | undefined;
5299
- type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup";
5725
+ type: "text" | "number" | "date" | "checkbox" | "select" | "person" | "document" | "relation" | "lookup" | "rollup" | "tag";
5300
5726
  options?: string[] | null | undefined;
5301
5727
  }[] | null | undefined;
5302
5728
  plan_interval?: ("month" | "year") | null | undefined;
@@ -5450,14 +5876,14 @@ declare class Arbi {
5450
5876
  email: string;
5451
5877
  }>;
5452
5878
  /**
5453
- * Change (or, after recovery, set) the master password: re-keys the workspaces and direct
5454
- * messages. Omit `currentPassword` in recovery mode. Resolves with the new signing key, whose
5455
- * recovery file the user should save.
5879
+ * Change (or, after recovery, set) the master password. Omit `currentPassword` in recovery
5880
+ * mode. One request: the account identity is re-wrapped under the new password and nothing is
5881
+ * re-encrypted, so the session, the workspace keys and the recovery key all stay as they are.
5456
5882
  */
5457
5883
  changePassword: (params: {
5458
5884
  newPassword: string;
5459
5885
  currentPassword?: string;
5460
- }) => Promise<_arbidocs_client.RekeyedPasswordChangeResult>;
5886
+ }) => Promise<void>;
5461
5887
  /** Close the account (soft delete) and sign out. Refused while a subscription is active. */
5462
5888
  requestDeletion: () => Promise<{
5463
5889
  detail: string;
@@ -5623,7 +6049,7 @@ declare class Arbi {
5623
6049
  project_owner_ext_id?: string | null | undefined;
5624
6050
  }>;
5625
6051
  delete: (workspaceIds: string[]) => Promise<void>;
5626
- update: (body: WorkspaceUpdateRequest$1) => Promise<{
6052
+ update: (body: WorkspaceUpdateRequest) => Promise<{
5627
6053
  external_id: string;
5628
6054
  name: string;
5629
6055
  description: string | null;
@@ -5685,6 +6111,29 @@ declare class Arbi {
5685
6111
  agent_ext_id?: string | null | undefined;
5686
6112
  is_temporary: boolean;
5687
6113
  }[]>;
6114
+ /** One page of a workspace's activity feed, newest first (see `getWorkspaceActivity`). */
6115
+ activity: (workspaceId: string, options?: WorkspaceActivityOptions) => Promise<{
6116
+ items: {
6117
+ external_id: string;
6118
+ source: components["schemas"]["WorkspaceActivitySource"];
6119
+ kind: string;
6120
+ actor_ext_id?: string | null | undefined;
6121
+ conversation_ext_id?: string | null | undefined;
6122
+ conversation_title?: string | null | undefined;
6123
+ message_ext_id?: string | null | undefined;
6124
+ document_ext_id?: string | null | undefined;
6125
+ document_name?: string | null | undefined;
6126
+ version?: number | null | undefined;
6127
+ workflow_ext_id?: string | null | undefined;
6128
+ workflow_name?: string | null | undefined;
6129
+ status?: string | null | undefined;
6130
+ detail?: {
6131
+ [x: string]: unknown;
6132
+ } | null | undefined;
6133
+ created_at: string;
6134
+ }[];
6135
+ next_cursor?: string | null | undefined;
6136
+ }>;
5688
6137
  addUsers: (emails: string[], role?: "owner" | "collaborator" | "guest") => Promise<{
5689
6138
  user: {
5690
6139
  external_id: string;
@@ -7904,7 +8353,14 @@ declare class Arbi {
7904
8353
  [x: string]: unknown;
7905
8354
  } | null | undefined;
7906
8355
  }>;
7907
- update: (body: UserSettingsUpdate$1) => Promise<void>;
8356
+ update: (body: UserSettingsUpdate) => Promise<void>;
8357
+ /** Add or remove one id in a follow / mute list (the full list is sent). */
8358
+ setListMembership: (list: RelevanceList, id: string, on: boolean) => Promise<string[]>;
8359
+ /** A workspace's notification level: default, following or muted. */
8360
+ setWorkspaceNotificationLevel: (workspaceId: string, level: WorkspaceNotificationLevel) => Promise<{
8361
+ muted_workspaces: string[];
8362
+ followed_workspaces: string[];
8363
+ }>;
7908
8364
  };
7909
8365
  readonly agentConfig: {
7910
8366
  list: () => Promise<{
@@ -8797,407 +9253,135 @@ declare class Arbi {
8797
9253
  last_run_status?: string | null;
8798
9254
  owner_ext_id?: string | null;
8799
9255
  is_owner: boolean;
8800
- created_at: string;
8801
- updated_at: string;
8802
- }>;
8803
- delete: (workflowId: string) => Promise<void>;
8804
- /** Fire a workflow now, as a test run. Resolves with the conversation it created and whether it started. */
8805
- run: (workflowId: string) => Promise<{
8806
- execution_id?: number | null;
8807
- action_type?: string | null;
8808
- conversation_ext_id?: string | null;
8809
- started: boolean;
8810
- error?: string | null;
8811
- }>;
8812
- };
8813
- readonly facts: {
8814
- create: (body: CreateFactRequest) => Promise<{
8815
- text: string;
8816
- citations?: components["schemas"]["CitationSources"] | null;
8817
- external_id: string;
8818
- workspace_ext_id: string;
8819
- shared: boolean;
8820
- confirmed: boolean;
8821
- date_start?: string | null;
8822
- date_end?: string | null;
8823
- timezone?: string | null;
8824
- reminder_task_ext_ids: string[];
8825
- tags: components["schemas"]["FactTagResponse"][];
8826
- created_by_ext_id: string;
8827
- created_at: string;
8828
- updated_at: string;
8829
- }>;
8830
- /** Create up to 200 notes in one all-or-nothing request. */
8831
- createBatch: (body: CreateFactsRequest) => Promise<{
8832
- text: string;
8833
- citations?: components["schemas"]["CitationSources"] | null;
8834
- external_id: string;
8835
- workspace_ext_id: string;
8836
- shared: boolean;
8837
- confirmed: boolean;
8838
- date_start?: string | null;
8839
- date_end?: string | null;
8840
- timezone?: string | null;
8841
- reminder_task_ext_ids: string[];
8842
- tags: components["schemas"]["FactTagResponse"][];
8843
- created_by_ext_id: string;
8844
- created_at: string;
8845
- updated_at: string;
8846
- }[]>;
8847
- /** Pass `from`/`to`/`datedOnly` for the timeline view — dated notes only,
8848
- * ordered by when they happened. `tagExtIds` / `docExtId` narrow the list;
8849
- * `limit` / `offset` page it. */
8850
- list: (options?: ListFactsOptions) => Promise<{
8851
- text: string;
8852
- citations?: components["schemas"]["CitationSources"] | null;
8853
- external_id: string;
8854
- workspace_ext_id: string;
8855
- shared: boolean;
8856
- confirmed: boolean;
8857
- date_start?: string | null;
8858
- date_end?: string | null;
8859
- timezone?: string | null;
8860
- reminder_task_ext_ids: string[];
8861
- tags: components["schemas"]["FactTagResponse"][];
8862
- created_by_ext_id: string;
8863
- created_at: string;
8864
- updated_at: string;
8865
- }[]>;
8866
- search: (body: FactSearchRequest) => Promise<{
8867
- facts: components["schemas"]["FactSearchHit"][];
8868
- }>;
8869
- update: (factId: string, body: UpdateFactRequest) => Promise<{
8870
- text: string;
8871
- citations?: components["schemas"]["CitationSources"] | null;
8872
- external_id: string;
8873
- workspace_ext_id: string;
8874
- shared: boolean;
8875
- confirmed: boolean;
8876
- date_start?: string | null;
8877
- date_end?: string | null;
8878
- timezone?: string | null;
8879
- reminder_task_ext_ids: string[];
8880
- tags: components["schemas"]["FactTagResponse"][];
8881
- created_by_ext_id: string;
8882
- created_at: string;
8883
- updated_at: string;
8884
- }>;
8885
- delete: (factId: string) => Promise<void>;
8886
- /** One-off reminder on a dated note: an explicit `remindAt`, or
8887
- * `leadMinutes` before its date. */
8888
- remind: (factId: string, options?: {
8889
- remindAt?: string;
8890
- leadMinutes?: number;
8891
- }) => Promise<{
8892
- text: string;
8893
- citations?: components["schemas"]["CitationSources"] | null;
8894
- external_id: string;
8895
- workspace_ext_id: string;
8896
- shared: boolean;
8897
- confirmed: boolean;
8898
- date_start?: string | null;
8899
- date_end?: string | null;
8900
- timezone?: string | null;
8901
- reminder_task_ext_ids: string[];
8902
- tags: components["schemas"]["FactTagResponse"][];
8903
- created_by_ext_id: string;
8904
- created_at: string;
8905
- updated_at: string;
8906
- }>;
8907
- };
8908
- readonly sessions: {
8909
- list: () => Promise<{
8910
- session_id: string;
8911
- external_id?: string | null;
8912
- name?: string | null;
8913
- ip_address?: string | null;
8914
- active_workspace?: string | null;
8915
- workspaces: string[];
8916
- status: string;
8917
- ttl: number;
8918
- }[]>;
8919
- /** The id this device's session is listed under in `list()`; `null` when unknown. */
8920
- currentId: () => string | null;
8921
- /** End one of your own sessions now (not the one this device is on: that is `logout`). */
8922
- terminate: (sessionId: string) => Promise<void>;
8923
- /** Sign out of every device on the server, then clear this instance. */
8924
- logoutAll: () => Promise<void>;
8925
- };
8926
- private requireClient;
8927
- private requireLogin;
8928
- private requireWorkspace;
8929
- }
8930
-
8931
- /**
8932
- * Workspace operations — list, create, delete, update, users, copy.
8933
- */
8934
-
8935
- type WorkspaceUpdateRequest = components['schemas']['WorkspaceUpdateRequest'];
8936
- declare function listWorkspaces(arbi: ArbiClient): Promise<{
8937
- external_id: string;
8938
- name: string;
8939
- description: string | null;
8940
- is_public: boolean;
8941
- workspace_type: components["schemas"]["WorkspaceType"];
8942
- created_by_ext_id: string;
8943
- updated_by_ext_id?: string | null | undefined;
8944
- created_at: string;
8945
- updated_at: string;
8946
- wrapped_key?: string | null | undefined;
8947
- is_member: boolean;
8948
- shared_conversation_count: number;
8949
- private_conversation_count: number;
8950
- shared_document_count: number;
8951
- private_document_count: number;
8952
- user_files_mb: number;
8953
- users: {
8954
- user: {
8955
- external_id: string;
8956
- parent_ext_id?: string | null | undefined;
8957
- email: string;
8958
- given_name: string;
8959
- family_name?: string | null | undefined;
8960
- picture?: string | null | undefined;
8961
- encryption_public_key: string;
8962
- is_sso: boolean;
8963
- is_identity_verified: boolean;
8964
- };
8965
- role: components["schemas"]["WorkspaceRole"];
8966
- joined_at: string;
8967
- conversation_count: number;
8968
- document_count: number;
8969
- files_mb: number;
8970
- agent_ext_id?: string | null | undefined;
8971
- is_temporary: boolean;
8972
- }[];
8973
- project_ext_id?: string | null | undefined;
8974
- project_name?: string | null | undefined;
8975
- project_subscription?: string | null | undefined;
8976
- project_owner_ext_id?: string | null | undefined;
8977
- }[]>;
8978
- /**
8979
- * Create a workspace with a pre-encrypted workspace key.
8980
- *
8981
- * The caller must generate a random 32-byte key, encrypt it with the session
8982
- * public key (SealedBox via `sealKeyForSession`), and pass it here.
8983
- * Use `Arbi.workspaces.create()` for automatic key generation.
8984
- */
8985
- declare function createWorkspace(arbi: ArbiClient, name: string, encryptedWorkspaceKey: string, projectExtId: string, description?: string | null, isPublic?: boolean): Promise<{
8986
- external_id: string;
8987
- name: string;
8988
- description: string | null;
8989
- is_public: boolean;
8990
- workspace_type: components["schemas"]["WorkspaceType"];
8991
- created_by_ext_id: string;
8992
- updated_by_ext_id?: string | null | undefined;
8993
- created_at: string;
8994
- updated_at: string;
8995
- wrapped_key?: string | null | undefined;
8996
- is_member: boolean;
8997
- shared_conversation_count: number;
8998
- private_conversation_count: number;
8999
- shared_document_count: number;
9000
- private_document_count: number;
9001
- user_files_mb: number;
9002
- users: {
9003
- user: {
9004
- external_id: string;
9005
- parent_ext_id?: string | null | undefined;
9006
- email: string;
9007
- given_name: string;
9008
- family_name?: string | null | undefined;
9009
- picture?: string | null | undefined;
9010
- encryption_public_key: string;
9011
- is_sso: boolean;
9012
- is_identity_verified: boolean;
9013
- };
9014
- role: components["schemas"]["WorkspaceRole"];
9015
- joined_at: string;
9016
- conversation_count: number;
9017
- document_count: number;
9018
- files_mb: number;
9019
- agent_ext_id?: string | null | undefined;
9020
- is_temporary: boolean;
9021
- }[];
9022
- project_ext_id?: string | null | undefined;
9023
- project_name?: string | null | undefined;
9024
- project_subscription?: string | null | undefined;
9025
- project_owner_ext_id?: string | null | undefined;
9026
- }>;
9027
- declare function deleteWorkspaces(arbi: ArbiClient, workspaceIds: string[]): Promise<void>;
9028
- declare function updateWorkspace(arbi: ArbiClient, body: WorkspaceUpdateRequest): Promise<{
9029
- external_id: string;
9030
- name: string;
9031
- description: string | null;
9032
- is_public: boolean;
9033
- workspace_type: components["schemas"]["WorkspaceType"];
9034
- created_by_ext_id: string;
9035
- updated_by_ext_id?: string | null | undefined;
9036
- created_at: string;
9037
- updated_at: string;
9038
- wrapped_key?: string | null | undefined;
9039
- is_member: boolean;
9040
- shared_conversation_count: number;
9041
- private_conversation_count: number;
9042
- shared_document_count: number;
9043
- private_document_count: number;
9044
- user_files_mb: number;
9045
- users: {
9046
- user: {
9047
- external_id: string;
9048
- parent_ext_id?: string | null | undefined;
9049
- email: string;
9050
- given_name: string;
9051
- family_name?: string | null | undefined;
9052
- picture?: string | null | undefined;
9053
- encryption_public_key: string;
9054
- is_sso: boolean;
9055
- is_identity_verified: boolean;
9056
- };
9057
- role: components["schemas"]["WorkspaceRole"];
9058
- joined_at: string;
9059
- conversation_count: number;
9060
- document_count: number;
9061
- files_mb: number;
9062
- agent_ext_id?: string | null | undefined;
9063
- is_temporary: boolean;
9064
- }[];
9065
- project_ext_id?: string | null | undefined;
9066
- project_name?: string | null | undefined;
9067
- project_subscription?: string | null | undefined;
9068
- project_owner_ext_id?: string | null | undefined;
9069
- }>;
9070
- declare function listWorkspaceUsers(arbi: ArbiClient): Promise<{
9071
- user: {
9072
- external_id: string;
9073
- parent_ext_id?: string | null | undefined;
9074
- email: string;
9075
- given_name: string;
9076
- family_name?: string | null | undefined;
9077
- picture?: string | null | undefined;
9078
- encryption_public_key: string;
9079
- is_sso: boolean;
9080
- is_identity_verified: boolean;
9081
- };
9082
- role: components["schemas"]["WorkspaceRole"];
9083
- joined_at: string;
9084
- conversation_count: number;
9085
- document_count: number;
9086
- files_mb: number;
9087
- agent_ext_id?: string | null | undefined;
9088
- is_temporary: boolean;
9089
- }[]>;
9090
- declare function addWorkspaceUsers(arbi: ArbiClient, emails: string[], role?: 'owner' | 'collaborator' | 'guest',
9091
- /** Share a workspace other than the open one: its id and its key sealed to the caller's session. */
9092
- target?: {
9093
- workspaceExtId: string;
9094
- workspaceKey: string;
9095
- }): Promise<{
9096
- user: {
9097
- external_id: string;
9098
- parent_ext_id?: string | null | undefined;
9099
- email: string;
9100
- given_name: string;
9101
- family_name?: string | null | undefined;
9102
- picture?: string | null | undefined;
9103
- encryption_public_key: string;
9104
- is_sso: boolean;
9105
- is_identity_verified: boolean;
9106
- };
9107
- role: components["schemas"]["WorkspaceRole"];
9108
- joined_at: string;
9109
- conversation_count: number;
9110
- document_count: number;
9111
- files_mb: number;
9112
- agent_ext_id?: string | null | undefined;
9113
- is_temporary: boolean;
9114
- }[]>;
9115
- /**
9116
- * Grant users a TEMPORARY, session-scoped workspace key (`session_pubkey_b64` path of
9117
- * `POST /v1/workspace/users`). The key is deposited onto the recipient's session (typically an
9118
- * agent run session) and the membership row expires with it; no standing membership is created.
9119
- *
9120
- * `workspaceKey` is the workspace key sealed to the CALLER's own session (what `/open` takes), so
9121
- * the workspace need not be the open one. Use `Arbi.workspaces.grantTemporaryAccess()` to have the
9122
- * key derived for you.
9123
- */
9124
- declare function grantTemporaryWorkspaceAccess(arbi: ArbiClient, params: {
9125
- emails: string[];
9126
- workspaceExtId: string;
9127
- workspaceKey: string;
9128
- sessionPubkeyB64: string;
9129
- role?: 'owner' | 'collaborator' | 'guest';
9130
- }): Promise<{
9131
- user: {
9132
- external_id: string;
9133
- parent_ext_id?: string | null | undefined;
9134
- email: string;
9135
- given_name: string;
9136
- family_name?: string | null | undefined;
9137
- picture?: string | null | undefined;
9138
- encryption_public_key: string;
9139
- is_sso: boolean;
9140
- is_identity_verified: boolean;
9256
+ created_at: string;
9257
+ updated_at: string;
9258
+ }>;
9259
+ delete: (workflowId: string) => Promise<void>;
9260
+ /** Fire a workflow now, as a test run. Resolves with the conversation it created and whether it started. */
9261
+ run: (workflowId: string) => Promise<{
9262
+ execution_id?: number | null;
9263
+ action_type?: string | null;
9264
+ conversation_ext_id?: string | null;
9265
+ started: boolean;
9266
+ error?: string | null;
9267
+ }>;
9141
9268
  };
9142
- role: components["schemas"]["WorkspaceRole"];
9143
- joined_at: string;
9144
- conversation_count: number;
9145
- document_count: number;
9146
- files_mb: number;
9147
- agent_ext_id?: string | null | undefined;
9148
- is_temporary: boolean;
9149
- }[]>;
9150
- declare function removeWorkspaceUsers(arbi: ArbiClient, userIds: string[]): Promise<void>;
9151
- declare function setUserRole(arbi: ArbiClient, userIds: string[], role: 'owner' | 'collaborator' | 'guest'): Promise<{
9152
- user: {
9153
- external_id: string;
9154
- parent_ext_id?: string | null | undefined;
9155
- email: string;
9156
- given_name: string;
9157
- family_name?: string | null | undefined;
9158
- picture?: string | null | undefined;
9159
- encryption_public_key: string;
9160
- is_sso: boolean;
9161
- is_identity_verified: boolean;
9269
+ readonly facts: {
9270
+ create: (body: CreateFactRequest) => Promise<{
9271
+ text: string;
9272
+ citations?: components["schemas"]["CitationSources"] | null;
9273
+ external_id: string;
9274
+ workspace_ext_id: string;
9275
+ shared: boolean;
9276
+ confirmed: boolean;
9277
+ date_start?: string | null;
9278
+ date_end?: string | null;
9279
+ timezone?: string | null;
9280
+ reminder_task_ext_ids: string[];
9281
+ tags: components["schemas"]["FactTagResponse"][];
9282
+ created_by_ext_id: string;
9283
+ created_at: string;
9284
+ updated_at: string;
9285
+ }>;
9286
+ /** Create up to 200 notes in one all-or-nothing request. */
9287
+ createBatch: (body: CreateFactsRequest) => Promise<{
9288
+ text: string;
9289
+ citations?: components["schemas"]["CitationSources"] | null;
9290
+ external_id: string;
9291
+ workspace_ext_id: string;
9292
+ shared: boolean;
9293
+ confirmed: boolean;
9294
+ date_start?: string | null;
9295
+ date_end?: string | null;
9296
+ timezone?: string | null;
9297
+ reminder_task_ext_ids: string[];
9298
+ tags: components["schemas"]["FactTagResponse"][];
9299
+ created_by_ext_id: string;
9300
+ created_at: string;
9301
+ updated_at: string;
9302
+ }[]>;
9303
+ /** Pass `from`/`to`/`datedOnly` for the timeline view — dated notes only,
9304
+ * ordered by when they happened. `tagExtIds` / `docExtId` narrow the list;
9305
+ * `limit` / `offset` page it. */
9306
+ list: (options?: ListFactsOptions) => Promise<{
9307
+ text: string;
9308
+ citations?: components["schemas"]["CitationSources"] | null;
9309
+ external_id: string;
9310
+ workspace_ext_id: string;
9311
+ shared: boolean;
9312
+ confirmed: boolean;
9313
+ date_start?: string | null;
9314
+ date_end?: string | null;
9315
+ timezone?: string | null;
9316
+ reminder_task_ext_ids: string[];
9317
+ tags: components["schemas"]["FactTagResponse"][];
9318
+ created_by_ext_id: string;
9319
+ created_at: string;
9320
+ updated_at: string;
9321
+ }[]>;
9322
+ search: (body: FactSearchRequest) => Promise<{
9323
+ facts: components["schemas"]["FactSearchHit"][];
9324
+ }>;
9325
+ update: (factId: string, body: UpdateFactRequest) => Promise<{
9326
+ text: string;
9327
+ citations?: components["schemas"]["CitationSources"] | null;
9328
+ external_id: string;
9329
+ workspace_ext_id: string;
9330
+ shared: boolean;
9331
+ confirmed: boolean;
9332
+ date_start?: string | null;
9333
+ date_end?: string | null;
9334
+ timezone?: string | null;
9335
+ reminder_task_ext_ids: string[];
9336
+ tags: components["schemas"]["FactTagResponse"][];
9337
+ created_by_ext_id: string;
9338
+ created_at: string;
9339
+ updated_at: string;
9340
+ }>;
9341
+ delete: (factId: string) => Promise<void>;
9342
+ /** One-off reminder on a dated note: an explicit `remindAt`, or
9343
+ * `leadMinutes` before its date. */
9344
+ remind: (factId: string, options?: {
9345
+ remindAt?: string;
9346
+ leadMinutes?: number;
9347
+ }) => Promise<{
9348
+ text: string;
9349
+ citations?: components["schemas"]["CitationSources"] | null;
9350
+ external_id: string;
9351
+ workspace_ext_id: string;
9352
+ shared: boolean;
9353
+ confirmed: boolean;
9354
+ date_start?: string | null;
9355
+ date_end?: string | null;
9356
+ timezone?: string | null;
9357
+ reminder_task_ext_ids: string[];
9358
+ tags: components["schemas"]["FactTagResponse"][];
9359
+ created_by_ext_id: string;
9360
+ created_at: string;
9361
+ updated_at: string;
9362
+ }>;
9162
9363
  };
9163
- role: components["schemas"]["WorkspaceRole"];
9164
- joined_at: string;
9165
- conversation_count: number;
9166
- document_count: number;
9167
- files_mb: number;
9168
- agent_ext_id?: string | null | undefined;
9169
- is_temporary: boolean;
9170
- }[]>;
9171
- declare function copyDocuments(arbi: ArbiClient, targetWorkspaceId: string, docIds: string[], targetWorkspaceKey: string): Promise<{
9172
- detail: string;
9173
- documents_copied: number;
9174
- items_copied: number;
9175
- copied_by_kind: {
9176
- [x: string]: number;
9364
+ readonly sessions: {
9365
+ list: () => Promise<{
9366
+ session_id: string;
9367
+ external_id?: string | null;
9368
+ name?: string | null;
9369
+ ip_address?: string | null;
9370
+ active_workspace?: string | null;
9371
+ workspaces: string[];
9372
+ status: string;
9373
+ ttl: number;
9374
+ }[]>;
9375
+ /** The id this device's session is listed under in `list()`; `null` when unknown. */
9376
+ currentId: () => string | null;
9377
+ /** End one of your own sessions now (not the one this device is on: that is `logout`). */
9378
+ terminate: (sessionId: string) => Promise<void>;
9379
+ /** Sign out of every device on the server, then clear this instance. */
9380
+ logoutAll: () => Promise<void>;
9177
9381
  };
9178
- results: {
9179
- source_doc_ext_id: string;
9180
- success: boolean;
9181
- new_doc_ext_id?: string | null | undefined;
9182
- error?: string | null | undefined;
9183
- kind: components["schemas"]["CopyItemKind"];
9184
- warning?: string | null | undefined;
9185
- skipped: boolean;
9186
- }[];
9187
- }>;
9188
-
9189
- declare const workspaces_addWorkspaceUsers: typeof addWorkspaceUsers;
9190
- declare const workspaces_copyDocuments: typeof copyDocuments;
9191
- declare const workspaces_createWorkspace: typeof createWorkspace;
9192
- declare const workspaces_deleteWorkspaces: typeof deleteWorkspaces;
9193
- declare const workspaces_grantTemporaryWorkspaceAccess: typeof grantTemporaryWorkspaceAccess;
9194
- declare const workspaces_listWorkspaceUsers: typeof listWorkspaceUsers;
9195
- declare const workspaces_listWorkspaces: typeof listWorkspaces;
9196
- declare const workspaces_removeWorkspaceUsers: typeof removeWorkspaceUsers;
9197
- declare const workspaces_setUserRole: typeof setUserRole;
9198
- declare const workspaces_updateWorkspace: typeof updateWorkspace;
9199
- declare namespace workspaces {
9200
- export { workspaces_addWorkspaceUsers as addWorkspaceUsers, workspaces_copyDocuments as copyDocuments, workspaces_createWorkspace as createWorkspace, workspaces_deleteWorkspaces as deleteWorkspaces, workspaces_grantTemporaryWorkspaceAccess as grantTemporaryWorkspaceAccess, workspaces_listWorkspaceUsers as listWorkspaceUsers, workspaces_listWorkspaces as listWorkspaces, workspaces_removeWorkspaceUsers as removeWorkspaceUsers, workspaces_setUserRole as setUserRole, workspaces_updateWorkspace as updateWorkspace };
9382
+ private requireClient;
9383
+ private requireLogin;
9384
+ private requireWorkspace;
9201
9385
  }
9202
9386
 
9203
9387
  /**
@@ -9260,83 +9444,6 @@ declare namespace doctags {
9260
9444
  export { doctags_assignDocTags as assignDocTags, doctags_generateDocTags as generateDocTags, doctags_removeDocTags as removeDocTags, doctags_updateDocTag as updateDocTag };
9261
9445
  }
9262
9446
 
9263
- /**
9264
- * User settings operations — get, update.
9265
- */
9266
-
9267
- type UserSettingsUpdate = components['schemas']['UserSettingsUpdate'];
9268
- declare function getSettings(arbi: ArbiClient): Promise<{
9269
- [x: string]: unknown;
9270
- subscription?: {
9271
- status: string;
9272
- } | null | undefined;
9273
- last_workspace?: string | null | undefined;
9274
- last_config?: string | null | undefined;
9275
- pinned_workspaces: string[];
9276
- pinned_templates: string[];
9277
- pinned_skills: string[];
9278
- tableviews: {
9279
- workspace: string;
9280
- name: string;
9281
- columns: string[];
9282
- column_widths?: {
9283
- [x: string]: number;
9284
- } | null | undefined;
9285
- tile_size?: number | null | undefined;
9286
- row_height?: number | null | undefined;
9287
- }[];
9288
- developer: boolean;
9289
- show_document_navigator: boolean;
9290
- show_thread_visualization: boolean;
9291
- show_security_settings: boolean;
9292
- show_invite_tab: boolean;
9293
- show_help_page: boolean;
9294
- show_templates: boolean;
9295
- show_skills: boolean;
9296
- show_pa_mode: boolean;
9297
- show_conversation_search: boolean;
9298
- show_agent_sessions: boolean;
9299
- show_mcp_connectors: boolean;
9300
- show_connector_microsoft: boolean;
9301
- show_connector_sharepoint: boolean;
9302
- show_connector_google: boolean;
9303
- show_connector_imanage: boolean;
9304
- show_appearance: boolean;
9305
- show_file_explorer: boolean;
9306
- show_hints: boolean;
9307
- show_tasks: boolean;
9308
- show_agent_builder: boolean;
9309
- dismissed_tips?: string[] | undefined;
9310
- use_s3_direct_upload: boolean;
9311
- hide_online_status: boolean;
9312
- muted_users: string[];
9313
- muted_workspaces: string[];
9314
- followed_workspaces: string[];
9315
- followed_threads: string[];
9316
- email_notifications?: {
9317
- messages: boolean;
9318
- workspace_added: boolean;
9319
- workspace_access_request: boolean;
9320
- contact_accepted: boolean;
9321
- referral_reward: boolean;
9322
- product_updates: boolean;
9323
- } | undefined;
9324
- premium_model?: string | null | undefined;
9325
- retired_premium_model?: string | null | undefined;
9326
- retired_premium_model_suggestion?: string | null | undefined;
9327
- picture?: string | null | undefined;
9328
- extra_discount?: {
9329
- [x: string]: unknown;
9330
- } | null | undefined;
9331
- }>;
9332
- declare function updateSettings(arbi: ArbiClient, body: UserSettingsUpdate): Promise<void>;
9333
-
9334
- declare const settings_getSettings: typeof getSettings;
9335
- declare const settings_updateSettings: typeof updateSettings;
9336
- declare namespace settings {
9337
- export { settings_getSettings as getSettings, settings_updateSettings as updateSettings };
9338
- }
9339
-
9340
9447
  /**
9341
9448
  * Agent configuration operations — list, get, save, delete, schema, models.
9342
9449
  */