@verdocs/js-sdk 6.2.0-beta.8 → 6.2.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/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,
@@ -2703,7 +2704,7 @@ const envelopeRecipientDecline = (endpoint, envelopeId, roleName) => endpoint.ap
2703
2704
  * @apiSuccess IRecipient . The updated Recipient.
2704
2705
  */
2705
2706
  const envelopeRecipientSubmit = (endpoint, envelopeId, roleName) => endpoint.api //
2706
- .put(`/v2/envelopes/${envelopeId}/recipients/${roleName}/submit`)
2707
+ .post(`/v2/envelopes/${envelopeId}/recipients/${roleName}/submit`)
2707
2708
  .then((r) => r.data);
2708
2709
  /**
2709
2710
  * Begin a signing session for an Envelope. This path requires an invite code, and should generally
@@ -2794,7 +2795,7 @@ const verifySigner = (endpoint, params) => endpoint.api //
2794
2795
  * @apiSuccess string . Success message.
2795
2796
  */
2796
2797
  const delegateRecipient = (endpoint, envelopeId, roleName, params) => endpoint.api //
2797
- .put(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'delegate', ...params })
2798
+ .post(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}/delegate`, params)
2798
2799
  .then((r) => r.data);
2799
2800
  /**
2800
2801
  * Update a recipient. NOTE: User interfaces should rate-limit this operation to avoid spamming recipients.