@verdocs/js-sdk 6.2.0-beta.6 → 6.2.0-beta.9

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.mjs CHANGED
@@ -1686,8 +1686,8 @@ const updateEnvelope = async (endpoint, envelopeId, params) => endpoint.api //
1686
1686
  * @apiBody value . Value to set.
1687
1687
  * @apiSuccess IEnvelopeField . A copy of the newly-updated field.
1688
1688
  */
1689
- const updateEnvelopeField = async (endpoint, envelopeId, roleName, fieldName, value) => endpoint.api //
1690
- .put(`/v2/envelopes/${envelopeId}/recipients/${roleName}/fields/${fieldName}`, { value })
1689
+ const updateEnvelopeField = async (endpoint, envelopeId, roleName, fieldName, value, prepared) => endpoint.api //
1690
+ .put(`/v2/envelopes/${envelopeId}/recipients/${roleName}/fields/${fieldName}`, { value, prepared })
1691
1691
  .then((r) => r.data);
1692
1692
  /**
1693
1693
  * Upload an attachment to an attachment field.
@@ -1695,6 +1695,7 @@ const updateEnvelopeField = async (endpoint, envelopeId, roleName, fieldName, va
1695
1695
  const uploadEnvelopeFieldAttachment = async (endpoint, envelopeId, roleName, fieldName, file, onUploadProgress) => {
1696
1696
  const formData = new FormData();
1697
1697
  formData.append('document', file, file.name);
1698
+ formData.append('value', '');
1698
1699
  return endpoint.api //
1699
1700
  .put(`/v2/envelopes/${envelopeId}/recipients/${roleName}/fields/${fieldName}`, formData, {
1700
1701
  timeout: 120000,
@@ -2438,7 +2439,7 @@ const toggleTemplateStar = (endpoint, templateId) => endpoint.api //
2438
2439
  * ```typescript
2439
2440
  * import {TemplateDocument} from '@verdocs/js-sdk/Templates';
2440
2441
  *
2441
- * await TemplateDocument.createDocument((VerdocsEndpoint.getDefault(), templateID, params);
2442
+ * await TemplateDocument.createDocument(VerdocsEndpoint.getDefault(), templateID, params);
2442
2443
  * ```
2443
2444
  *
2444
2445
  * @group Template Documents
@@ -2466,17 +2467,17 @@ const createTemplateDocument = (endpoint, template_id, file, onUploadProgress) =
2466
2467
  * Delete a specific Document.
2467
2468
  *
2468
2469
  * ```typescript
2469
- * import {TemplateDocument} from '@verdocs/js-sdk/Templates';
2470
+ * import {deleteTemplateDocument} from '@verdocs/js-sdk/Templates';
2470
2471
  *
2471
- * await TemplateDocument.deleteDocument((VerdocsEndpoint.getDefault(), templateID, documentID);
2472
+ * await deleteTemplateDocument(VerdocsEndpoint.getDefault(), documentID);
2472
2473
  * ```
2473
2474
  *
2474
2475
  * @group Template Documents
2475
- * @api DELETE /v2/templates/:temlate_id/documents/:document_id Delete a template document
2476
+ * @api DELETE /v2/template-documents/:document_id Delete a template document
2476
2477
  * @apiSuccess string . Success
2477
2478
  */
2478
- const deleteTemplateDocument = (endpoint, templateId, documentId) => endpoint.api //
2479
- .delete(`/v2/templates/${templateId}/documents/${documentId}`)
2479
+ const deleteTemplateDocument = (endpoint, documentId) => endpoint.api //
2480
+ .delete(`/v2/template-documents/${documentId}`)
2480
2481
  .then((r) => r.data);
2481
2482
  /**
2482
2483
  * Get all metadata for a template document. Note that when called by non-creators (e.g. Org Collaborators)