@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 +13 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +22 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -4
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +4 -3
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
|
+
import axiosRetry from 'axios-retry';
|
|
2
3
|
|
|
3
4
|
const FIELD_TYPES = [
|
|
4
5
|
'textbox',
|
|
@@ -1253,6 +1254,8 @@ class VerdocsEndpoint {
|
|
|
1253
1254
|
this.clientID = options?.clientID ?? this.clientID;
|
|
1254
1255
|
this.persist = options?.persist ?? this.persist;
|
|
1255
1256
|
this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
|
|
1257
|
+
// Enable the module but not for any requests, only a few get this
|
|
1258
|
+
axiosRetry(this.api, { retries: 0 });
|
|
1256
1259
|
}
|
|
1257
1260
|
setDefault() {
|
|
1258
1261
|
globalThis$1[ENDPOINT_KEY] = this;
|
|
@@ -1623,7 +1626,10 @@ const getEnvelopeDocument = async (endpoint, documentId) => endpoint.api //
|
|
|
1623
1626
|
* Download a document directly.
|
|
1624
1627
|
*/
|
|
1625
1628
|
const downloadEnvelopeDocument = async (endpoint, documentId) => endpoint.api //
|
|
1626
|
-
.get(`/v2/envelope-documents/${documentId}?type=file`, {
|
|
1629
|
+
.get(`/v2/envelope-documents/${documentId}?type=file`, {
|
|
1630
|
+
responseType: 'blob',
|
|
1631
|
+
'axios-retry': { retries: 5, retryDelay: axiosRetry.linearDelay(3000) },
|
|
1632
|
+
})
|
|
1627
1633
|
.then((r) => r.data);
|
|
1628
1634
|
/**
|
|
1629
1635
|
* Get an envelope document's metadata, or the document itself. If no "type" parameter is specified,
|
|
@@ -1639,14 +1645,18 @@ const downloadEnvelopeDocument = async (endpoint, documentId) => endpoint.api //
|
|
|
1639
1645
|
* @apiSuccess string . The generated link.
|
|
1640
1646
|
*/
|
|
1641
1647
|
const getEnvelopeDocumentDownloadLink = async (endpoint, documentId) => endpoint.api //
|
|
1642
|
-
.get(`/v2/envelope-documents/${documentId}?type=download
|
|
1648
|
+
.get(`/v2/envelope-documents/${documentId}?type=download`, {
|
|
1649
|
+
'axios-retry': { retries: 5, retryDelay: axiosRetry.linearDelay(3000) },
|
|
1650
|
+
})
|
|
1643
1651
|
.then((r) => r.data);
|
|
1644
1652
|
/**
|
|
1645
1653
|
* Get a pre-signed preview link for an Envelope Document. This link expires quickly, so it should
|
|
1646
1654
|
* be accessed immediately and never shared. Content-Disposition will be set to "inline".
|
|
1647
1655
|
*/
|
|
1648
1656
|
const getEnvelopeDocumentPreviewLink = async (endpoint, documentId) => endpoint.api //
|
|
1649
|
-
.get(`/v2/envelope-documents/${documentId}?type=preview
|
|
1657
|
+
.get(`/v2/envelope-documents/${documentId}?type=preview`, {
|
|
1658
|
+
'axios-retry': { retries: 5, retryDelay: axiosRetry.linearDelay(3000) },
|
|
1659
|
+
})
|
|
1650
1660
|
.then((r) => r.data);
|
|
1651
1661
|
/**
|
|
1652
1662
|
* Cancel an Envelope.
|
|
@@ -2862,7 +2872,7 @@ const resetRecipient = (endpoint, envelopeId, roleName) => endpoint.api //
|
|
|
2862
2872
|
* sender to determine how to reply.
|
|
2863
2873
|
*
|
|
2864
2874
|
* @group Recipients
|
|
2865
|
-
* @api POST /envelopes/:envelope_id/recipients/:role_name/ask-
|
|
2875
|
+
* @api POST /envelopes/:envelope_id/recipients/:role_name/ask-question Ask Sender a Question
|
|
2866
2876
|
* @apiParam string(format:uuid) envelope_id The envelope to operate on.
|
|
2867
2877
|
* @apiParam string role_name The role name to update.
|
|
2868
2878
|
* @apiBody string question The question to ask.
|
|
@@ -3524,6 +3534,10 @@ const getOrganizationUsage = (endpoint, organizationId, params) => endpoint.api
|
|
|
3524
3534
|
* @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
|
|
3525
3535
|
* @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
|
|
3526
3536
|
* @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
|
|
3537
|
+
* @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
|
|
3538
|
+
* @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
|
|
3539
|
+
* @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
|
|
3540
|
+
* @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
|
|
3527
3541
|
* @apiSuccess IAuthenticateResponse . Authentication credentials for user in the new organization. The user will be made an Owner automatically.
|
|
3528
3542
|
*/
|
|
3529
3543
|
const createOrganization = (endpoint, params) => endpoint.api //
|
|
@@ -3547,6 +3561,10 @@ const createOrganization = (endpoint, params) => endpoint.api //
|
|
|
3547
3561
|
* @apiBody string thumbnail_url? URL of a small-format (square is recommended) PNG logo
|
|
3548
3562
|
* @apiBody string primary_color? URL of a small-format (square is recommended) PNG logo
|
|
3549
3563
|
* @apiBody string secondary_color? URL of a small-format (square is recommended) PNG logo
|
|
3564
|
+
* @apiBody string terms_use_url? URL of a Terms of Use page, shown in bottom-right of signing experience. Hidden if not set.
|
|
3565
|
+
* @apiBody string privacy_policy_url? URL of a Privacy Policy page, shown in bottom-right of signing experience. Hidden if not set.
|
|
3566
|
+
* @apiBody string powered_by_label? "Powered-by..." label, shown in bottom-left of signing experience. Hidden if not set.
|
|
3567
|
+
* @apiBody string powered_by_url? URL for the Powered By label to show when clicked. Rendered as a static label if not set.
|
|
3550
3568
|
* @apiSuccess IOrganization . The details for the updated organization
|
|
3551
3569
|
*/
|
|
3552
3570
|
const updateOrganization = (endpoint, organizationId, params) => endpoint.api //
|