@verdocs/js-sdk 6.2.0-beta.2 → 6.2.0-beta.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.
package/dist/index.d.mts CHANGED
@@ -3528,7 +3528,7 @@ declare const toggleTemplateStar: (endpoint: VerdocsEndpoint, templateId: string
3528
3528
  * @apiBody string(format:binary) file Document file to attach. The file name will automatically be used as the document name.
3529
3529
  * @apiSuccess ITemplateDocument . Template document
3530
3530
  */
3531
- declare const createTemplateDocument: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplateDocument>;
3531
+ declare const createTemplateDocument: (endpoint: VerdocsEndpoint, template_id: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplateDocument>;
3532
3532
  /**
3533
3533
  * Delete a specific Document.
3534
3534
  *
package/dist/index.d.ts CHANGED
@@ -3528,7 +3528,7 @@ declare const toggleTemplateStar: (endpoint: VerdocsEndpoint, templateId: string
3528
3528
  * @apiBody string(format:binary) file Document file to attach. The file name will automatically be used as the document name.
3529
3529
  * @apiSuccess ITemplateDocument . Template document
3530
3530
  */
3531
- declare const createTemplateDocument: (endpoint: VerdocsEndpoint, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplateDocument>;
3531
+ declare const createTemplateDocument: (endpoint: VerdocsEndpoint, template_id: string, file: File, onUploadProgress?: (percent: number, loadedBytes: number, totalBytes: number) => void) => Promise<ITemplateDocument>;
3532
3532
  /**
3533
3533
  * Delete a specific Document.
3534
3534
  *
package/dist/index.js CHANGED
@@ -1768,7 +1768,7 @@ const getEnvelopes = (endpoint, params) => endpoint.api //
1768
1768
  * owner of each envelope. The returned ZIP file contains a folder for each envelope.
1769
1769
  */
1770
1770
  const getEnvelopesZip = (endpoint, envelope_ids) => endpoint.api //
1771
- .get(`/v2/envelopes/zip/${envelope_ids.join(',')}`);
1771
+ .get(`/v2/envelopes/zip/${envelope_ids.join(',')}`, { responseType: 'blob', timeout: 120000 });
1772
1772
 
1773
1773
  /**
1774
1774
  * Create an initials block. In a typical signing workflow, the user is asked at the beginning of the process to
@@ -3479,9 +3479,10 @@ const toggleTemplateStar = (endpoint, templateId) => endpoint.api //
3479
3479
  * @apiBody string(format:binary) file Document file to attach. The file name will automatically be used as the document name.
3480
3480
  * @apiSuccess ITemplateDocument . Template document
3481
3481
  */
3482
- const createTemplateDocument = (endpoint, file, onUploadProgress) => {
3482
+ const createTemplateDocument = (endpoint, template_id, file, onUploadProgress) => {
3483
3483
  const formData = new FormData();
3484
3484
  formData.append('document', file, file.name);
3485
+ formData.append('template_id', template_id);
3485
3486
  return endpoint.api //
3486
3487
  .post(`/v2/template-documents`, formData, {
3487
3488
  timeout: 120000,