@verdocs/js-sdk 3.10.3 → 3.10.4

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.
@@ -146,9 +146,14 @@ export declare const getEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string
146
146
  export declare const getEnvelopeDocument: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
147
147
  /**
148
148
  * Get a pre-signed download link for an Envelope Document. This link expires quickly, so it should
149
- * be accessed immediately and never shared.
149
+ * be accessed immediately and never shared. Content-Disposition will be set to "download".
150
150
  */
151
- export declare const getEnvelopeDocumentLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
151
+ export declare const getDocumentDownloadLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
152
+ /**
153
+ * Get a pre-signed preview link for an Envelope Document. This link expires quickly, so it should
154
+ * be accessed immediately and never shared. Content-Disposition will be set to "inline".
155
+ */
156
+ export declare const getDocumentPreviewLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<string>;
152
157
  /**
153
158
  * Cancel an Envelope.
154
159
  */
@@ -155,12 +155,23 @@ export var getEnvelopeDocument = function (endpoint, envelopeId, documentId) { r
155
155
  }); };
156
156
  /**
157
157
  * Get a pre-signed download link for an Envelope Document. This link expires quickly, so it should
158
- * be accessed immediately and never shared.
158
+ * be accessed immediately and never shared. Content-Disposition will be set to "download".
159
159
  */
160
- export var getEnvelopeDocumentLink = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {
160
+ export var getDocumentDownloadLink = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {
161
161
  return __generator(this, function (_a) {
162
162
  return [2 /*return*/, endpoint.api //
163
- .get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "?link=true"))
163
+ .get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "?download=true"))
164
+ .then(function (r) { return r.data; })];
165
+ });
166
+ }); };
167
+ /**
168
+ * Get a pre-signed preview link for an Envelope Document. This link expires quickly, so it should
169
+ * be accessed immediately and never shared. Content-Disposition will be set to "inline".
170
+ */
171
+ export var getDocumentPreviewLink = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {
172
+ return __generator(this, function (_a) {
173
+ return [2 /*return*/, endpoint.api //
174
+ .get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "?preview=true"))
164
175
  .then(function (r) { return r.data; })];
165
176
  });
166
177
  }); };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.10.3",
3
+ "version": "3.10.4",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",