@arbidocs/client 0.4.69 → 0.4.70

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.
Files changed (3) hide show
  1. package/dist/index.d.cts +231 -112
  2. package/dist/index.d.ts +231 -112
  3. package/package.json +1 -1
package/dist/index.d.cts CHANGED
@@ -1758,89 +1758,115 @@ interface paths {
1758
1758
  patch?: never;
1759
1759
  trace?: never;
1760
1760
  };
1761
- '/v1/document/{document_ext_id}/sign/prepare': {
1761
+ '/v1/document/{document_ext_id}/markup': {
1762
1762
  parameters: {
1763
1763
  query?: never;
1764
1764
  header?: never;
1765
1765
  path?: never;
1766
1766
  cookie?: never;
1767
1767
  };
1768
- get?: never;
1769
- put?: never;
1770
1768
  /**
1771
- * Prepare Document Signature
1772
- * @description Return the exact statement the signer's key must sign, and the hash of the PDF they are shown.
1769
+ * Get Document Markup
1770
+ * @description The version's marks and their revision (0 = no markup yet). Anyone who can see the document
1771
+ * can read them; ``can_edit`` says whether the caller may save.
1773
1772
  */
1774
- post: operations['prepare_document_signature'];
1773
+ get: operations['get_document_markup'];
1774
+ /**
1775
+ * Save Document Markup
1776
+ * @description Save the version's whole layer, overwriting its markup in place.
1777
+ *
1778
+ * Optimistic concurrency: the save must name the revision it started from (``If-Match`` or
1779
+ * ``base_revision``). When someone saved in between, nothing is written and the 409 carries the
1780
+ * latest revision: the client re-reads it, merges by annotation id and saves again.
1781
+ */
1782
+ put: operations['save_document_markup'];
1783
+ post?: never;
1775
1784
  delete?: never;
1776
1785
  options?: never;
1777
1786
  head?: never;
1778
1787
  patch?: never;
1779
1788
  trace?: never;
1780
1789
  };
1781
- '/v1/document/{document_ext_id}/sign': {
1790
+ '/v1/document/{document_ext_id}/markup/pdf': {
1782
1791
  parameters: {
1783
1792
  query?: never;
1784
1793
  header?: never;
1785
1794
  path?: never;
1786
1795
  cookie?: never;
1787
1796
  };
1788
- get?: never;
1789
- put?: never;
1790
1797
  /**
1791
- * Sign Document
1792
- * @description Sign a document: verify the signer's statement, seal a signed copy, save it as the document's next
1793
- * version (reason ``signed``; the document keeps its id).
1798
+ * Download Document Markup
1799
+ * @description "Download with markup": the version's PDF with its annotations as native PDF annotations
1800
+ * (Acrobat, Preview and other viewers show them). The plain download serves the original.
1794
1801
  */
1795
- post: operations['sign_document'];
1802
+ get: operations['download_document_markup'];
1803
+ put?: never;
1804
+ post?: never;
1796
1805
  delete?: never;
1797
1806
  options?: never;
1798
1807
  head?: never;
1799
1808
  patch?: never;
1800
1809
  trace?: never;
1801
1810
  };
1802
- '/v1/document/{document_ext_id}/signatures': {
1811
+ '/v1/document/{document_ext_id}/sign/prepare': {
1803
1812
  parameters: {
1804
1813
  query?: never;
1805
1814
  header?: never;
1806
1815
  path?: never;
1807
1816
  cookie?: never;
1808
1817
  };
1818
+ get?: never;
1819
+ put?: never;
1809
1820
  /**
1810
- * Get Document Signature Status
1811
- * @description Is this document version a signed copy, and is it unchanged since signing? Read from the PDF itself.
1821
+ * Prepare Document Signature
1822
+ * @description Return the exact statement the signer's key must sign, and the hash of the PDF they are shown.
1823
+ *
1824
+ * ``appearance`` and ``include_date`` are part of the statement: send the same ones to ``/sign``.
1812
1825
  */
1813
- get: operations['get_document_signature_status'];
1814
- put?: never;
1815
- post?: never;
1826
+ post: operations['prepare_document_signature'];
1816
1827
  delete?: never;
1817
1828
  options?: never;
1818
1829
  head?: never;
1819
1830
  patch?: never;
1820
1831
  trace?: never;
1821
1832
  };
1822
- '/v1/document/{document_ext_id}/markup': {
1833
+ '/v1/document/{document_ext_id}/sign': {
1823
1834
  parameters: {
1824
1835
  query?: never;
1825
1836
  header?: never;
1826
1837
  path?: never;
1827
1838
  cookie?: never;
1828
1839
  };
1840
+ get?: never;
1841
+ put?: never;
1829
1842
  /**
1830
- * Get Document Markup
1831
- * @description The version's marks and their revision (0 = no markup yet). Anyone who can see the document
1832
- * can read them; ``can_edit`` says whether the caller may save.
1843
+ * Sign Document
1844
+ * @description Sign a document: verify the signer's statement, seal a signed copy, save it as the document's next
1845
+ * version (reason ``signed``; the document keeps its id) and record the evidence under the signing's
1846
+ * reference, whose public certificate the signature links to.
1833
1847
  */
1834
- get: operations['get_document_markup'];
1848
+ post: operations['sign_document'];
1849
+ delete?: never;
1850
+ options?: never;
1851
+ head?: never;
1852
+ patch?: never;
1853
+ trace?: never;
1854
+ };
1855
+ '/v1/document/{document_ext_id}/signatures': {
1856
+ parameters: {
1857
+ query?: never;
1858
+ header?: never;
1859
+ path?: never;
1860
+ cookie?: never;
1861
+ };
1835
1862
  /**
1836
- * Save Document Markup
1837
- * @description Save the version's whole layer, overwriting its markup in place.
1838
- *
1839
- * Optimistic concurrency: the save must name the revision it started from (``If-Match`` or
1840
- * ``base_revision``). When someone saved in between, nothing is written and the 409 carries the
1841
- * latest revision: the client re-reads it, merges by annotation id and saves again.
1863
+ * Get Document Signature Status
1864
+ * @description Is this document version a signed copy, and is it unchanged since signing? The seals are checked
1865
+ * on the stored PDF itself (a signed PDF changed outside ARBI and uploaded again shows as not intact);
1866
+ * who signed comes from the signing records the seals name.
1842
1867
  */
1843
- put: operations['save_document_markup'];
1868
+ get: operations['get_document_signature_status'];
1869
+ put?: never;
1844
1870
  post?: never;
1845
1871
  delete?: never;
1846
1872
  options?: never;
@@ -1848,7 +1874,7 @@ interface paths {
1848
1874
  patch?: never;
1849
1875
  trace?: never;
1850
1876
  };
1851
- '/v1/document/{document_ext_id}/markup/pdf': {
1877
+ '/v1/sign/verify/{reference}': {
1852
1878
  parameters: {
1853
1879
  query?: never;
1854
1880
  header?: never;
@@ -1856,11 +1882,12 @@ interface paths {
1856
1882
  cookie?: never;
1857
1883
  };
1858
1884
  /**
1859
- * Download Document Markup
1860
- * @description "Download with markup": the version's PDF with its annotations as native PDF annotations
1861
- * (Acrobat, Preview and other viewers show them). The plain download serves the original.
1885
+ * Verify Signature
1886
+ * @description The public certificate of a signing (no login): who signed, when, the SHA-256 of each signed
1887
+ * revision and whether its seal verified. ``reference`` is the one the signature links to; 404 if
1888
+ * there is no such signing. Never exposes email, document content or ids.
1862
1889
  */
1863
- get: operations['download_document_markup'];
1890
+ get: operations['verify_signature'];
1864
1891
  put?: never;
1865
1892
  post?: never;
1866
1893
  delete?: never;
@@ -10725,6 +10752,12 @@ interface components {
10725
10752
  signer: components['schemas']['SignerDetails'];
10726
10753
  /** @description Omit for the bottom of the last page */
10727
10754
  appearance?: components['schemas']['SignatureAppearance'] | null;
10755
+ /**
10756
+ * Include Date
10757
+ * @description Show the signing date under the signature. Must match the sign request.
10758
+ * @default false
10759
+ */
10760
+ include_date: boolean;
10728
10761
  };
10729
10762
  /** PrepareSignatureResponse */
10730
10763
  PrepareSignatureResponse: {
@@ -12712,6 +12745,12 @@ interface components {
12712
12745
  signer: components['schemas']['SignerDetails'];
12713
12746
  /** @description Omit for the bottom of the last page */
12714
12747
  appearance?: components['schemas']['SignatureAppearance'] | null;
12748
+ /**
12749
+ * Include Date
12750
+ * @description Show the signing date under the signature. Must match the prepare request.
12751
+ * @default false
12752
+ */
12753
+ include_date: boolean;
12715
12754
  /** Timestamp */
12716
12755
  timestamp: number;
12717
12756
  /**
@@ -12797,21 +12836,16 @@ interface components {
12797
12836
  */
12798
12837
  signer_name?: string | null;
12799
12838
  /**
12800
- * Capacity
12801
- * @description The signer's role, e.g. 'Partner'
12839
+ * Certificate Url
12840
+ * @description The public certificate page of this signing
12802
12841
  */
12803
- capacity?: string | null;
12804
- /**
12805
- * On Behalf Of
12806
- * @description Who the signer signed for, e.g. a firm
12807
- */
12808
- on_behalf_of?: string | null;
12842
+ certificate_url: string;
12809
12843
  };
12810
12844
  /** SignatureStatusResponse */
12811
12845
  SignatureStatusResponse: {
12812
12846
  /**
12813
12847
  * Signed
12814
- * @description This document is a PDF signed and sealed by ARBI
12848
+ * @description This document version is a PDF signed and sealed by ARBI
12815
12849
  */
12816
12850
  signed: boolean;
12817
12851
  /**
@@ -12825,26 +12859,45 @@ interface components {
12825
12859
  * @default false
12826
12860
  */
12827
12861
  timestamped: boolean;
12862
+ /**
12863
+ * Certificate Url
12864
+ * @description The public certificate of this version (its latest signing)
12865
+ */
12866
+ certificate_url?: string | null;
12828
12867
  /**
12829
12868
  * Signatures
12830
12869
  * @default []
12831
12870
  */
12832
12871
  signatures: components['schemas']['SignatureRecord'][];
12833
12872
  };
12834
- /** SignerDetails */
12835
- SignerDetails: {
12836
- /** Name */
12837
- name: string;
12873
+ /**
12874
+ * SignatureVerification
12875
+ * @description The public certificate of a signing: no email, document content or ids.
12876
+ */
12877
+ SignatureVerification: {
12878
+ /**
12879
+ * Signatures
12880
+ * @description Every signing in this version, oldest first
12881
+ */
12882
+ signatures: components['schemas']['VerifiedSignature'][];
12883
+ /**
12884
+ * Document Sha256
12885
+ * @description SHA-256 of the signed PDF this reference points to
12886
+ */
12887
+ document_sha256: string;
12838
12888
  /**
12839
- * Capacity
12840
- * @description e.g. 'Partner', 'Solicitor'
12889
+ * Intact
12890
+ * @description Every seal in that PDF verified
12841
12891
  */
12842
- capacity?: string | null;
12892
+ intact: boolean;
12893
+ };
12894
+ /** SignerDetails */
12895
+ SignerDetails: {
12843
12896
  /**
12844
- * On Behalf Of
12845
- * @description e.g. the firm's name
12897
+ * Name
12898
+ * @description Rendered as the signature
12846
12899
  */
12847
- on_behalf_of?: string | null;
12900
+ name: string;
12848
12901
  };
12849
12902
  /**
12850
12903
  * SkillSummaryResponse
@@ -14559,6 +14612,34 @@ interface components {
14559
14612
  * @enum {string}
14560
14613
  */
14561
14614
  VendorKey: 'microsoft' | 'microsoft_sharepoint' | 'gdrive' | 'gmail' | 'imanage' | 'westlaw' | 'clio' | 'box' | 'dropbox' | 'onenote' | 'ms365_mail';
14615
+ /** VerifiedSignature */
14616
+ VerifiedSignature: {
14617
+ /**
14618
+ * Signer Name
14619
+ * @description The name the signer signed as
14620
+ */
14621
+ signer_name: string;
14622
+ /**
14623
+ * Signed At
14624
+ * Format: date-time
14625
+ */
14626
+ signed_at: string;
14627
+ /**
14628
+ * Sha256
14629
+ * @description SHA-256 of the PDF revision this signing sealed
14630
+ */
14631
+ sha256: string;
14632
+ /**
14633
+ * Intact
14634
+ * @description The seal of this revision verified when it was signed
14635
+ */
14636
+ intact: boolean;
14637
+ /**
14638
+ * Timestamped
14639
+ * @description The seal carries an RFC 3161 timestamp
14640
+ */
14641
+ timestamped: boolean;
14642
+ };
14562
14643
  /** VerifyEmailRequest */
14563
14644
  VerifyEmailRequest: {
14564
14645
  /**
@@ -17744,20 +17825,21 @@ interface operations {
17744
17825
  };
17745
17826
  };
17746
17827
  };
17747
- prepare_document_signature: {
17828
+ get_document_markup: {
17748
17829
  parameters: {
17749
- query?: never;
17750
- header?: never;
17830
+ query?: {
17831
+ /** @description Document version (default: the current one) */
17832
+ version?: number | null;
17833
+ };
17834
+ header?: {
17835
+ 'if-none-match'?: string | null;
17836
+ };
17751
17837
  path: {
17752
17838
  document_ext_id: string;
17753
17839
  };
17754
17840
  cookie?: never;
17755
17841
  };
17756
- requestBody: {
17757
- content: {
17758
- 'application/json': components['schemas']['PrepareSignatureRequest'];
17759
- };
17760
- };
17842
+ requestBody?: never;
17761
17843
  responses: {
17762
17844
  /** @description Successful Response */
17763
17845
  200: {
@@ -17765,8 +17847,15 @@ interface operations {
17765
17847
  [name: string]: unknown;
17766
17848
  };
17767
17849
  content: {
17768
- 'application/json': components['schemas']['PrepareSignatureResponse'];
17850
+ 'application/json': components['schemas']['MarkupLayerResponse'];
17851
+ };
17852
+ };
17853
+ /** @description Unchanged since the revision in If-None-Match */
17854
+ 304: {
17855
+ headers: {
17856
+ [name: string]: unknown;
17769
17857
  };
17858
+ content?: never;
17770
17859
  };
17771
17860
  /** @description Validation Error */
17772
17861
  422: {
@@ -17779,10 +17868,15 @@ interface operations {
17779
17868
  };
17780
17869
  };
17781
17870
  };
17782
- sign_document: {
17871
+ save_document_markup: {
17783
17872
  parameters: {
17784
- query?: never;
17785
- header?: never;
17873
+ query?: {
17874
+ /** @description Document version (default: the current one) */
17875
+ version?: number | null;
17876
+ };
17877
+ header?: {
17878
+ 'if-match'?: string | null;
17879
+ };
17786
17880
  path: {
17787
17881
  document_ext_id: string;
17788
17882
  };
@@ -17790,7 +17884,7 @@ interface operations {
17790
17884
  };
17791
17885
  requestBody: {
17792
17886
  content: {
17793
- 'application/json': components['schemas']['SignDocumentRequest'];
17887
+ 'application/json': components['schemas']['SaveMarkupRequest'];
17794
17888
  };
17795
17889
  };
17796
17890
  responses: {
@@ -17800,7 +17894,16 @@ interface operations {
17800
17894
  [name: string]: unknown;
17801
17895
  };
17802
17896
  content: {
17803
- 'application/json': components['schemas']['SignDocumentResponse'];
17897
+ 'application/json': components['schemas']['SaveMarkupResponse'];
17898
+ };
17899
+ };
17900
+ /** @description Saved by someone else first; re-read and merge */
17901
+ 409: {
17902
+ headers: {
17903
+ [name: string]: unknown;
17904
+ };
17905
+ content: {
17906
+ 'application/json': components['schemas']['MarkupConflict'];
17804
17907
  };
17805
17908
  };
17806
17909
  /** @description Validation Error */
@@ -17814,7 +17917,7 @@ interface operations {
17814
17917
  };
17815
17918
  };
17816
17919
  };
17817
- get_document_signature_status: {
17920
+ download_document_markup: {
17818
17921
  parameters: {
17819
17922
  query?: {
17820
17923
  /** @description Document version (default: the current one) */
@@ -17834,9 +17937,23 @@ interface operations {
17834
17937
  [name: string]: unknown;
17835
17938
  };
17836
17939
  content: {
17837
- 'application/json': components['schemas']['SignatureStatusResponse'];
17940
+ 'application/pdf': unknown;
17838
17941
  };
17839
17942
  };
17943
+ /** @description This version has no markup */
17944
+ 404: {
17945
+ headers: {
17946
+ [name: string]: unknown;
17947
+ };
17948
+ content?: never;
17949
+ };
17950
+ /** @description This version is signed: its PDF takes no more changes */
17951
+ 409: {
17952
+ headers: {
17953
+ [name: string]: unknown;
17954
+ };
17955
+ content?: never;
17956
+ };
17840
17957
  /** @description Validation Error */
17841
17958
  422: {
17842
17959
  headers: {
@@ -17848,21 +17965,20 @@ interface operations {
17848
17965
  };
17849
17966
  };
17850
17967
  };
17851
- get_document_markup: {
17968
+ prepare_document_signature: {
17852
17969
  parameters: {
17853
- query?: {
17854
- /** @description Document version (default: the current one) */
17855
- version?: number | null;
17856
- };
17857
- header?: {
17858
- 'if-none-match'?: string | null;
17859
- };
17970
+ query?: never;
17971
+ header?: never;
17860
17972
  path: {
17861
17973
  document_ext_id: string;
17862
17974
  };
17863
17975
  cookie?: never;
17864
17976
  };
17865
- requestBody?: never;
17977
+ requestBody: {
17978
+ content: {
17979
+ 'application/json': components['schemas']['PrepareSignatureRequest'];
17980
+ };
17981
+ };
17866
17982
  responses: {
17867
17983
  /** @description Successful Response */
17868
17984
  200: {
@@ -17870,15 +17986,8 @@ interface operations {
17870
17986
  [name: string]: unknown;
17871
17987
  };
17872
17988
  content: {
17873
- 'application/json': components['schemas']['MarkupLayerResponse'];
17874
- };
17875
- };
17876
- /** @description Unchanged since the revision in If-None-Match */
17877
- 304: {
17878
- headers: {
17879
- [name: string]: unknown;
17989
+ 'application/json': components['schemas']['PrepareSignatureResponse'];
17880
17990
  };
17881
- content?: never;
17882
17991
  };
17883
17992
  /** @description Validation Error */
17884
17993
  422: {
@@ -17891,15 +18000,10 @@ interface operations {
17891
18000
  };
17892
18001
  };
17893
18002
  };
17894
- save_document_markup: {
18003
+ sign_document: {
17895
18004
  parameters: {
17896
- query?: {
17897
- /** @description Document version (default: the current one) */
17898
- version?: number | null;
17899
- };
17900
- header?: {
17901
- 'if-match'?: string | null;
17902
- };
18005
+ query?: never;
18006
+ header?: never;
17903
18007
  path: {
17904
18008
  document_ext_id: string;
17905
18009
  };
@@ -17907,7 +18011,7 @@ interface operations {
17907
18011
  };
17908
18012
  requestBody: {
17909
18013
  content: {
17910
- 'application/json': components['schemas']['SaveMarkupRequest'];
18014
+ 'application/json': components['schemas']['SignDocumentRequest'];
17911
18015
  };
17912
18016
  };
17913
18017
  responses: {
@@ -17917,16 +18021,7 @@ interface operations {
17917
18021
  [name: string]: unknown;
17918
18022
  };
17919
18023
  content: {
17920
- 'application/json': components['schemas']['SaveMarkupResponse'];
17921
- };
17922
- };
17923
- /** @description Saved by someone else first; re-read and merge */
17924
- 409: {
17925
- headers: {
17926
- [name: string]: unknown;
17927
- };
17928
- content: {
17929
- 'application/json': components['schemas']['MarkupConflict'];
18024
+ 'application/json': components['schemas']['SignDocumentResponse'];
17930
18025
  };
17931
18026
  };
17932
18027
  /** @description Validation Error */
@@ -17940,7 +18035,7 @@ interface operations {
17940
18035
  };
17941
18036
  };
17942
18037
  };
17943
- download_document_markup: {
18038
+ get_document_signature_status: {
17944
18039
  parameters: {
17945
18040
  query?: {
17946
18041
  /** @description Document version (default: the current one) */
@@ -17960,15 +18055,39 @@ interface operations {
17960
18055
  [name: string]: unknown;
17961
18056
  };
17962
18057
  content: {
17963
- 'application/pdf': unknown;
18058
+ 'application/json': components['schemas']['SignatureStatusResponse'];
17964
18059
  };
17965
18060
  };
17966
- /** @description This version has no markup */
17967
- 404: {
18061
+ /** @description Validation Error */
18062
+ 422: {
17968
18063
  headers: {
17969
18064
  [name: string]: unknown;
17970
18065
  };
17971
- content?: never;
18066
+ content: {
18067
+ 'application/json': components['schemas']['HTTPValidationError'];
18068
+ };
18069
+ };
18070
+ };
18071
+ };
18072
+ verify_signature: {
18073
+ parameters: {
18074
+ query?: never;
18075
+ header?: never;
18076
+ path: {
18077
+ reference: string;
18078
+ };
18079
+ cookie?: never;
18080
+ };
18081
+ requestBody?: never;
18082
+ responses: {
18083
+ /** @description Successful Response */
18084
+ 200: {
18085
+ headers: {
18086
+ [name: string]: unknown;
18087
+ };
18088
+ content: {
18089
+ 'application/json': components['schemas']['SignatureVerification'];
18090
+ };
17972
18091
  };
17973
18092
  /** @description Validation Error */
17974
18093
  422: {
package/dist/index.d.ts CHANGED
@@ -1758,89 +1758,115 @@ interface paths {
1758
1758
  patch?: never;
1759
1759
  trace?: never;
1760
1760
  };
1761
- '/v1/document/{document_ext_id}/sign/prepare': {
1761
+ '/v1/document/{document_ext_id}/markup': {
1762
1762
  parameters: {
1763
1763
  query?: never;
1764
1764
  header?: never;
1765
1765
  path?: never;
1766
1766
  cookie?: never;
1767
1767
  };
1768
- get?: never;
1769
- put?: never;
1770
1768
  /**
1771
- * Prepare Document Signature
1772
- * @description Return the exact statement the signer's key must sign, and the hash of the PDF they are shown.
1769
+ * Get Document Markup
1770
+ * @description The version's marks and their revision (0 = no markup yet). Anyone who can see the document
1771
+ * can read them; ``can_edit`` says whether the caller may save.
1773
1772
  */
1774
- post: operations['prepare_document_signature'];
1773
+ get: operations['get_document_markup'];
1774
+ /**
1775
+ * Save Document Markup
1776
+ * @description Save the version's whole layer, overwriting its markup in place.
1777
+ *
1778
+ * Optimistic concurrency: the save must name the revision it started from (``If-Match`` or
1779
+ * ``base_revision``). When someone saved in between, nothing is written and the 409 carries the
1780
+ * latest revision: the client re-reads it, merges by annotation id and saves again.
1781
+ */
1782
+ put: operations['save_document_markup'];
1783
+ post?: never;
1775
1784
  delete?: never;
1776
1785
  options?: never;
1777
1786
  head?: never;
1778
1787
  patch?: never;
1779
1788
  trace?: never;
1780
1789
  };
1781
- '/v1/document/{document_ext_id}/sign': {
1790
+ '/v1/document/{document_ext_id}/markup/pdf': {
1782
1791
  parameters: {
1783
1792
  query?: never;
1784
1793
  header?: never;
1785
1794
  path?: never;
1786
1795
  cookie?: never;
1787
1796
  };
1788
- get?: never;
1789
- put?: never;
1790
1797
  /**
1791
- * Sign Document
1792
- * @description Sign a document: verify the signer's statement, seal a signed copy, save it as the document's next
1793
- * version (reason ``signed``; the document keeps its id).
1798
+ * Download Document Markup
1799
+ * @description "Download with markup": the version's PDF with its annotations as native PDF annotations
1800
+ * (Acrobat, Preview and other viewers show them). The plain download serves the original.
1794
1801
  */
1795
- post: operations['sign_document'];
1802
+ get: operations['download_document_markup'];
1803
+ put?: never;
1804
+ post?: never;
1796
1805
  delete?: never;
1797
1806
  options?: never;
1798
1807
  head?: never;
1799
1808
  patch?: never;
1800
1809
  trace?: never;
1801
1810
  };
1802
- '/v1/document/{document_ext_id}/signatures': {
1811
+ '/v1/document/{document_ext_id}/sign/prepare': {
1803
1812
  parameters: {
1804
1813
  query?: never;
1805
1814
  header?: never;
1806
1815
  path?: never;
1807
1816
  cookie?: never;
1808
1817
  };
1818
+ get?: never;
1819
+ put?: never;
1809
1820
  /**
1810
- * Get Document Signature Status
1811
- * @description Is this document version a signed copy, and is it unchanged since signing? Read from the PDF itself.
1821
+ * Prepare Document Signature
1822
+ * @description Return the exact statement the signer's key must sign, and the hash of the PDF they are shown.
1823
+ *
1824
+ * ``appearance`` and ``include_date`` are part of the statement: send the same ones to ``/sign``.
1812
1825
  */
1813
- get: operations['get_document_signature_status'];
1814
- put?: never;
1815
- post?: never;
1826
+ post: operations['prepare_document_signature'];
1816
1827
  delete?: never;
1817
1828
  options?: never;
1818
1829
  head?: never;
1819
1830
  patch?: never;
1820
1831
  trace?: never;
1821
1832
  };
1822
- '/v1/document/{document_ext_id}/markup': {
1833
+ '/v1/document/{document_ext_id}/sign': {
1823
1834
  parameters: {
1824
1835
  query?: never;
1825
1836
  header?: never;
1826
1837
  path?: never;
1827
1838
  cookie?: never;
1828
1839
  };
1840
+ get?: never;
1841
+ put?: never;
1829
1842
  /**
1830
- * Get Document Markup
1831
- * @description The version's marks and their revision (0 = no markup yet). Anyone who can see the document
1832
- * can read them; ``can_edit`` says whether the caller may save.
1843
+ * Sign Document
1844
+ * @description Sign a document: verify the signer's statement, seal a signed copy, save it as the document's next
1845
+ * version (reason ``signed``; the document keeps its id) and record the evidence under the signing's
1846
+ * reference, whose public certificate the signature links to.
1833
1847
  */
1834
- get: operations['get_document_markup'];
1848
+ post: operations['sign_document'];
1849
+ delete?: never;
1850
+ options?: never;
1851
+ head?: never;
1852
+ patch?: never;
1853
+ trace?: never;
1854
+ };
1855
+ '/v1/document/{document_ext_id}/signatures': {
1856
+ parameters: {
1857
+ query?: never;
1858
+ header?: never;
1859
+ path?: never;
1860
+ cookie?: never;
1861
+ };
1835
1862
  /**
1836
- * Save Document Markup
1837
- * @description Save the version's whole layer, overwriting its markup in place.
1838
- *
1839
- * Optimistic concurrency: the save must name the revision it started from (``If-Match`` or
1840
- * ``base_revision``). When someone saved in between, nothing is written and the 409 carries the
1841
- * latest revision: the client re-reads it, merges by annotation id and saves again.
1863
+ * Get Document Signature Status
1864
+ * @description Is this document version a signed copy, and is it unchanged since signing? The seals are checked
1865
+ * on the stored PDF itself (a signed PDF changed outside ARBI and uploaded again shows as not intact);
1866
+ * who signed comes from the signing records the seals name.
1842
1867
  */
1843
- put: operations['save_document_markup'];
1868
+ get: operations['get_document_signature_status'];
1869
+ put?: never;
1844
1870
  post?: never;
1845
1871
  delete?: never;
1846
1872
  options?: never;
@@ -1848,7 +1874,7 @@ interface paths {
1848
1874
  patch?: never;
1849
1875
  trace?: never;
1850
1876
  };
1851
- '/v1/document/{document_ext_id}/markup/pdf': {
1877
+ '/v1/sign/verify/{reference}': {
1852
1878
  parameters: {
1853
1879
  query?: never;
1854
1880
  header?: never;
@@ -1856,11 +1882,12 @@ interface paths {
1856
1882
  cookie?: never;
1857
1883
  };
1858
1884
  /**
1859
- * Download Document Markup
1860
- * @description "Download with markup": the version's PDF with its annotations as native PDF annotations
1861
- * (Acrobat, Preview and other viewers show them). The plain download serves the original.
1885
+ * Verify Signature
1886
+ * @description The public certificate of a signing (no login): who signed, when, the SHA-256 of each signed
1887
+ * revision and whether its seal verified. ``reference`` is the one the signature links to; 404 if
1888
+ * there is no such signing. Never exposes email, document content or ids.
1862
1889
  */
1863
- get: operations['download_document_markup'];
1890
+ get: operations['verify_signature'];
1864
1891
  put?: never;
1865
1892
  post?: never;
1866
1893
  delete?: never;
@@ -10725,6 +10752,12 @@ interface components {
10725
10752
  signer: components['schemas']['SignerDetails'];
10726
10753
  /** @description Omit for the bottom of the last page */
10727
10754
  appearance?: components['schemas']['SignatureAppearance'] | null;
10755
+ /**
10756
+ * Include Date
10757
+ * @description Show the signing date under the signature. Must match the sign request.
10758
+ * @default false
10759
+ */
10760
+ include_date: boolean;
10728
10761
  };
10729
10762
  /** PrepareSignatureResponse */
10730
10763
  PrepareSignatureResponse: {
@@ -12712,6 +12745,12 @@ interface components {
12712
12745
  signer: components['schemas']['SignerDetails'];
12713
12746
  /** @description Omit for the bottom of the last page */
12714
12747
  appearance?: components['schemas']['SignatureAppearance'] | null;
12748
+ /**
12749
+ * Include Date
12750
+ * @description Show the signing date under the signature. Must match the prepare request.
12751
+ * @default false
12752
+ */
12753
+ include_date: boolean;
12715
12754
  /** Timestamp */
12716
12755
  timestamp: number;
12717
12756
  /**
@@ -12797,21 +12836,16 @@ interface components {
12797
12836
  */
12798
12837
  signer_name?: string | null;
12799
12838
  /**
12800
- * Capacity
12801
- * @description The signer's role, e.g. 'Partner'
12839
+ * Certificate Url
12840
+ * @description The public certificate page of this signing
12802
12841
  */
12803
- capacity?: string | null;
12804
- /**
12805
- * On Behalf Of
12806
- * @description Who the signer signed for, e.g. a firm
12807
- */
12808
- on_behalf_of?: string | null;
12842
+ certificate_url: string;
12809
12843
  };
12810
12844
  /** SignatureStatusResponse */
12811
12845
  SignatureStatusResponse: {
12812
12846
  /**
12813
12847
  * Signed
12814
- * @description This document is a PDF signed and sealed by ARBI
12848
+ * @description This document version is a PDF signed and sealed by ARBI
12815
12849
  */
12816
12850
  signed: boolean;
12817
12851
  /**
@@ -12825,26 +12859,45 @@ interface components {
12825
12859
  * @default false
12826
12860
  */
12827
12861
  timestamped: boolean;
12862
+ /**
12863
+ * Certificate Url
12864
+ * @description The public certificate of this version (its latest signing)
12865
+ */
12866
+ certificate_url?: string | null;
12828
12867
  /**
12829
12868
  * Signatures
12830
12869
  * @default []
12831
12870
  */
12832
12871
  signatures: components['schemas']['SignatureRecord'][];
12833
12872
  };
12834
- /** SignerDetails */
12835
- SignerDetails: {
12836
- /** Name */
12837
- name: string;
12873
+ /**
12874
+ * SignatureVerification
12875
+ * @description The public certificate of a signing: no email, document content or ids.
12876
+ */
12877
+ SignatureVerification: {
12878
+ /**
12879
+ * Signatures
12880
+ * @description Every signing in this version, oldest first
12881
+ */
12882
+ signatures: components['schemas']['VerifiedSignature'][];
12883
+ /**
12884
+ * Document Sha256
12885
+ * @description SHA-256 of the signed PDF this reference points to
12886
+ */
12887
+ document_sha256: string;
12838
12888
  /**
12839
- * Capacity
12840
- * @description e.g. 'Partner', 'Solicitor'
12889
+ * Intact
12890
+ * @description Every seal in that PDF verified
12841
12891
  */
12842
- capacity?: string | null;
12892
+ intact: boolean;
12893
+ };
12894
+ /** SignerDetails */
12895
+ SignerDetails: {
12843
12896
  /**
12844
- * On Behalf Of
12845
- * @description e.g. the firm's name
12897
+ * Name
12898
+ * @description Rendered as the signature
12846
12899
  */
12847
- on_behalf_of?: string | null;
12900
+ name: string;
12848
12901
  };
12849
12902
  /**
12850
12903
  * SkillSummaryResponse
@@ -14559,6 +14612,34 @@ interface components {
14559
14612
  * @enum {string}
14560
14613
  */
14561
14614
  VendorKey: 'microsoft' | 'microsoft_sharepoint' | 'gdrive' | 'gmail' | 'imanage' | 'westlaw' | 'clio' | 'box' | 'dropbox' | 'onenote' | 'ms365_mail';
14615
+ /** VerifiedSignature */
14616
+ VerifiedSignature: {
14617
+ /**
14618
+ * Signer Name
14619
+ * @description The name the signer signed as
14620
+ */
14621
+ signer_name: string;
14622
+ /**
14623
+ * Signed At
14624
+ * Format: date-time
14625
+ */
14626
+ signed_at: string;
14627
+ /**
14628
+ * Sha256
14629
+ * @description SHA-256 of the PDF revision this signing sealed
14630
+ */
14631
+ sha256: string;
14632
+ /**
14633
+ * Intact
14634
+ * @description The seal of this revision verified when it was signed
14635
+ */
14636
+ intact: boolean;
14637
+ /**
14638
+ * Timestamped
14639
+ * @description The seal carries an RFC 3161 timestamp
14640
+ */
14641
+ timestamped: boolean;
14642
+ };
14562
14643
  /** VerifyEmailRequest */
14563
14644
  VerifyEmailRequest: {
14564
14645
  /**
@@ -17744,20 +17825,21 @@ interface operations {
17744
17825
  };
17745
17826
  };
17746
17827
  };
17747
- prepare_document_signature: {
17828
+ get_document_markup: {
17748
17829
  parameters: {
17749
- query?: never;
17750
- header?: never;
17830
+ query?: {
17831
+ /** @description Document version (default: the current one) */
17832
+ version?: number | null;
17833
+ };
17834
+ header?: {
17835
+ 'if-none-match'?: string | null;
17836
+ };
17751
17837
  path: {
17752
17838
  document_ext_id: string;
17753
17839
  };
17754
17840
  cookie?: never;
17755
17841
  };
17756
- requestBody: {
17757
- content: {
17758
- 'application/json': components['schemas']['PrepareSignatureRequest'];
17759
- };
17760
- };
17842
+ requestBody?: never;
17761
17843
  responses: {
17762
17844
  /** @description Successful Response */
17763
17845
  200: {
@@ -17765,8 +17847,15 @@ interface operations {
17765
17847
  [name: string]: unknown;
17766
17848
  };
17767
17849
  content: {
17768
- 'application/json': components['schemas']['PrepareSignatureResponse'];
17850
+ 'application/json': components['schemas']['MarkupLayerResponse'];
17851
+ };
17852
+ };
17853
+ /** @description Unchanged since the revision in If-None-Match */
17854
+ 304: {
17855
+ headers: {
17856
+ [name: string]: unknown;
17769
17857
  };
17858
+ content?: never;
17770
17859
  };
17771
17860
  /** @description Validation Error */
17772
17861
  422: {
@@ -17779,10 +17868,15 @@ interface operations {
17779
17868
  };
17780
17869
  };
17781
17870
  };
17782
- sign_document: {
17871
+ save_document_markup: {
17783
17872
  parameters: {
17784
- query?: never;
17785
- header?: never;
17873
+ query?: {
17874
+ /** @description Document version (default: the current one) */
17875
+ version?: number | null;
17876
+ };
17877
+ header?: {
17878
+ 'if-match'?: string | null;
17879
+ };
17786
17880
  path: {
17787
17881
  document_ext_id: string;
17788
17882
  };
@@ -17790,7 +17884,7 @@ interface operations {
17790
17884
  };
17791
17885
  requestBody: {
17792
17886
  content: {
17793
- 'application/json': components['schemas']['SignDocumentRequest'];
17887
+ 'application/json': components['schemas']['SaveMarkupRequest'];
17794
17888
  };
17795
17889
  };
17796
17890
  responses: {
@@ -17800,7 +17894,16 @@ interface operations {
17800
17894
  [name: string]: unknown;
17801
17895
  };
17802
17896
  content: {
17803
- 'application/json': components['schemas']['SignDocumentResponse'];
17897
+ 'application/json': components['schemas']['SaveMarkupResponse'];
17898
+ };
17899
+ };
17900
+ /** @description Saved by someone else first; re-read and merge */
17901
+ 409: {
17902
+ headers: {
17903
+ [name: string]: unknown;
17904
+ };
17905
+ content: {
17906
+ 'application/json': components['schemas']['MarkupConflict'];
17804
17907
  };
17805
17908
  };
17806
17909
  /** @description Validation Error */
@@ -17814,7 +17917,7 @@ interface operations {
17814
17917
  };
17815
17918
  };
17816
17919
  };
17817
- get_document_signature_status: {
17920
+ download_document_markup: {
17818
17921
  parameters: {
17819
17922
  query?: {
17820
17923
  /** @description Document version (default: the current one) */
@@ -17834,9 +17937,23 @@ interface operations {
17834
17937
  [name: string]: unknown;
17835
17938
  };
17836
17939
  content: {
17837
- 'application/json': components['schemas']['SignatureStatusResponse'];
17940
+ 'application/pdf': unknown;
17838
17941
  };
17839
17942
  };
17943
+ /** @description This version has no markup */
17944
+ 404: {
17945
+ headers: {
17946
+ [name: string]: unknown;
17947
+ };
17948
+ content?: never;
17949
+ };
17950
+ /** @description This version is signed: its PDF takes no more changes */
17951
+ 409: {
17952
+ headers: {
17953
+ [name: string]: unknown;
17954
+ };
17955
+ content?: never;
17956
+ };
17840
17957
  /** @description Validation Error */
17841
17958
  422: {
17842
17959
  headers: {
@@ -17848,21 +17965,20 @@ interface operations {
17848
17965
  };
17849
17966
  };
17850
17967
  };
17851
- get_document_markup: {
17968
+ prepare_document_signature: {
17852
17969
  parameters: {
17853
- query?: {
17854
- /** @description Document version (default: the current one) */
17855
- version?: number | null;
17856
- };
17857
- header?: {
17858
- 'if-none-match'?: string | null;
17859
- };
17970
+ query?: never;
17971
+ header?: never;
17860
17972
  path: {
17861
17973
  document_ext_id: string;
17862
17974
  };
17863
17975
  cookie?: never;
17864
17976
  };
17865
- requestBody?: never;
17977
+ requestBody: {
17978
+ content: {
17979
+ 'application/json': components['schemas']['PrepareSignatureRequest'];
17980
+ };
17981
+ };
17866
17982
  responses: {
17867
17983
  /** @description Successful Response */
17868
17984
  200: {
@@ -17870,15 +17986,8 @@ interface operations {
17870
17986
  [name: string]: unknown;
17871
17987
  };
17872
17988
  content: {
17873
- 'application/json': components['schemas']['MarkupLayerResponse'];
17874
- };
17875
- };
17876
- /** @description Unchanged since the revision in If-None-Match */
17877
- 304: {
17878
- headers: {
17879
- [name: string]: unknown;
17989
+ 'application/json': components['schemas']['PrepareSignatureResponse'];
17880
17990
  };
17881
- content?: never;
17882
17991
  };
17883
17992
  /** @description Validation Error */
17884
17993
  422: {
@@ -17891,15 +18000,10 @@ interface operations {
17891
18000
  };
17892
18001
  };
17893
18002
  };
17894
- save_document_markup: {
18003
+ sign_document: {
17895
18004
  parameters: {
17896
- query?: {
17897
- /** @description Document version (default: the current one) */
17898
- version?: number | null;
17899
- };
17900
- header?: {
17901
- 'if-match'?: string | null;
17902
- };
18005
+ query?: never;
18006
+ header?: never;
17903
18007
  path: {
17904
18008
  document_ext_id: string;
17905
18009
  };
@@ -17907,7 +18011,7 @@ interface operations {
17907
18011
  };
17908
18012
  requestBody: {
17909
18013
  content: {
17910
- 'application/json': components['schemas']['SaveMarkupRequest'];
18014
+ 'application/json': components['schemas']['SignDocumentRequest'];
17911
18015
  };
17912
18016
  };
17913
18017
  responses: {
@@ -17917,16 +18021,7 @@ interface operations {
17917
18021
  [name: string]: unknown;
17918
18022
  };
17919
18023
  content: {
17920
- 'application/json': components['schemas']['SaveMarkupResponse'];
17921
- };
17922
- };
17923
- /** @description Saved by someone else first; re-read and merge */
17924
- 409: {
17925
- headers: {
17926
- [name: string]: unknown;
17927
- };
17928
- content: {
17929
- 'application/json': components['schemas']['MarkupConflict'];
18024
+ 'application/json': components['schemas']['SignDocumentResponse'];
17930
18025
  };
17931
18026
  };
17932
18027
  /** @description Validation Error */
@@ -17940,7 +18035,7 @@ interface operations {
17940
18035
  };
17941
18036
  };
17942
18037
  };
17943
- download_document_markup: {
18038
+ get_document_signature_status: {
17944
18039
  parameters: {
17945
18040
  query?: {
17946
18041
  /** @description Document version (default: the current one) */
@@ -17960,15 +18055,39 @@ interface operations {
17960
18055
  [name: string]: unknown;
17961
18056
  };
17962
18057
  content: {
17963
- 'application/pdf': unknown;
18058
+ 'application/json': components['schemas']['SignatureStatusResponse'];
17964
18059
  };
17965
18060
  };
17966
- /** @description This version has no markup */
17967
- 404: {
18061
+ /** @description Validation Error */
18062
+ 422: {
17968
18063
  headers: {
17969
18064
  [name: string]: unknown;
17970
18065
  };
17971
- content?: never;
18066
+ content: {
18067
+ 'application/json': components['schemas']['HTTPValidationError'];
18068
+ };
18069
+ };
18070
+ };
18071
+ };
18072
+ verify_signature: {
18073
+ parameters: {
18074
+ query?: never;
18075
+ header?: never;
18076
+ path: {
18077
+ reference: string;
18078
+ };
18079
+ cookie?: never;
18080
+ };
18081
+ requestBody?: never;
18082
+ responses: {
18083
+ /** @description Successful Response */
18084
+ 200: {
18085
+ headers: {
18086
+ [name: string]: unknown;
18087
+ };
18088
+ content: {
18089
+ 'application/json': components['schemas']['SignatureVerification'];
18090
+ };
17972
18091
  };
17973
18092
  /** @description Validation Error */
17974
18093
  422: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/client",
3
- "version": "0.4.69",
3
+ "version": "0.4.70",
4
4
  "description": "TypeScript SDK for the ARBI API — zero-knowledge auth, E2E encryption, and type-safe REST client",
5
5
  "type": "module",
6
6
  "sideEffects": false,