@verdocs/js-sdk 6.3.2 → 6.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -534,6 +534,10 @@ interface IEnvelope {
534
534
  expires_at?: string;
535
535
  /** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
536
536
  visibility: "private" | "shared";
537
+ /** If true, the attachments have been signed with the Verdocs AATL signing certificate. */
538
+ signed: boolean;
539
+ /** If true, the envelope certificate has been generated and signed. */
540
+ certified: boolean;
537
541
  /**
538
542
  * Storage for arbitrary data that may be used e.g. to track source database/record IDs to relate Envelopes back to
539
543
  * internal systems/applications.
package/dist/index.d.ts CHANGED
@@ -534,6 +534,10 @@ interface IEnvelope {
534
534
  expires_at?: string;
535
535
  /** Defaults to 'private'. If set to 'shared', this envelope will be visible to other users in the same organization. Ignored for personal profiles. */
536
536
  visibility: "private" | "shared";
537
+ /** If true, the attachments have been signed with the Verdocs AATL signing certificate. */
538
+ signed: boolean;
539
+ /** If true, the envelope certificate has been generated and signed. */
540
+ certified: boolean;
537
541
  /**
538
542
  * Storage for arbitrary data that may be used e.g. to track source database/record IDs to relate Envelopes back to
539
543
  * internal systems/applications.
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var axios = require('axios');
4
+ var axiosRetry = require('axios-retry');
4
5
 
5
6
  const FIELD_TYPES = [
6
7
  'textbox',
@@ -1255,6 +1256,8 @@ class VerdocsEndpoint {
1255
1256
  this.clientID = options?.clientID ?? this.clientID;
1256
1257
  this.persist = options?.persist ?? this.persist;
1257
1258
  this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
1259
+ // Enable the module but not for any requests, only a few get this
1260
+ axiosRetry(this.api, { retries: 0 });
1258
1261
  }
1259
1262
  setDefault() {
1260
1263
  globalThis$1[ENDPOINT_KEY] = this;
@@ -1625,7 +1628,10 @@ const getEnvelopeDocument = async (endpoint, documentId) => endpoint.api //
1625
1628
  * Download a document directly.
1626
1629
  */
1627
1630
  const downloadEnvelopeDocument = async (endpoint, documentId) => endpoint.api //
1628
- .get(`/v2/envelope-documents/${documentId}?type=file`, { responseType: 'blob' })
1631
+ .get(`/v2/envelope-documents/${documentId}?type=file`, {
1632
+ responseType: 'blob',
1633
+ 'axios-retry': { retries: 5, retryDelay: axiosRetry.linearDelay(3000) },
1634
+ })
1629
1635
  .then((r) => r.data);
1630
1636
  /**
1631
1637
  * Get an envelope document's metadata, or the document itself. If no "type" parameter is specified,
@@ -1641,14 +1647,18 @@ const downloadEnvelopeDocument = async (endpoint, documentId) => endpoint.api //
1641
1647
  * @apiSuccess string . The generated link.
1642
1648
  */
1643
1649
  const getEnvelopeDocumentDownloadLink = async (endpoint, documentId) => endpoint.api //
1644
- .get(`/v2/envelope-documents/${documentId}?type=download`)
1650
+ .get(`/v2/envelope-documents/${documentId}?type=download`, {
1651
+ 'axios-retry': { retries: 5, retryDelay: axiosRetry.linearDelay(3000) },
1652
+ })
1645
1653
  .then((r) => r.data);
1646
1654
  /**
1647
1655
  * Get a pre-signed preview link for an Envelope Document. This link expires quickly, so it should
1648
1656
  * be accessed immediately and never shared. Content-Disposition will be set to "inline".
1649
1657
  */
1650
1658
  const getEnvelopeDocumentPreviewLink = async (endpoint, documentId) => endpoint.api //
1651
- .get(`/v2/envelope-documents/${documentId}?type=preview`)
1659
+ .get(`/v2/envelope-documents/${documentId}?type=preview`, {
1660
+ 'axios-retry': { retries: 5, retryDelay: axiosRetry.linearDelay(3000) },
1661
+ })
1652
1662
  .then((r) => r.data);
1653
1663
  /**
1654
1664
  * Cancel an Envelope.