@verdocs/js-sdk 3.10.24 → 3.10.27
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/Envelopes/Envelopes.js +2 -6
- package/Templates/Pages.js +1 -6
- package/VerdocsEndpoint.d.ts +1 -1
- package/VerdocsEndpoint.js +1 -11
- package/package.json +9 -10
package/Envelopes/Envelopes.js
CHANGED
|
@@ -111,6 +111,7 @@ export var searchEnvelopes = function (endpoint, params) { return __awaiter(void
|
|
|
111
111
|
*/
|
|
112
112
|
export var getSigningSession = function (endpoint, params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
113
|
return __generator(this, function (_a) {
|
|
114
|
+
window.console.log('[JS_SDK] getSigningSession', params, endpoint.api);
|
|
114
115
|
return [2 /*return*/, endpoint.api //
|
|
115
116
|
.get("/envelopes/".concat(params.envelopeId, "/recipients/").concat(encodeURIComponent(params.roleId), "/invitation/").concat(params.inviteCode))
|
|
116
117
|
.then(function (r) {
|
|
@@ -302,12 +303,7 @@ export var getEnvelopeDocumentPageDisplayUri = function (endpoint, envelopeId, d
|
|
|
302
303
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
303
304
|
return __generator(this, function (_a) {
|
|
304
305
|
return [2 /*return*/, endpoint.api
|
|
305
|
-
.get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "/pages/").concat(page, "/image?type=").concat(type), {
|
|
306
|
-
timeout: 20000,
|
|
307
|
-
'axios-retry': {
|
|
308
|
-
retries: 5,
|
|
309
|
-
},
|
|
310
|
-
})
|
|
306
|
+
.get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "/pages/").concat(page, "/image?type=").concat(type), { timeout: 20000 })
|
|
311
307
|
.then(function (r) { return r.data; })];
|
|
312
308
|
});
|
|
313
309
|
});
|
package/Templates/Pages.js
CHANGED
|
@@ -20,12 +20,7 @@ export var editPage = function (endpoint, templateId, sequence) {
|
|
|
20
20
|
export var getPage = function (endpoint, templateId, sequence, thumbnail) {
|
|
21
21
|
if (thumbnail === void 0) { thumbnail = false; }
|
|
22
22
|
return endpoint.api //
|
|
23
|
-
.get("/templates/".concat(templateId, "/pages/").concat(sequence).concat(thumbnail ? '?thumbnail=true' : '')
|
|
24
|
-
timeout: 20000,
|
|
25
|
-
'axios-retry': {
|
|
26
|
-
retries: 5,
|
|
27
|
-
},
|
|
28
|
-
})
|
|
23
|
+
.get("/templates/".concat(templateId, "/pages/").concat(sequence).concat(thumbnail ? '?thumbnail=true' : ''))
|
|
29
24
|
.then(function (r) { return r.data; });
|
|
30
25
|
};
|
|
31
26
|
/**
|
package/VerdocsEndpoint.d.ts
CHANGED
package/VerdocsEndpoint.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import axiosRetry from 'axios-retry';
|
|
2
1
|
import axios from 'axios';
|
|
3
2
|
import { decodeAccessTokenBody } from './Utils/Token';
|
|
4
3
|
import globalThis from './Utils/globalThis';
|
|
@@ -28,7 +27,7 @@ var requestLogger = function (r) {
|
|
|
28
27
|
* .setSessionType('signing')
|
|
29
28
|
* .logRequests(true)
|
|
30
29
|
* .setClientID('1234)
|
|
31
|
-
* .setTimeout(
|
|
30
|
+
* .setTimeout(30000);
|
|
32
31
|
* ```
|
|
33
32
|
*/
|
|
34
33
|
var VerdocsEndpoint = /** @class */ (function () {
|
|
@@ -64,15 +63,6 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
|
64
63
|
this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || this.sessionType;
|
|
65
64
|
this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || this.clientID;
|
|
66
65
|
this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
|
|
67
|
-
window.console.log('[JS_SDK] Initializing', this.baseURL, window.location.origin);
|
|
68
|
-
// We set the default retries to zero because we only actually want this feature on certain calls for now
|
|
69
|
-
axiosRetry(this.api, {
|
|
70
|
-
retries: 0,
|
|
71
|
-
retryDelay: axiosRetry.exponentialDelay,
|
|
72
|
-
onRetry: function (retryCount, error, requestConfig) {
|
|
73
|
-
window.console.debug("[JS_SDK] Retrying request (".concat(retryCount, ")"), error.message, requestConfig.url);
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
66
|
}
|
|
77
67
|
VerdocsEndpoint.prototype.setDefault = function () {
|
|
78
68
|
globalThis[ENDPOINT_KEY] = this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdocs/js-sdk",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.27",
|
|
4
4
|
"private": false,
|
|
5
5
|
"homepage": "https://github.com/Verdocs/js-sdk",
|
|
6
6
|
"description": "Verdocs JS SDK",
|
|
@@ -46,24 +46,23 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"axios": "^1.6.
|
|
50
|
-
"axios-retry": "^4.0.0"
|
|
49
|
+
"axios": "^1.6.5"
|
|
51
50
|
},
|
|
52
51
|
"peerDependencies": {
|
|
53
|
-
"typescript": "^5.3.
|
|
52
|
+
"typescript": "^5.3.3"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
56
|
-
"@jest/globals": "^29.
|
|
57
|
-
"@types/jest": "^29.5.
|
|
55
|
+
"@jest/globals": "^29.7.0",
|
|
56
|
+
"@types/jest": "^29.5.11",
|
|
58
57
|
"axios-mock-adapter": "^1.22.0",
|
|
59
|
-
"jest": "^29.
|
|
58
|
+
"jest": "^29.7.0",
|
|
60
59
|
"jest-environment-jsdom": "^29.7.0",
|
|
61
|
-
"prettier": "^3.
|
|
60
|
+
"prettier": "^3.2.4",
|
|
62
61
|
"ts-jest": "^29.1.1",
|
|
63
62
|
"tslint": "^6.1.3",
|
|
64
63
|
"tslint-config-prettier": "^1.18.0",
|
|
65
|
-
"typedoc": "^0.25.
|
|
64
|
+
"typedoc": "^0.25.7",
|
|
66
65
|
"typedoc-plugin-markdown": "^3.17.1",
|
|
67
|
-
"typescript": "^5.3.
|
|
66
|
+
"typescript": "^5.3.3"
|
|
68
67
|
}
|
|
69
68
|
}
|