@arbidocs/sdk 0.4.101 → 0.4.103

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.
@@ -1366,6 +1366,300 @@ declare namespace documents {
1366
1366
  export { type documents_DirectUploadClient as DirectUploadClient, type documents_DirectUploadFile as DirectUploadFile, type documents_DirectUploadProgress as DirectUploadProgress, type documents_DocumentListFields as DocumentListFields, type documents_DocumentListOrder as DocumentListOrder, type documents_ListAllOptions as ListAllOptions, type documents_ListPaginatedOptions as ListPaginatedOptions, documents_MAX_PAGES as MAX_PAGES, documents_SUPPORTED_EXTENSIONS as SUPPORTED_EXTENSIONS, type documents_SkippedFile as SkippedFile, type documents_UploadBatchResult as UploadBatchResult, type documents_UploadDirectOptions as UploadDirectOptions, type documents_UploadDirectResult as UploadDirectResult, type documents_UploadOptions as UploadOptions, type documents_UploadResult as UploadResult, documents_deleteDocuments as deleteDocuments, documents_downloadDocument as downloadDocument, documents_getDocuments as getDocuments, documents_getParsedContent as getParsedContent, documents_getThumbnails as getThumbnails, documents_listAll as listAll, documents_listDocuments as listDocuments, documents_listPaginated as listPaginated, documents_listVersions as listVersions, documents_mimeFromName as mimeFromName, documents_sanitizeFolderPath as sanitizeFolderPath, documents_updateDocuments as updateDocuments, documents_uploadDocumentsDirect as uploadDocumentsDirect, uploadFile$1 as uploadFile, documents_uploadFiles as uploadFiles, documents_uploadUrl as uploadUrl };
1367
1367
  }
1368
1368
 
1369
+ /**
1370
+ * Signature requests — browser-safe functions.
1371
+ *
1372
+ * An author places fields (signature, initials, date, name) on the PDF of one document version and
1373
+ * assigns each to a workspace member; `send` notifies every signer. Signers sign in the app (or with
1374
+ * `@arbidocs/react/document-tools`'s `signSignatureRequest`): signing re-derives their key from
1375
+ * their password. The last signature saves the signed copy as the document's next version.
1376
+ */
1377
+
1378
+ type SignatureField = components['schemas']['SignatureField'];
1379
+ type SignatureRequest = components['schemas']['SignatureRequestResponse'];
1380
+ type SuggestedSignatureField = components['schemas']['SuggestedSignatureField'];
1381
+ /** Requests in the active workspace, newest first; `awaitingMe` keeps those waiting on the caller. */
1382
+ declare function listSignatureRequests(arbi: ArbiClient, awaitingMe?: boolean): Promise<{
1383
+ external_id: string;
1384
+ doc_ext_id: string | null;
1385
+ version: number;
1386
+ source_sha256: string;
1387
+ status: components["schemas"]["SignatureRequestStatus"];
1388
+ message?: string | null | undefined;
1389
+ fields: {
1390
+ id: string;
1391
+ type: "signature" | "initials" | "date" | "name";
1392
+ page: number;
1393
+ x: number;
1394
+ y: number;
1395
+ width: number;
1396
+ height: number;
1397
+ signer: string;
1398
+ required: boolean;
1399
+ }[];
1400
+ signers: {
1401
+ user_ext_id: string;
1402
+ name: string;
1403
+ email?: string | null | undefined;
1404
+ status: components["schemas"]["SignerStatus"];
1405
+ signed_at?: string | null | undefined;
1406
+ reference?: string | null | undefined;
1407
+ fields: number;
1408
+ }[];
1409
+ created_by?: string | null | undefined;
1410
+ created_at: string;
1411
+ sent_at?: string | null | undefined;
1412
+ completed_at?: string | null | undefined;
1413
+ signed_version?: number | null | undefined;
1414
+ stale: boolean;
1415
+ }[]>;
1416
+ /** A document's signature requests, newest first. */
1417
+ declare function listDocumentSignatureRequests(arbi: ArbiClient, docId: string): Promise<{
1418
+ external_id: string;
1419
+ doc_ext_id: string | null;
1420
+ version: number;
1421
+ source_sha256: string;
1422
+ status: components["schemas"]["SignatureRequestStatus"];
1423
+ message?: string | null | undefined;
1424
+ fields: {
1425
+ id: string;
1426
+ type: "signature" | "initials" | "date" | "name";
1427
+ page: number;
1428
+ x: number;
1429
+ y: number;
1430
+ width: number;
1431
+ height: number;
1432
+ signer: string;
1433
+ required: boolean;
1434
+ }[];
1435
+ signers: {
1436
+ user_ext_id: string;
1437
+ name: string;
1438
+ email?: string | null | undefined;
1439
+ status: components["schemas"]["SignerStatus"];
1440
+ signed_at?: string | null | undefined;
1441
+ reference?: string | null | undefined;
1442
+ fields: number;
1443
+ }[];
1444
+ created_by?: string | null | undefined;
1445
+ created_at: string;
1446
+ sent_at?: string | null | undefined;
1447
+ completed_at?: string | null | undefined;
1448
+ signed_version?: number | null | undefined;
1449
+ stale: boolean;
1450
+ }[]>;
1451
+ declare function getSignatureRequest(arbi: ArbiClient, requestId: string): Promise<{
1452
+ external_id: string;
1453
+ doc_ext_id: string | null;
1454
+ version: number;
1455
+ source_sha256: string;
1456
+ status: components["schemas"]["SignatureRequestStatus"];
1457
+ message?: string | null | undefined;
1458
+ fields: {
1459
+ id: string;
1460
+ type: "signature" | "initials" | "date" | "name";
1461
+ page: number;
1462
+ x: number;
1463
+ y: number;
1464
+ width: number;
1465
+ height: number;
1466
+ signer: string;
1467
+ required: boolean;
1468
+ }[];
1469
+ signers: {
1470
+ user_ext_id: string;
1471
+ name: string;
1472
+ email?: string | null | undefined;
1473
+ status: components["schemas"]["SignerStatus"];
1474
+ signed_at?: string | null | undefined;
1475
+ reference?: string | null | undefined;
1476
+ fields: number;
1477
+ }[];
1478
+ created_by?: string | null | undefined;
1479
+ created_at: string;
1480
+ sent_at?: string | null | undefined;
1481
+ completed_at?: string | null | undefined;
1482
+ signed_version?: number | null | undefined;
1483
+ stale: boolean;
1484
+ }>;
1485
+ /** Fields found in the document's signature blocks, grouped by block (`group`) with its role. */
1486
+ declare function suggestSignatureFields(arbi: ArbiClient, docId: string, version?: number): Promise<{
1487
+ type: "signature" | "initials" | "date" | "name";
1488
+ page: number;
1489
+ x: number;
1490
+ y: number;
1491
+ width: number;
1492
+ height: number;
1493
+ group: number;
1494
+ role?: string | null | undefined;
1495
+ anchor: string;
1496
+ }[]>;
1497
+ /**
1498
+ * Assign suggested blocks to signers in order: block n goes to `signers[n]` (`group` numbering).
1499
+ * Blocks beyond the list are left out.
1500
+ */
1501
+ declare function assignSuggestions(suggestions: SuggestedSignatureField[], signers: string[]): SignatureField[];
1502
+ interface CreateSignatureRequestOptions {
1503
+ fields: SignatureField[];
1504
+ version?: number;
1505
+ message?: string;
1506
+ /** Send it now (default) or keep it as a draft. */
1507
+ send?: boolean;
1508
+ }
1509
+ declare function createSignatureRequest(arbi: ArbiClient, docId: string, { fields, version, message, send }: CreateSignatureRequestOptions): Promise<{
1510
+ external_id: string;
1511
+ doc_ext_id: string | null;
1512
+ version: number;
1513
+ source_sha256: string;
1514
+ status: components["schemas"]["SignatureRequestStatus"];
1515
+ message?: string | null | undefined;
1516
+ fields: {
1517
+ id: string;
1518
+ type: "signature" | "initials" | "date" | "name";
1519
+ page: number;
1520
+ x: number;
1521
+ y: number;
1522
+ width: number;
1523
+ height: number;
1524
+ signer: string;
1525
+ required: boolean;
1526
+ }[];
1527
+ signers: {
1528
+ user_ext_id: string;
1529
+ name: string;
1530
+ email?: string | null | undefined;
1531
+ status: components["schemas"]["SignerStatus"];
1532
+ signed_at?: string | null | undefined;
1533
+ reference?: string | null | undefined;
1534
+ fields: number;
1535
+ }[];
1536
+ created_by?: string | null | undefined;
1537
+ created_at: string;
1538
+ sent_at?: string | null | undefined;
1539
+ completed_at?: string | null | undefined;
1540
+ signed_version?: number | null | undefined;
1541
+ stale: boolean;
1542
+ }>;
1543
+ declare function sendSignatureRequest(arbi: ArbiClient, requestId: string): Promise<{
1544
+ external_id: string;
1545
+ doc_ext_id: string | null;
1546
+ version: number;
1547
+ source_sha256: string;
1548
+ status: components["schemas"]["SignatureRequestStatus"];
1549
+ message?: string | null | undefined;
1550
+ fields: {
1551
+ id: string;
1552
+ type: "signature" | "initials" | "date" | "name";
1553
+ page: number;
1554
+ x: number;
1555
+ y: number;
1556
+ width: number;
1557
+ height: number;
1558
+ signer: string;
1559
+ required: boolean;
1560
+ }[];
1561
+ signers: {
1562
+ user_ext_id: string;
1563
+ name: string;
1564
+ email?: string | null | undefined;
1565
+ status: components["schemas"]["SignerStatus"];
1566
+ signed_at?: string | null | undefined;
1567
+ reference?: string | null | undefined;
1568
+ fields: number;
1569
+ }[];
1570
+ created_by?: string | null | undefined;
1571
+ created_at: string;
1572
+ sent_at?: string | null | undefined;
1573
+ completed_at?: string | null | undefined;
1574
+ signed_version?: number | null | undefined;
1575
+ stale: boolean;
1576
+ }>;
1577
+ declare function voidSignatureRequest(arbi: ArbiClient, requestId: string): Promise<{
1578
+ external_id: string;
1579
+ doc_ext_id: string | null;
1580
+ version: number;
1581
+ source_sha256: string;
1582
+ status: components["schemas"]["SignatureRequestStatus"];
1583
+ message?: string | null | undefined;
1584
+ fields: {
1585
+ id: string;
1586
+ type: "signature" | "initials" | "date" | "name";
1587
+ page: number;
1588
+ x: number;
1589
+ y: number;
1590
+ width: number;
1591
+ height: number;
1592
+ signer: string;
1593
+ required: boolean;
1594
+ }[];
1595
+ signers: {
1596
+ user_ext_id: string;
1597
+ name: string;
1598
+ email?: string | null | undefined;
1599
+ status: components["schemas"]["SignerStatus"];
1600
+ signed_at?: string | null | undefined;
1601
+ reference?: string | null | undefined;
1602
+ fields: number;
1603
+ }[];
1604
+ created_by?: string | null | undefined;
1605
+ created_at: string;
1606
+ sent_at?: string | null | undefined;
1607
+ completed_at?: string | null | undefined;
1608
+ signed_version?: number | null | undefined;
1609
+ stale: boolean;
1610
+ }>;
1611
+ declare function declineSignatureRequest(arbi: ArbiClient, requestId: string, reason?: string): Promise<{
1612
+ external_id: string;
1613
+ doc_ext_id: string | null;
1614
+ version: number;
1615
+ source_sha256: string;
1616
+ status: components["schemas"]["SignatureRequestStatus"];
1617
+ message?: string | null | undefined;
1618
+ fields: {
1619
+ id: string;
1620
+ type: "signature" | "initials" | "date" | "name";
1621
+ page: number;
1622
+ x: number;
1623
+ y: number;
1624
+ width: number;
1625
+ height: number;
1626
+ signer: string;
1627
+ required: boolean;
1628
+ }[];
1629
+ signers: {
1630
+ user_ext_id: string;
1631
+ name: string;
1632
+ email?: string | null | undefined;
1633
+ status: components["schemas"]["SignerStatus"];
1634
+ signed_at?: string | null | undefined;
1635
+ reference?: string | null | undefined;
1636
+ fields: number;
1637
+ }[];
1638
+ created_by?: string | null | undefined;
1639
+ created_at: string;
1640
+ sent_at?: string | null | undefined;
1641
+ completed_at?: string | null | undefined;
1642
+ signed_version?: number | null | undefined;
1643
+ stale: boolean;
1644
+ }>;
1645
+
1646
+ type signatureRequests_CreateSignatureRequestOptions = CreateSignatureRequestOptions;
1647
+ type signatureRequests_SignatureField = SignatureField;
1648
+ type signatureRequests_SignatureRequest = SignatureRequest;
1649
+ type signatureRequests_SuggestedSignatureField = SuggestedSignatureField;
1650
+ declare const signatureRequests_assignSuggestions: typeof assignSuggestions;
1651
+ declare const signatureRequests_createSignatureRequest: typeof createSignatureRequest;
1652
+ declare const signatureRequests_declineSignatureRequest: typeof declineSignatureRequest;
1653
+ declare const signatureRequests_getSignatureRequest: typeof getSignatureRequest;
1654
+ declare const signatureRequests_listDocumentSignatureRequests: typeof listDocumentSignatureRequests;
1655
+ declare const signatureRequests_listSignatureRequests: typeof listSignatureRequests;
1656
+ declare const signatureRequests_sendSignatureRequest: typeof sendSignatureRequest;
1657
+ declare const signatureRequests_suggestSignatureFields: typeof suggestSignatureFields;
1658
+ declare const signatureRequests_voidSignatureRequest: typeof voidSignatureRequest;
1659
+ declare namespace signatureRequests {
1660
+ export { type signatureRequests_CreateSignatureRequestOptions as CreateSignatureRequestOptions, type signatureRequests_SignatureField as SignatureField, type signatureRequests_SignatureRequest as SignatureRequest, type signatureRequests_SuggestedSignatureField as SuggestedSignatureField, signatureRequests_assignSuggestions as assignSuggestions, signatureRequests_createSignatureRequest as createSignatureRequest, signatureRequests_declineSignatureRequest as declineSignatureRequest, signatureRequests_getSignatureRequest as getSignatureRequest, signatureRequests_listDocumentSignatureRequests as listDocumentSignatureRequests, signatureRequests_listSignatureRequests as listSignatureRequests, signatureRequests_sendSignatureRequest as sendSignatureRequest, signatureRequests_suggestSignatureFields as suggestSignatureFields, signatureRequests_voidSignatureRequest as voidSignatureRequest };
1661
+ }
1662
+
1369
1663
  /**
1370
1664
  * Workspace operations — list, create, delete, update, users, copy.
1371
1665
  */
@@ -9304,6 +9598,258 @@ declare class Arbi {
9304
9598
  error?: string | null;
9305
9599
  }>;
9306
9600
  };
9601
+ /** Ask workspace members to sign a document at fields placed on it; signers sign in the app. */
9602
+ readonly signatureRequests: {
9603
+ list: (awaitingMe?: boolean) => Promise<{
9604
+ external_id: string;
9605
+ doc_ext_id: string | null;
9606
+ version: number;
9607
+ source_sha256: string;
9608
+ status: components["schemas"]["SignatureRequestStatus"];
9609
+ message?: string | null | undefined;
9610
+ fields: {
9611
+ id: string;
9612
+ type: "signature" | "initials" | "date" | "name";
9613
+ page: number;
9614
+ x: number;
9615
+ y: number;
9616
+ width: number;
9617
+ height: number;
9618
+ signer: string;
9619
+ required: boolean;
9620
+ }[];
9621
+ signers: {
9622
+ user_ext_id: string;
9623
+ name: string;
9624
+ email?: string | null | undefined;
9625
+ status: components["schemas"]["SignerStatus"];
9626
+ signed_at?: string | null | undefined;
9627
+ reference?: string | null | undefined;
9628
+ fields: number;
9629
+ }[];
9630
+ created_by?: string | null | undefined;
9631
+ created_at: string;
9632
+ sent_at?: string | null | undefined;
9633
+ completed_at?: string | null | undefined;
9634
+ signed_version?: number | null | undefined;
9635
+ stale: boolean;
9636
+ }[]>;
9637
+ forDocument: (docId: string) => Promise<{
9638
+ external_id: string;
9639
+ doc_ext_id: string | null;
9640
+ version: number;
9641
+ source_sha256: string;
9642
+ status: components["schemas"]["SignatureRequestStatus"];
9643
+ message?: string | null | undefined;
9644
+ fields: {
9645
+ id: string;
9646
+ type: "signature" | "initials" | "date" | "name";
9647
+ page: number;
9648
+ x: number;
9649
+ y: number;
9650
+ width: number;
9651
+ height: number;
9652
+ signer: string;
9653
+ required: boolean;
9654
+ }[];
9655
+ signers: {
9656
+ user_ext_id: string;
9657
+ name: string;
9658
+ email?: string | null | undefined;
9659
+ status: components["schemas"]["SignerStatus"];
9660
+ signed_at?: string | null | undefined;
9661
+ reference?: string | null | undefined;
9662
+ fields: number;
9663
+ }[];
9664
+ created_by?: string | null | undefined;
9665
+ created_at: string;
9666
+ sent_at?: string | null | undefined;
9667
+ completed_at?: string | null | undefined;
9668
+ signed_version?: number | null | undefined;
9669
+ stale: boolean;
9670
+ }[]>;
9671
+ get: (requestId: string) => Promise<{
9672
+ external_id: string;
9673
+ doc_ext_id: string | null;
9674
+ version: number;
9675
+ source_sha256: string;
9676
+ status: components["schemas"]["SignatureRequestStatus"];
9677
+ message?: string | null | undefined;
9678
+ fields: {
9679
+ id: string;
9680
+ type: "signature" | "initials" | "date" | "name";
9681
+ page: number;
9682
+ x: number;
9683
+ y: number;
9684
+ width: number;
9685
+ height: number;
9686
+ signer: string;
9687
+ required: boolean;
9688
+ }[];
9689
+ signers: {
9690
+ user_ext_id: string;
9691
+ name: string;
9692
+ email?: string | null | undefined;
9693
+ status: components["schemas"]["SignerStatus"];
9694
+ signed_at?: string | null | undefined;
9695
+ reference?: string | null | undefined;
9696
+ fields: number;
9697
+ }[];
9698
+ created_by?: string | null | undefined;
9699
+ created_at: string;
9700
+ sent_at?: string | null | undefined;
9701
+ completed_at?: string | null | undefined;
9702
+ signed_version?: number | null | undefined;
9703
+ stale: boolean;
9704
+ }>;
9705
+ suggest: (docId: string, version?: number) => Promise<{
9706
+ type: "signature" | "initials" | "date" | "name";
9707
+ page: number;
9708
+ x: number;
9709
+ y: number;
9710
+ width: number;
9711
+ height: number;
9712
+ group: number;
9713
+ role?: string | null | undefined;
9714
+ anchor: string;
9715
+ }[]>;
9716
+ create: (docId: string, options: CreateSignatureRequestOptions) => Promise<{
9717
+ external_id: string;
9718
+ doc_ext_id: string | null;
9719
+ version: number;
9720
+ source_sha256: string;
9721
+ status: components["schemas"]["SignatureRequestStatus"];
9722
+ message?: string | null | undefined;
9723
+ fields: {
9724
+ id: string;
9725
+ type: "signature" | "initials" | "date" | "name";
9726
+ page: number;
9727
+ x: number;
9728
+ y: number;
9729
+ width: number;
9730
+ height: number;
9731
+ signer: string;
9732
+ required: boolean;
9733
+ }[];
9734
+ signers: {
9735
+ user_ext_id: string;
9736
+ name: string;
9737
+ email?: string | null | undefined;
9738
+ status: components["schemas"]["SignerStatus"];
9739
+ signed_at?: string | null | undefined;
9740
+ reference?: string | null | undefined;
9741
+ fields: number;
9742
+ }[];
9743
+ created_by?: string | null | undefined;
9744
+ created_at: string;
9745
+ sent_at?: string | null | undefined;
9746
+ completed_at?: string | null | undefined;
9747
+ signed_version?: number | null | undefined;
9748
+ stale: boolean;
9749
+ }>;
9750
+ send: (requestId: string) => Promise<{
9751
+ external_id: string;
9752
+ doc_ext_id: string | null;
9753
+ version: number;
9754
+ source_sha256: string;
9755
+ status: components["schemas"]["SignatureRequestStatus"];
9756
+ message?: string | null | undefined;
9757
+ fields: {
9758
+ id: string;
9759
+ type: "signature" | "initials" | "date" | "name";
9760
+ page: number;
9761
+ x: number;
9762
+ y: number;
9763
+ width: number;
9764
+ height: number;
9765
+ signer: string;
9766
+ required: boolean;
9767
+ }[];
9768
+ signers: {
9769
+ user_ext_id: string;
9770
+ name: string;
9771
+ email?: string | null | undefined;
9772
+ status: components["schemas"]["SignerStatus"];
9773
+ signed_at?: string | null | undefined;
9774
+ reference?: string | null | undefined;
9775
+ fields: number;
9776
+ }[];
9777
+ created_by?: string | null | undefined;
9778
+ created_at: string;
9779
+ sent_at?: string | null | undefined;
9780
+ completed_at?: string | null | undefined;
9781
+ signed_version?: number | null | undefined;
9782
+ stale: boolean;
9783
+ }>;
9784
+ void: (requestId: string) => Promise<{
9785
+ external_id: string;
9786
+ doc_ext_id: string | null;
9787
+ version: number;
9788
+ source_sha256: string;
9789
+ status: components["schemas"]["SignatureRequestStatus"];
9790
+ message?: string | null | undefined;
9791
+ fields: {
9792
+ id: string;
9793
+ type: "signature" | "initials" | "date" | "name";
9794
+ page: number;
9795
+ x: number;
9796
+ y: number;
9797
+ width: number;
9798
+ height: number;
9799
+ signer: string;
9800
+ required: boolean;
9801
+ }[];
9802
+ signers: {
9803
+ user_ext_id: string;
9804
+ name: string;
9805
+ email?: string | null | undefined;
9806
+ status: components["schemas"]["SignerStatus"];
9807
+ signed_at?: string | null | undefined;
9808
+ reference?: string | null | undefined;
9809
+ fields: number;
9810
+ }[];
9811
+ created_by?: string | null | undefined;
9812
+ created_at: string;
9813
+ sent_at?: string | null | undefined;
9814
+ completed_at?: string | null | undefined;
9815
+ signed_version?: number | null | undefined;
9816
+ stale: boolean;
9817
+ }>;
9818
+ decline: (requestId: string, reason?: string) => Promise<{
9819
+ external_id: string;
9820
+ doc_ext_id: string | null;
9821
+ version: number;
9822
+ source_sha256: string;
9823
+ status: components["schemas"]["SignatureRequestStatus"];
9824
+ message?: string | null | undefined;
9825
+ fields: {
9826
+ id: string;
9827
+ type: "signature" | "initials" | "date" | "name";
9828
+ page: number;
9829
+ x: number;
9830
+ y: number;
9831
+ width: number;
9832
+ height: number;
9833
+ signer: string;
9834
+ required: boolean;
9835
+ }[];
9836
+ signers: {
9837
+ user_ext_id: string;
9838
+ name: string;
9839
+ email?: string | null | undefined;
9840
+ status: components["schemas"]["SignerStatus"];
9841
+ signed_at?: string | null | undefined;
9842
+ reference?: string | null | undefined;
9843
+ fields: number;
9844
+ }[];
9845
+ created_by?: string | null | undefined;
9846
+ created_at: string;
9847
+ sent_at?: string | null | undefined;
9848
+ completed_at?: string | null | undefined;
9849
+ signed_version?: number | null | undefined;
9850
+ stale: boolean;
9851
+ }>;
9852
+ };
9307
9853
  readonly facts: {
9308
9854
  create: (body: CreateFactRequest) => Promise<{
9309
9855
  text: string;
@@ -10110,4 +10656,4 @@ declare namespace identity {
10110
10656
  export { type identity_IdentityErrorCode as IdentityErrorCode, type identity_IdentityPurchase as IdentityPurchase, type identity_IdentityState as IdentityState, type identity_IdentityStatus as IdentityStatus, identity_acceptName as acceptName, identity_getStatus as getStatus, identity_identityErrorCode as identityErrorCode, identity_purchase as purchase, identity_refresh as refresh, identity_remove as remove, identity_startSession as startSession };
10111
10657
  }
10112
10658
 
10113
- export { type ListPaginatedOptions as $, type ActivityKind as A, type CreateWorkflowRequest as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type DecryptedDmNotification as E, type DeferredInterjectionEvent as F, type DmAttachmentFile as G, type DmAttachmentInput as H, type DmCryptoContext as I, type DocNameMap as J, type DocumentAutomationAction as K, type DocumentListFields as L, type DocumentListOrder as M, type DocumentSelector as N, type DocumentWaiter as O, type DocumentWaiterOptions as P, type FactResponse as Q, type FactSearchRequest as R, type FactSearchResponse as S, type FormattedWsMessage as T, type IdentityErrorCode as U, type IdentityPurchase as V, type IdentityState as W, type IdentityStatus as X, type LinkedRun as Y, type ListAllOptions as Z, type ListFactsOptions as _, type ActivityResponse as a, type TagKindSchema as a$, type MailAttachment as a0, type MessageLevel as a1, type MessageMetadataPayload$1 as a2, type MessageQueuedEvent as a3, type OutputTokensDetails as a4, type ParsedSlashCommand as a5, type PendingAuthResponse as a6, PlanStepsError as a7, type PlanWorkRequest as a8, type ProbeAnswerEvent as a9, type RunWaitingOn as aA, type SSEEvent as aB, type SSEStreamCallbacks as aC, type SSEStreamResult as aD, type SSEStreamStartData as aE, STEP_FIELD_OPTION_TONES as aF, SUPPORTED_EXTENSIONS as aG, type SendBack as aH, type SkillSummary as aI, type SkippedFile as aJ, type StepActionRequest as aK, type StepActivityEvent as aL, type StepAssignee as aM, type StepField as aN, type StepFieldOption as aO, type StepFieldOptionTone as aP, type StepKind as aQ, type StepPhase as aR, type StepSignal as aS, type StepSignalWhen as aT, type StepState as aU, type StepStatus as aV, type SubmitBackgroundQueryOptions as aW, type TagChange as aX, type TagFieldDefinition as aY, type TagKind as aZ, type TagKindField as a_, type ProjectBudget as aa, type ProjectConversationUsageResponse as ab, type ProjectDetails as ac, type ProjectEventKind as ad, type ProjectEventResponse as ae, type ProjectInvoicesResponse as af, type ProjectResponse as ag, type ProjectUpdateRequest as ah, type ProjectUsageResponse as ai, type QueryOptions as aj, type RaisedSignal as ak, type ReconnectOptions as al, type ReconnectableWsConnection as am, type ResolvedCitation as an, type ResolvedRecipient as ao, type ResponseCompletedEvent as ap, type ResponseContentPartAddedEvent as aq, type ResponseCreatedEvent as ar, type ResponseFailedEvent as as, type ResponseOutputItemAddedEvent as at, type ResponseOutputItemDoneEvent as au, type ResponseOutputTextDeltaEvent as av, type ResponseOutputTextDoneEvent as aw, type ResponseUsage as ax, type RunProgress as ay, type RunStep as az, type AgentControlStateEvent as b, health as b$, type TagLinks as b0, type TagListQuery as b1, type TagResponse as b2, type TaskPlan as b3, type TaskPlanStep as b4, type TokenBudgetContext as b5, type UpdateConversationRequest as b6, type UpdateFactRequest as b7, type UpdateWorkflowRequest as b8, type UploadBatchResult as b9, buildRetrievalTocTool as bA, connectWebSocket as bB, connectWithReconnect as bC, consumeSSEStream as bD, contacts as bE, conversations as bF, countCitations as bG, createAuthenticatedClient as bH, createDocumentWaiter as bI, dm as bJ, doctags as bK, documents as bL, facts as bM, files as bN, filterSkills as bO, formatAgentStepLabel as bP, formatFileSize as bQ, formatItemLabel as bR, formatStreamSummary as bS, formatUserName as bT, formatWorkspaceChoices as bU, formatWsMessage as bV, generateEncryptedWorkspaceKey as bW, generateNewWorkspaceKey as bX, getErrorCode as bY, getErrorMessage as bZ, getRawWorkspaceKey as b_, type UploadDirectOptions as ba, type UploadDirectResult as bb, type UploadOptions as bc, type UploadResult as bd, type UsageBreakdown as be, type UserDailyUsageResponse as bf, type UserInfo as bg, type UserInputRequestEvent as bh, type UserMessageEvent as bi, WebSocketAuthError as bj, type WorkStatus as bk, type WorkflowAuthMode as bl, type WorkflowResponse as bm, type WorkflowRunHistoryResponse as bn, type WorkflowRunResponse as bo, type WorkspaceContext as bp, type WsConnection as bq, account as br, agentconfig as bs, agents as bt, assistant as bu, authenticatedFetch as bv, buildDocNameMap as bw, buildFactsContextTool as bx, buildRetrievalChunkTool as by, buildRetrievalFullContextTool as bz, type AgentStepDeltaEvent as c, identity as c0, identityErrorCode as c1, mail as c2, parseSSEEvents as c3, parseSlashCommand as c4, parseSlashTokenInProgress as c5, performPasswordLogin as c6, performSigningKeyLogin as c7, performSsoDeviceFlowLogin as c8, profile as c9, projects as ca, requireData as cb, requireOk as cc, resolveAuth as cd, resolveCitations as ce, resolveWorkspace as cf, responses as cg, selectWorkspace as ch, selectWorkspaceById as ci, sessions as cj, settings as ck, streamSSE as cl, stripCitationMarkdown as cm, summarizeCitations as cn, tags as co, work as cp, workflowSteps as cq, workflows as cr, workspaces as cs, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiOptions as i, ArbiSessionExpiredError as j, type ArtifactEvent as k, type AuthContext as l, type AuthHeaders as m, type AuthMode as n, type AuthenticatedClient as o, type CitationSummary as p, type CliConfig as q, type CliCredentials as r, type CommandDescriptor as s, type ConfigStore as t, type ConnectOptions as u, type ConversationResponse as v, type ConversationUsageResponse as w, type CreateFactRequest as x, type CreateFactsRequest as y, type CreateWorkRequest as z };
10659
+ export { type ListPaginatedOptions as $, type ActivityKind as A, type CreateWorkflowRequest as B, type ChatSession as C, DOC_TERMINAL_STATUSES as D, type DecryptedDmNotification as E, type DeferredInterjectionEvent as F, type DmAttachmentFile as G, type DmAttachmentInput as H, type DmCryptoContext as I, type DocNameMap as J, type DocumentAutomationAction as K, type DocumentListFields as L, type DocumentListOrder as M, type DocumentSelector as N, type DocumentWaiter as O, type DocumentWaiterOptions as P, type FactResponse as Q, type FactSearchRequest as R, type FactSearchResponse as S, type FormattedWsMessage as T, type IdentityErrorCode as U, type IdentityPurchase as V, type IdentityState as W, type IdentityStatus as X, type LinkedRun as Y, type ListAllOptions as Z, type ListFactsOptions as _, type ActivityResponse as a, type TagKindSchema as a$, type MailAttachment as a0, type MessageLevel as a1, type MessageMetadataPayload$1 as a2, type MessageQueuedEvent as a3, type OutputTokensDetails as a4, type ParsedSlashCommand as a5, type PendingAuthResponse as a6, PlanStepsError as a7, type PlanWorkRequest as a8, type ProbeAnswerEvent as a9, type RunWaitingOn as aA, type SSEEvent as aB, type SSEStreamCallbacks as aC, type SSEStreamResult as aD, type SSEStreamStartData as aE, STEP_FIELD_OPTION_TONES as aF, SUPPORTED_EXTENSIONS as aG, type SendBack as aH, type SkillSummary as aI, type SkippedFile as aJ, type StepActionRequest as aK, type StepActivityEvent as aL, type StepAssignee as aM, type StepField as aN, type StepFieldOption as aO, type StepFieldOptionTone as aP, type StepKind as aQ, type StepPhase as aR, type StepSignal as aS, type StepSignalWhen as aT, type StepState as aU, type StepStatus as aV, type SubmitBackgroundQueryOptions as aW, type TagChange as aX, type TagFieldDefinition as aY, type TagKind as aZ, type TagKindField as a_, type ProjectBudget as aa, type ProjectConversationUsageResponse as ab, type ProjectDetails as ac, type ProjectEventKind as ad, type ProjectEventResponse as ae, type ProjectInvoicesResponse as af, type ProjectResponse as ag, type ProjectUpdateRequest as ah, type ProjectUsageResponse as ai, type QueryOptions as aj, type RaisedSignal as ak, type ReconnectOptions as al, type ReconnectableWsConnection as am, type ResolvedCitation as an, type ResolvedRecipient as ao, type ResponseCompletedEvent as ap, type ResponseContentPartAddedEvent as aq, type ResponseCreatedEvent as ar, type ResponseFailedEvent as as, type ResponseOutputItemAddedEvent as at, type ResponseOutputItemDoneEvent as au, type ResponseOutputTextDeltaEvent as av, type ResponseOutputTextDoneEvent as aw, type ResponseUsage as ax, type RunProgress as ay, type RunStep as az, type AgentControlStateEvent as b, health as b$, type TagLinks as b0, type TagListQuery as b1, type TagResponse as b2, type TaskPlan as b3, type TaskPlanStep as b4, type TokenBudgetContext as b5, type UpdateConversationRequest as b6, type UpdateFactRequest as b7, type UpdateWorkflowRequest as b8, type UploadBatchResult as b9, buildRetrievalTocTool as bA, connectWebSocket as bB, connectWithReconnect as bC, consumeSSEStream as bD, contacts as bE, conversations as bF, countCitations as bG, createAuthenticatedClient as bH, createDocumentWaiter as bI, dm as bJ, doctags as bK, documents as bL, facts as bM, files as bN, filterSkills as bO, formatAgentStepLabel as bP, formatFileSize as bQ, formatItemLabel as bR, formatStreamSummary as bS, formatUserName as bT, formatWorkspaceChoices as bU, formatWsMessage as bV, generateEncryptedWorkspaceKey as bW, generateNewWorkspaceKey as bX, getErrorCode as bY, getErrorMessage as bZ, getRawWorkspaceKey as b_, type UploadDirectOptions as ba, type UploadDirectResult as bb, type UploadOptions as bc, type UploadResult as bd, type UsageBreakdown as be, type UserDailyUsageResponse as bf, type UserInfo as bg, type UserInputRequestEvent as bh, type UserMessageEvent as bi, WebSocketAuthError as bj, type WorkStatus as bk, type WorkflowAuthMode as bl, type WorkflowResponse as bm, type WorkflowRunHistoryResponse as bn, type WorkflowRunResponse as bo, type WorkspaceContext as bp, type WsConnection as bq, account as br, agentconfig as bs, agents as bt, assistant as bu, authenticatedFetch as bv, buildDocNameMap as bw, buildFactsContextTool as bx, buildRetrievalChunkTool as by, buildRetrievalFullContextTool as bz, type AgentStepDeltaEvent as c, identity as c0, identityErrorCode as c1, mail as c2, parseSSEEvents as c3, parseSlashCommand as c4, parseSlashTokenInProgress as c5, performPasswordLogin as c6, performSigningKeyLogin as c7, performSsoDeviceFlowLogin as c8, profile as c9, projects as ca, requireData as cb, requireOk as cc, resolveAuth as cd, resolveCitations as ce, resolveWorkspace as cf, responses as cg, selectWorkspace as ch, selectWorkspaceById as ci, sessions as cj, settings as ck, signatureRequests as cl, streamSSE as cm, stripCitationMarkdown as cn, summarizeCitations as co, tags as cp, work as cq, workflowSteps as cr, workflows as cs, workspaces as ct, type AgentStepEvent as d, Arbi as e, ArbiApiError as f, ArbiError as g, type ArbiErrorEvent as h, type ArbiOptions as i, ArbiSessionExpiredError as j, type ArtifactEvent as k, type AuthContext as l, type AuthHeaders as m, type AuthMode as n, type AuthenticatedClient as o, type CitationSummary as p, type CliConfig as q, type CliCredentials as r, type CommandDescriptor as s, type ConfigStore as t, type ConnectOptions as u, type ConversationResponse as v, type ConversationUsageResponse as w, type CreateFactRequest as x, type CreateFactsRequest as y, type CreateWorkRequest as z };
package/dist/browser.cjs CHANGED
@@ -4737,6 +4737,75 @@ async function uploadDocumentsDirect(arbi, workspaceKey, files, options) {
4737
4737
  };
4738
4738
  }
4739
4739
 
4740
+ // src/operations/signature-requests.ts
4741
+ async function listSignatureRequests(arbi, awaitingMe = false) {
4742
+ return requireData(
4743
+ await arbi.fetch.GET("/v1/signature-requests", {
4744
+ params: { query: { awaiting_me: awaitingMe } }
4745
+ }),
4746
+ "Failed to list signature requests"
4747
+ );
4748
+ }
4749
+ async function listDocumentSignatureRequests(arbi, docId) {
4750
+ return requireData(
4751
+ await arbi.fetch.GET("/v1/document/{document_ext_id}/signature-requests", {
4752
+ params: { path: { document_ext_id: docId } }
4753
+ }),
4754
+ "Failed to list the document\u2019s signature requests"
4755
+ );
4756
+ }
4757
+ async function getSignatureRequest(arbi, requestId) {
4758
+ return requireData(
4759
+ await arbi.fetch.GET("/v1/signature-requests/{request_ext_id}", {
4760
+ params: { path: { request_ext_id: requestId } }
4761
+ }),
4762
+ "Failed to fetch the signature request"
4763
+ );
4764
+ }
4765
+ async function suggestSignatureFields(arbi, docId, version) {
4766
+ const data = requireData(
4767
+ await arbi.fetch.GET("/v1/document/{document_ext_id}/signature-fields/suggest", {
4768
+ params: { path: { document_ext_id: docId }, ...version ? { query: { version } } : {} }
4769
+ }),
4770
+ "Failed to find signature blocks"
4771
+ );
4772
+ return data.fields;
4773
+ }
4774
+ async function createSignatureRequest(arbi, docId, { fields, version, message, send = true }) {
4775
+ return requireData(
4776
+ await arbi.fetch.POST("/v1/document/{document_ext_id}/signature-requests", {
4777
+ params: { path: { document_ext_id: docId } },
4778
+ body: { fields, send, message: message ?? null, ...version ? { version } : {} }
4779
+ }),
4780
+ "Failed to create the signature request"
4781
+ );
4782
+ }
4783
+ async function sendSignatureRequest(arbi, requestId) {
4784
+ return requireData(
4785
+ await arbi.fetch.POST("/v1/signature-requests/{request_ext_id}/send", {
4786
+ params: { path: { request_ext_id: requestId } }
4787
+ }),
4788
+ "Failed to send the signature request"
4789
+ );
4790
+ }
4791
+ async function voidSignatureRequest(arbi, requestId) {
4792
+ return requireData(
4793
+ await arbi.fetch.POST("/v1/signature-requests/{request_ext_id}/void", {
4794
+ params: { path: { request_ext_id: requestId } }
4795
+ }),
4796
+ "Failed to void the signature request"
4797
+ );
4798
+ }
4799
+ async function declineSignatureRequest(arbi, requestId, reason) {
4800
+ return requireData(
4801
+ await arbi.fetch.POST("/v1/signature-requests/{request_ext_id}/decline", {
4802
+ params: { path: { request_ext_id: requestId } },
4803
+ body: { reason: reason ?? null }
4804
+ }),
4805
+ "Failed to decline the signature request"
4806
+ );
4807
+ }
4808
+
4740
4809
  // src/operations/workspaces.ts
4741
4810
  var workspaces_exports = {};
4742
4811
  __export(workspaces_exports, {
@@ -8254,6 +8323,18 @@ var Arbi = class {
8254
8323
  /** Fire a workflow now, as a test run. Resolves with the conversation it created and whether it started. */
8255
8324
  run: (workflowId) => runWorkflow(this.requireClient(), workflowId)
8256
8325
  };
8326
+ // ── Signature requests ──────────────────────────────────────────────
8327
+ /** Ask workspace members to sign a document at fields placed on it; signers sign in the app. */
8328
+ signatureRequests = {
8329
+ list: (awaitingMe = false) => listSignatureRequests(this.requireClient(), awaitingMe),
8330
+ forDocument: (docId) => listDocumentSignatureRequests(this.requireClient(), docId),
8331
+ get: (requestId) => getSignatureRequest(this.requireClient(), requestId),
8332
+ suggest: (docId, version) => suggestSignatureFields(this.requireClient(), docId, version),
8333
+ create: (docId, options) => createSignatureRequest(this.requireClient(), docId, options),
8334
+ send: (requestId) => sendSignatureRequest(this.requireClient(), requestId),
8335
+ void: (requestId) => voidSignatureRequest(this.requireClient(), requestId),
8336
+ decline: (requestId, reason) => declineSignatureRequest(this.requireClient(), requestId, reason)
8337
+ };
8257
8338
  // ── Workspace facts ─────────────────────────────────────────────────
8258
8339
  facts = {
8259
8340
  create: (body) => createFact(this.requireClient(), body),