@verdocs/js-sdk 6.0.4 → 6.1.0

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
@@ -1973,23 +1973,6 @@ const getInPersonLink = (endpoint, envelope_id, role_name) => endpoint.api //
1973
1973
  const verifySigner = (endpoint, params) => endpoint.api //
1974
1974
  .post(`/v2/sign/verify`, params)
1975
1975
  .then((r) => r.data);
1976
- // TODO: Use "oneOf" to describe the unions of these two calls.
1977
- /**
1978
- * Resend a recipient's invitation. NOTE: User interfaces should rate-limit this operation to
1979
- * avoid spamming recipients. Excessive use of this endpoint may result in Verdocs rate-limiting
1980
- * the calling application to prevent abuse. This endpoint will return a 200 OK even if the
1981
- * no_contact flag is set on the envelope (in which case the call will be ignored).
1982
- *
1983
- * @group Recipients
1984
- * @api PUT /v2/envelopes/:envelope_id/recipients/:role_name Resend Invitation
1985
- * @apiParam string(format:uuid) envelope_id The envelope to operate on.
1986
- * @apiParam string role_name The role to operate on.
1987
- * @apiBody string(enum:'resend') action The operation to perform (resend).
1988
- * @apiSuccess string . Success message.
1989
- */
1990
- const resendInvitation = (endpoint, envelopeId, roleName) => endpoint.api //
1991
- .put(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'resend' })
1992
- .then((r) => r.data);
1993
1976
  /**
1994
1977
  * Delegate a recipient's signing responsibility. The envelope sender must enable this before the
1995
1978
  * recipient calls this endpoint, and only the recipient may call it, or the call will be rejected.
@@ -2015,19 +1998,20 @@ const delegateRecipient = (endpoint, envelopeId, roleName, params) => endpoint.a
2015
1998
  .put(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'delegate', ...params })
2016
1999
  .then((r) => r.data);
2017
2000
  /**
2018
- * Update a recipient. NOTE: User interfaces should rate-limit this operation to
2019
- * avoid spamming recipients. Excessive use of this endpoint may result in Verdocs rate-limiting
2020
- * the calling application to prevent abuse. This endpoint will return a 200 OK even if the
2021
- * no_contact flag is set on the envelope (in which case the call will be ignored).
2001
+ * Update a recipient. NOTE: User interfaces should rate-limit this operation to avoid spamming recipients.
2002
+ * Excessive use of this endpoint may result in Verdocs rate-limiting the calling application to prevent
2003
+ * abuse. This endpoint will return a 200 OK even if the no_contact flag is set on the envelope (in which
2004
+ * case the call will be silently ignored).
2022
2005
  *
2023
2006
  * @group Recipients
2024
2007
  * @api PATCH /envelopes/:envelope_id/recipients/:role_name Update Recipient
2025
2008
  * @apiParam string(format:uuid) envelope_id The envelope to operate on.
2026
2009
  * @apiParam string role_name The role name to update.
2010
+ * @apiBody string(enum:'remind'|'reset') action? Trigger a reminder, or fully reset the recipient
2027
2011
  * @apiBody string first_name? Update the recipient's first name.
2028
2012
  * @apiBody string last_name? Update the recipient's last name.
2029
- * @apiBody string email? Update the recipient's email address. Updating this value will trigger a new invitation.
2030
- * @apiBody string message? Update the recipient's invite message. Updating this value will trigger a new invitation.
2013
+ * @apiBody string email? Update the recipient's email address.
2014
+ * @apiBody string message? Update the recipient's invite message.
2031
2015
  * @apiBody string phone? Update the recipient's phone number.
2032
2016
  * @apiBody string passcode? If passcode authentication is used, the recipient's address to prefill. May only be changed if the recipient has not already completed passcode-based auth.
2033
2017
  * @apiBody string address? If KBA-based authentication is used, the recipient's address to prefill. May only be changed if the recipient has not already completed KBA-based auth.
@@ -2041,6 +2025,21 @@ const delegateRecipient = (endpoint, envelopeId, roleName, params) => endpoint.a
2041
2025
  const updateRecipient = (endpoint, envelopeId, roleName, params) => endpoint.api //
2042
2026
  .patch(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, params)
2043
2027
  .then((r) => r.data);
2028
+ /**
2029
+ * Send a reminder to a recipient. The recipient must still be an active member of the signing flow
2030
+ * (e.g. not declined, already submitted, etc.)
2031
+ */
2032
+ const remindRecipient = (endpoint, envelopeId, roleName) => endpoint.api //
2033
+ .patch(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'remind' })
2034
+ .then((r) => r.data);
2035
+ /**
2036
+ * Fully reset a recipient. This allows the recipient to restart failed KBA flows, change
2037
+ * fields they may have filled in incorrectly while signing, etc. This cannot be used on a
2038
+ * canceled or completed envelope, but may be used to restart an envelope marked declined.
2039
+ */
2040
+ const resetRecipient = (endpoint, envelopeId, roleName) => endpoint.api //
2041
+ .patch(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'reset' })
2042
+ .then((r) => r.data);
2044
2043
 
2045
2044
  /**
2046
2045
  * Various helpers to identify available operations for an envelope by a user.
@@ -3709,5 +3708,5 @@ const isValidRoleName = (value, roles) => roles.findIndex((role) => role.name ==
3709
3708
  const TagRegEx = /^[a-zA-Z0-9-]{0,32}$/;
3710
3709
  const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag) => tag === value) !== -1;
3711
3710
 
3712
- export { ALL_PERMISSIONS, AtoB, Countries, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_WIDTHS, FIELD_TYPES, RolePermissions, VerdocsEndpoint, WEBHOOK_EVENTS, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canAccessEnvelope, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, collapseEntitlements, convertToE164, createApiKey, createEnvelope, createField, createGroup, createInitials, createOrganization, createOrganizationContact, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateRole, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, delegateRecipient, deleteApiKey, deleteEnvelopeFieldAttachment, deleteField, deleteGroup, deleteGroupMember, deleteOrganization, deleteOrganizationContact, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateRole, deleteTemplateTag, downloadBlob, downloadDocument, duplicateTemplate, envelopeIsActive, envelopeIsComplete, envelopeRecipientAgree, envelopeRecipientChangeOwner, envelopeRecipientDecline, envelopeRecipientPrepare, envelopeRecipientSubmit, envelopeRecipientUpdateName, fileToDataUrl, formatFullName, formatInitials, formatShortTimeAgo, fullNameToInitials, getActiveEntitlements, getAllTags, getApiKeys, getCountryByCode, getCurrentProfile, getDocumentDownloadLink, getDocumentPreviewLink, getEntitlements, getEnvelope, getEnvelopeDocument, getEnvelopeDocumentPageDisplayUri, getEnvelopeFile, getEnvelopes, getFieldAttachment, getFieldsForRole, getGroup, getGroups, getInPersonLink, getKbaStep, getMatchingCountry, getMyUser, getNextRecipient, getNotifications, getOrganization, getOrganizationChildren, getOrganizationContacts, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers, getOrganizationUsage, getPlusOneCountry, getProfiles, getRGB, getRGBA, getRLeft, getRTop, getRValue, getRecipientsWithActions, getRoleColor, getSignature, getSignatures, getStars, getTag, getTemplate, getTemplateDocument, getTemplateDocumentFile, getTemplateDocumentPageDisplayUri, getTemplateDocumentThumbnail, getTemplateDocuments, getTemplateTags, getTemplates, getValidator, getValidators, getWebhooks, hasRequiredPermissions, integerSequence, isAmericanSamoa, isCanada, isDominicanRepublic, isEnvelopeOwner, isEnvelopeRecipient, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, isPuertoRico, isValidEmail, isValidPhone, isValidRoleName, isValidTag, nameToRGBA, randomString, recipientCanAct, recipientHasAction, refreshToken, rescale, resendInvitation, resendOrganizationInvitation, resendVerification, resetPassword, rotateApiKey, setWebhooks, sortFields, startSigningSession, submitKbaChallengeResponse, submitKbaIdentity, submitKbaPin, switchProfile, toggleStar, updateApiKey, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldInitials, updateEnvelopeFieldSignature, updateField, updateGroup, updateOrganization, updateOrganizationContact, updateOrganizationInvitation, updateOrganizationLogo, updateOrganizationMember, updateOrganizationThumbnail, updateProfile, updateProfilePhoto, updateRecipient, updateRecipientStatus, updateTemplate, updateTemplateRole, uploadEnvelopeFieldAttachment, useCanAccessEnvelope, userCanAct, userCanBuildTemplate, userCanCancelEnvelope, userCanChangeOrgVisibility, userCanCreateOrgTemplate, userCanCreatePersonalTemplate, userCanCreatePublicTemplate, userCanCreateTemplate, userCanDeleteTemplate, userCanFinishEnvelope, userCanMakeTemplatePrivate, userCanMakeTemplatePublic, userCanMakeTemplateShared, userCanPreviewTemplate, userCanReadTemplate, userCanSendTemplate, userCanSignNow, userCanUpdateTemplate, userHasPermissions, userHasSharedTemplate, userIsEnvelopeOwner, userIsEnvelopeRecipient, userIsTemplateCreator, verifyEmail, verifySigner };
3711
+ export { ALL_PERMISSIONS, AtoB, Countries, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_WIDTHS, FIELD_TYPES, RolePermissions, VerdocsEndpoint, WEBHOOK_EVENTS, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canAccessEnvelope, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, collapseEntitlements, convertToE164, createApiKey, createEnvelope, createField, createGroup, createInitials, createOrganization, createOrganizationContact, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateRole, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, delegateRecipient, deleteApiKey, deleteEnvelopeFieldAttachment, deleteField, deleteGroup, deleteGroupMember, deleteOrganization, deleteOrganizationContact, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateRole, deleteTemplateTag, downloadBlob, downloadDocument, duplicateTemplate, envelopeIsActive, envelopeIsComplete, envelopeRecipientAgree, envelopeRecipientChangeOwner, envelopeRecipientDecline, envelopeRecipientPrepare, envelopeRecipientSubmit, envelopeRecipientUpdateName, fileToDataUrl, formatFullName, formatInitials, formatShortTimeAgo, fullNameToInitials, getActiveEntitlements, getAllTags, getApiKeys, getCountryByCode, getCurrentProfile, getDocumentDownloadLink, getDocumentPreviewLink, getEntitlements, getEnvelope, getEnvelopeDocument, getEnvelopeDocumentPageDisplayUri, getEnvelopeFile, getEnvelopes, getFieldAttachment, getFieldsForRole, getGroup, getGroups, getInPersonLink, getKbaStep, getMatchingCountry, getMyUser, getNextRecipient, getNotifications, getOrganization, getOrganizationChildren, getOrganizationContacts, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers, getOrganizationUsage, getPlusOneCountry, getProfiles, getRGB, getRGBA, getRLeft, getRTop, getRValue, getRecipientsWithActions, getRoleColor, getSignature, getSignatures, getStars, getTag, getTemplate, getTemplateDocument, getTemplateDocumentFile, getTemplateDocumentPageDisplayUri, getTemplateDocumentThumbnail, getTemplateDocuments, getTemplateTags, getTemplates, getValidator, getValidators, getWebhooks, hasRequiredPermissions, integerSequence, isAmericanSamoa, isCanada, isDominicanRepublic, isEnvelopeOwner, isEnvelopeRecipient, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, isPuertoRico, isValidEmail, isValidPhone, isValidRoleName, isValidTag, nameToRGBA, randomString, recipientCanAct, recipientHasAction, refreshToken, remindRecipient, rescale, resendOrganizationInvitation, resendVerification, resetPassword, resetRecipient, rotateApiKey, setWebhooks, sortFields, startSigningSession, submitKbaChallengeResponse, submitKbaIdentity, submitKbaPin, switchProfile, toggleStar, updateApiKey, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldInitials, updateEnvelopeFieldSignature, updateField, updateGroup, updateOrganization, updateOrganizationContact, updateOrganizationInvitation, updateOrganizationLogo, updateOrganizationMember, updateOrganizationThumbnail, updateProfile, updateProfilePhoto, updateRecipient, updateRecipientStatus, updateTemplate, updateTemplateRole, uploadEnvelopeFieldAttachment, useCanAccessEnvelope, userCanAct, userCanBuildTemplate, userCanCancelEnvelope, userCanChangeOrgVisibility, userCanCreateOrgTemplate, userCanCreatePersonalTemplate, userCanCreatePublicTemplate, userCanCreateTemplate, userCanDeleteTemplate, userCanFinishEnvelope, userCanMakeTemplatePrivate, userCanMakeTemplatePublic, userCanMakeTemplateShared, userCanPreviewTemplate, userCanReadTemplate, userCanSendTemplate, userCanSignNow, userCanUpdateTemplate, userHasPermissions, userHasSharedTemplate, userIsEnvelopeOwner, userIsEnvelopeRecipient, userIsTemplateCreator, verifyEmail, verifySigner };
3713
3712
  //# sourceMappingURL=index.mjs.map