@verdocs/js-sdk 5.3.5 → 5.4.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.d.mts CHANGED
@@ -973,7 +973,7 @@ type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "prepare
973
973
  // Modification events have a string description
974
974
  type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
975
975
  type TFieldType = "signature" | "initial" | "checkbox" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
976
- type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
976
+ type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "recipient_delegated" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
977
977
  type TTemplateVisibility = "private" | "shared" | "public";
978
978
  type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
979
979
  /**
@@ -1974,9 +1974,9 @@ declare const envelopeRecipientDecline: (endpoint: VerdocsEndpoint, envelopeId:
1974
1974
  */
1975
1975
  declare const envelopeRecipientChangeOwner: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, email: string, first_name: string, last_name: string) => Promise<IRecipient>;
1976
1976
  /**
1977
- * Agree to electronic signing.
1977
+ * Agree to electronic signing disclosures.
1978
1978
  */
1979
- declare const envelopeRecipientAgree: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, agreed: boolean, disclosures?: string) => Promise<IRecipient>;
1979
+ declare const envelopeRecipientAgree: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, disclosures?: string) => Promise<IRecipient>;
1980
1980
  /**
1981
1981
  * Change a recipient's name.
1982
1982
  */
package/dist/index.d.ts CHANGED
@@ -973,7 +973,7 @@ type TEventDetail = "in_app" | "mail" | "signer" | "sms" | "reminder" | "prepare
973
973
  // Modification events have a string description
974
974
  type TEnvelopeUpdateResult = Omit<IEnvelope, "histories" | "recipients" | "certificate" | "document" | "fields" | "profile">;
975
975
  type TFieldType = "signature" | "initial" | "checkbox" | "radio" | "textbox" | "timestamp" | "date" | "dropdown" | "textarea" | "attachment" | "payment";
976
- type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
976
+ type TWebhookEvent = "envelope_created" | "envelope_completed" | "envelope_canceled" | "envelope_updated" | "envelope_expired" | "recipient_delegated" | "template_created" | "template_updated" | "template_deleted" | "template_used" | "entitlement_used";
977
977
  type TTemplateVisibility = "private" | "shared" | "public";
978
978
  type TEntitlement = "envelope" | "kba_auth" | "passcode_auth" | "sms_auth" | "kba_id_auth" | "id_auth" | "custom_disclaimer";
979
979
  /**
@@ -1974,9 +1974,9 @@ declare const envelopeRecipientDecline: (endpoint: VerdocsEndpoint, envelopeId:
1974
1974
  */
1975
1975
  declare const envelopeRecipientChangeOwner: (endpoint: VerdocsEndpoint, envelope_id: string, role_name: string, email: string, first_name: string, last_name: string) => Promise<IRecipient>;
1976
1976
  /**
1977
- * Agree to electronic signing.
1977
+ * Agree to electronic signing disclosures.
1978
1978
  */
1979
- declare const envelopeRecipientAgree: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, agreed: boolean, disclosures?: string) => Promise<IRecipient>;
1979
+ declare const envelopeRecipientAgree: (endpoint: VerdocsEndpoint, envelopeId: string, roleName: string, disclosures?: string) => Promise<IRecipient>;
1980
1980
  /**
1981
1981
  * Change a recipient's name.
1982
1982
  */
package/dist/index.js CHANGED
@@ -1883,9 +1883,11 @@ const envelopeRecipientDecline = (endpoint, envelopeId, roleName) => updateRecip
1883
1883
  */
1884
1884
  const envelopeRecipientChangeOwner = (endpoint, envelope_id, role_name, email, first_name, last_name) => updateRecipientStatus(endpoint, envelope_id, role_name, { action: 'owner_update', email, first_name, last_name });
1885
1885
  /**
1886
- * Agree to electronic signing.
1886
+ * Agree to electronic signing disclosures.
1887
1887
  */
1888
- const envelopeRecipientAgree = (endpoint, envelopeId, roleName, agreed, disclosures) => updateRecipientStatus(endpoint, envelopeId, roleName, { action: 'update', agreed, disclosures });
1888
+ const envelopeRecipientAgree = (endpoint, envelopeId, roleName, disclosures) => endpoint.api //
1889
+ .put(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'accept', disclosures })
1890
+ .then((r) => r.data);
1889
1891
  /**
1890
1892
  * Change a recipient's name.
1891
1893
  */