@verdocs/js-sdk 6.3.1 → 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.
@@ -2124,7 +2128,7 @@ declare const resetRecipient: (endpoint: VerdocsEndpoint, envelopeId: string, ro
2124
2128
  * sender to determine how to reply.
2125
2129
  *
2126
2130
  * @group Recipients
2127
- * @api POST /envelopes/:envelope_id/recipients/:role_name/ask-sender Ask Sender a Question
2131
+ * @api POST /envelopes/:envelope_id/recipients/:role_name/ask-question Ask Sender a Question
2128
2132
  * @apiParam string(format:uuid) envelope_id The envelope to operate on.
2129
2133
  * @apiParam string role_name The role name to update.
2130
2134
  * @apiBody string question The question to ask.
@@ -2982,6 +2986,10 @@ declare const getOrganizationUsage: (endpoint: VerdocsEndpoint, organizationId:
2982
2986
  * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
2983
2987
  * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
2984
2988
  * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
2989
+ * @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
2990
+ * @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
2991
+ * @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
2992
+ * @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
2985
2993
  * @apiSuccess IAuthenticateResponse . Authentication credentials for user in the new organization. The user will be made an Owner automatically.
2986
2994
  */
2987
2995
  declare const createOrganization: (endpoint: VerdocsEndpoint, params: {
@@ -3008,6 +3016,10 @@ declare const createOrganization: (endpoint: VerdocsEndpoint, params: {
3008
3016
  * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
3009
3017
  * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
3010
3018
  * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
3019
+ * @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
3020
+ * @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
3021
+ * @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
3022
+ * @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
3011
3023
  * @apiSuccess IOrganization . The details for the updated organization
3012
3024
  */
3013
3025
  declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
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.
@@ -2124,7 +2128,7 @@ declare const resetRecipient: (endpoint: VerdocsEndpoint, envelopeId: string, ro
2124
2128
  * sender to determine how to reply.
2125
2129
  *
2126
2130
  * @group Recipients
2127
- * @api POST /envelopes/:envelope_id/recipients/:role_name/ask-sender Ask Sender a Question
2131
+ * @api POST /envelopes/:envelope_id/recipients/:role_name/ask-question Ask Sender a Question
2128
2132
  * @apiParam string(format:uuid) envelope_id The envelope to operate on.
2129
2133
  * @apiParam string role_name The role name to update.
2130
2134
  * @apiBody string question The question to ask.
@@ -2982,6 +2986,10 @@ declare const getOrganizationUsage: (endpoint: VerdocsEndpoint, organizationId:
2982
2986
  * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
2983
2987
  * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
2984
2988
  * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
2989
+ * @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
2990
+ * @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
2991
+ * @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
2992
+ * @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
2985
2993
  * @apiSuccess IAuthenticateResponse . Authentication credentials for user in the new organization. The user will be made an Owner automatically.
2986
2994
  */
2987
2995
  declare const createOrganization: (endpoint: VerdocsEndpoint, params: {
@@ -3008,6 +3016,10 @@ declare const createOrganization: (endpoint: VerdocsEndpoint, params: {
3008
3016
  * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
3009
3017
  * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
3010
3018
  * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
3019
+ * @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
3020
+ * @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
3021
+ * @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
3022
+ * @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
3011
3023
  * @apiSuccess IOrganization . The details for the updated organization
3012
3024
  */
3013
3025
  declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: Partial<IOrganization>) => Promise<IOrganization>;
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.
@@ -2864,7 +2874,7 @@ const resetRecipient = (endpoint, envelopeId, roleName) => endpoint.api //
2864
2874
  * sender to determine how to reply.
2865
2875
  *
2866
2876
  * @group Recipients
2867
- * @api POST /envelopes/:envelope_id/recipients/:role_name/ask-sender Ask Sender a Question
2877
+ * @api POST /envelopes/:envelope_id/recipients/:role_name/ask-question Ask Sender a Question
2868
2878
  * @apiParam string(format:uuid) envelope_id The envelope to operate on.
2869
2879
  * @apiParam string role_name The role name to update.
2870
2880
  * @apiBody string question The question to ask.
@@ -3526,6 +3536,10 @@ const getOrganizationUsage = (endpoint, organizationId, params) => endpoint.api
3526
3536
  * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
3527
3537
  * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
3528
3538
  * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
3539
+ * @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
3540
+ * @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
3541
+ * @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
3542
+ * @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
3529
3543
  * @apiSuccess IAuthenticateResponse . Authentication credentials for user in the new organization. The user will be made an Owner automatically.
3530
3544
  */
3531
3545
  const createOrganization = (endpoint, params) => endpoint.api //
@@ -3549,6 +3563,10 @@ const createOrganization = (endpoint, params) => endpoint.api //
3549
3563
  * @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
3550
3564
  * @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
3551
3565
  * @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
3566
+ * @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
3567
+ * @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
3568
+ * @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
3569
+ * @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
3552
3570
  * @apiSuccess IOrganization . The details for the updated organization
3553
3571
  */
3554
3572
  const updateOrganization = (endpoint, organizationId, params) => endpoint.api //