@verdocs/js-sdk 3.2.2 → 3.3.1
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.d.ts +1 -1
- package/Envelopes/Envelopes.js +14 -11
- package/package.json +5 -5
package/Envelopes/Envelopes.d.ts
CHANGED
|
@@ -194,7 +194,7 @@ export declare const getEnvelopesByTemplateId: (endpoint: VerdocsEndpoint, templ
|
|
|
194
194
|
* into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
|
|
195
195
|
* for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants.
|
|
196
196
|
*/
|
|
197
|
-
export declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string, page: number) => Promise<string>;
|
|
197
|
+
export declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string, page: number, type?: 'original' | 'filled' | 'certificate') => Promise<string>;
|
|
198
198
|
/**
|
|
199
199
|
* Wrapper for `getEnvelope()` that limits queries to one every 2 seconds per template ID.
|
|
200
200
|
* This is intended for use in component hierarchies that all rely on the same template
|
package/Envelopes/Envelopes.js
CHANGED
|
@@ -255,18 +255,21 @@ export var getEnvelopesByTemplateId = function (endpoint, templateId) { return _
|
|
|
255
255
|
* into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
|
|
256
256
|
* for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants.
|
|
257
257
|
*/
|
|
258
|
-
export var getEnvelopeDocumentPageDisplayUri = function (endpoint, envelopeId, documentId, page
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
258
|
+
export var getEnvelopeDocumentPageDisplayUri = function (endpoint, envelopeId, documentId, page, type) {
|
|
259
|
+
if (type === void 0) { type = 'original'; }
|
|
260
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
261
|
+
return __generator(this, function (_a) {
|
|
262
|
+
return [2 /*return*/, endpoint.api
|
|
263
|
+
.get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "/pages/").concat(page, "/image?type=").concat(type), {
|
|
264
|
+
timeout: 20000,
|
|
265
|
+
'axios-retry': {
|
|
266
|
+
retries: 5,
|
|
267
|
+
},
|
|
268
|
+
})
|
|
269
|
+
.then(function (r) { return r.data; })];
|
|
270
|
+
});
|
|
268
271
|
});
|
|
269
|
-
}
|
|
272
|
+
};
|
|
270
273
|
var cachedEnvelopes = {};
|
|
271
274
|
/**
|
|
272
275
|
* Wrapper for `getEnvelope()` that limits queries to one every 2 seconds per template ID.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdocs/js-sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"homepage": "https://github.com/Verdocs/js-sdk",
|
|
6
6
|
"description": "Verdocs JS SDK",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@jest/globals": "^29.5.0",
|
|
57
|
-
"@types/jest": "^29.
|
|
58
|
-
"axios-mock-adapter": "^1.21.
|
|
57
|
+
"@types/jest": "^29.5.0",
|
|
58
|
+
"axios-mock-adapter": "^1.21.3",
|
|
59
59
|
"jest": "^29.5.0",
|
|
60
|
-
"prettier": "^2.8.
|
|
60
|
+
"prettier": "^2.8.7",
|
|
61
61
|
"ts-jest": "^29.0.5",
|
|
62
62
|
"tslint": "^6.1.3",
|
|
63
63
|
"tslint-config-prettier": "^1.18.0",
|
|
64
|
-
"typedoc": "^0.23.
|
|
64
|
+
"typedoc": "^0.23.28",
|
|
65
65
|
"typedoc-plugin-markdown": "^3.14.0",
|
|
66
66
|
"typescript": "^4.9.5"
|
|
67
67
|
}
|