@verdocs/js-sdk 3.10.2 → 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.
@@ -145,9 +145,15 @@ export declare const getEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string
145
145
  */
146
146
  export declare const getEnvelopeDocument: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
147
147
  /**
148
- * Get a (temporary) pre-signed download link for and Envelope Document
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. Content-Disposition will be set to "download".
149
150
  */
150
- export declare const getEnvelopeDocumentLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
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>;
151
157
  /**
152
158
  * Cancel an Envelope.
153
159
  */
@@ -154,12 +154,24 @@ export var getEnvelopeDocument = function (endpoint, envelopeId, documentId) { r
154
154
  });
155
155
  }); };
156
156
  /**
157
- * Get a (temporary) pre-signed download link for and Envelope Document
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. Content-Disposition will be set to "download".
158
159
  */
159
- 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 () {
160
161
  return __generator(this, function (_a) {
161
162
  return [2 /*return*/, endpoint.api //
162
- .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"))
163
175
  .then(function (r) { return r.data; })];
164
176
  });
165
177
  }); };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.10.2",
3
+ "version": "3.10.4",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",