@verdocs/js-sdk 5.1.7 → 5.2.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.d.mts +63 -7
- package/dist/index.d.ts +63 -7
- package/dist/index.js +40 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -11
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1571,15 +1571,17 @@ class VerdocsEndpoint {
|
|
|
1571
1571
|
* ```
|
|
1572
1572
|
*
|
|
1573
1573
|
* @group Envelopes
|
|
1574
|
-
* @api POST /v2/envelopes Create Envelope
|
|
1575
|
-
* @apiBody string(format:uuid) template_id
|
|
1574
|
+
* @api POST /v2/envelopes Create Envelope
|
|
1575
|
+
* @apiBody string(format:uuid) template_id If using a template, the ID of the template to copy
|
|
1576
1576
|
* @apiBody array(items:ICreateEnvelopeRecipient) recipients A list of recipients to include in the workflow. Must specify one recipient to match each template Role.
|
|
1577
|
+
* @apiBody array(items:IEnvelopeDocument) documents? If not using a template, a list of documents to include in the envelope.
|
|
1578
|
+
* @apiBody array(items:IEnvelopeField) fields? If not using a template, a list of fields to include in the envelope.
|
|
1577
1579
|
* @apiBody string name? Override the name of the envelope (defaults to the template name).
|
|
1578
1580
|
* @apiBody string description? Override the description of the envelope (defaults to the template description).
|
|
1579
|
-
* @apiBody array(items:IEnvelopeField) fields? Provide default values for fields in the envelope. Note that only "name", "role_name", and "default" should be set in this array.
|
|
1580
1581
|
* @apiBody boolean no_contact? If set to true, no email or SMS messages will be sent to any recipients.
|
|
1581
1582
|
* @apiBody integer(min: 0) initial_reminder? Override the template initial-reminder setting.
|
|
1582
1583
|
* @apiBody integer(min: 0) followup_reminders? Override the template initial-reminder setting.
|
|
1584
|
+
* @apiBody string expires_at? If set, the envelope will automatically expire (be canceled) at this date and time. Expirations must be at least 1 day in the future.
|
|
1583
1585
|
* @apiSuccess IEnvelope . The newly-created envelope.
|
|
1584
1586
|
*/
|
|
1585
1587
|
const createEnvelope = async (endpoint, request) => endpoint.api //
|
|
@@ -1863,33 +1865,33 @@ const submitKbaChallengeResponse = (endpoint, envelope_id, role_name, responses)
|
|
|
1863
1865
|
* @apiBody array(items:IRecipient) recipients? Ignored unless action is 'prepare'. A list of recipients and their fields to set defaults for.
|
|
1864
1866
|
* @apiSuccess IRecipient . The updated Recipient.
|
|
1865
1867
|
*/
|
|
1866
|
-
const
|
|
1868
|
+
const updateRecipientStatus = async (endpoint, envelope_id, role_name, params) => endpoint.api //
|
|
1867
1869
|
.put(`/envelopes/${envelope_id}/recipients/${role_name}`, params)
|
|
1868
1870
|
.then((r) => r.data);
|
|
1869
1871
|
/**
|
|
1870
1872
|
* Submit an envelope (signing is finished). Note that all fields must be valid/completed for this to succeed.
|
|
1871
1873
|
*/
|
|
1872
|
-
const envelopeRecipientSubmit = (endpoint, envelopeId, roleName) =>
|
|
1874
|
+
const envelopeRecipientSubmit = (endpoint, envelopeId, roleName) => updateRecipientStatus(endpoint, envelopeId, roleName, { action: 'submit' });
|
|
1873
1875
|
/**
|
|
1874
1876
|
* Decline to complete an envelope (signing will not terminated).
|
|
1875
1877
|
*/
|
|
1876
|
-
const envelopeRecipientDecline = (endpoint, envelopeId, roleName) =>
|
|
1878
|
+
const envelopeRecipientDecline = (endpoint, envelopeId, roleName) => updateRecipientStatus(endpoint, envelopeId, roleName, { action: 'decline' });
|
|
1877
1879
|
/**
|
|
1878
1880
|
* Claim / change ownership of an envelope. This is a special-case operation only available in certain workflows.
|
|
1879
1881
|
*/
|
|
1880
|
-
const envelopeRecipientChangeOwner = (endpoint, envelope_id, role_name, email, first_name, last_name) =>
|
|
1882
|
+
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 });
|
|
1881
1883
|
/**
|
|
1882
1884
|
* Agree to electronic signing.
|
|
1883
1885
|
*/
|
|
1884
|
-
const envelopeRecipientAgree = (endpoint, envelopeId, roleName, agreed, disclosure) =>
|
|
1886
|
+
const envelopeRecipientAgree = (endpoint, envelopeId, roleName, agreed, disclosure) => updateRecipientStatus(endpoint, envelopeId, roleName, { action: 'update', agreed, disclosure });
|
|
1885
1887
|
/**
|
|
1886
1888
|
* Change a recipient's name.
|
|
1887
1889
|
*/
|
|
1888
|
-
const envelopeRecipientUpdateName = (endpoint, envelopeId, roleName, first_name, last_name) =>
|
|
1890
|
+
const envelopeRecipientUpdateName = (endpoint, envelopeId, roleName, first_name, last_name) => updateRecipientStatus(endpoint, envelopeId, roleName, { action: 'update', first_name, last_name });
|
|
1889
1891
|
/**
|
|
1890
1892
|
* Change a recipient's name.
|
|
1891
1893
|
*/
|
|
1892
|
-
const envelopeRecipientPrepare = (endpoint, envelopeId, roleName, recipients) =>
|
|
1894
|
+
const envelopeRecipientPrepare = (endpoint, envelopeId, roleName, recipients) => updateRecipientStatus(endpoint, envelopeId, roleName, { action: 'prepare', recipients });
|
|
1893
1895
|
/**
|
|
1894
1896
|
* Begin a signing session for an Envelope. This path requires an invite code, and should generally
|
|
1895
1897
|
* be called with a NON-default Endpoint to avoid conflicting with any active user session the user
|
|
@@ -1979,6 +1981,33 @@ const sendDelegate = (endpoint, envelopeId, roleName) => endpoint.api //
|
|
|
1979
1981
|
const resendInvitation = (endpoint, envelopeId, roleName) => endpoint.api //
|
|
1980
1982
|
.put(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'resend' })
|
|
1981
1983
|
.then((r) => r.data);
|
|
1984
|
+
/**
|
|
1985
|
+
* Update a recipient. NOTE: User interfaces should rate-limit this operation to
|
|
1986
|
+
* avoid spamming recipients. Excessive use of this endpoint may result in Verdocs rate-limiting
|
|
1987
|
+
* the calling application to prevent abuse. This endpoint will return a 200 OK even if the
|
|
1988
|
+
* no_contact flag is set on the envelope (in which case the call will be ignored).
|
|
1989
|
+
*
|
|
1990
|
+
* @group Recipients
|
|
1991
|
+
* @api PATCH /envelopes/:envelope_id/recipients/:role_name Update Recipient
|
|
1992
|
+
* @apiParam string(format:uuid) envelope_id The envelope to operate on.
|
|
1993
|
+
* @apiParam string role_name The role name to update.
|
|
1994
|
+
* @apiBody string first_name? Update the recipient's first name.
|
|
1995
|
+
* @apiBody string last_name? Update the recipient's last name.
|
|
1996
|
+
* @apiBody string email? Update the recipient's email address. Updating this value will trigger a new invitation.
|
|
1997
|
+
* @apiBody string message? Update the recipient's invite message. Updating this value will trigger a new invitation.
|
|
1998
|
+
* @apiBody string phone? Update the recipient's phone number.
|
|
1999
|
+
* @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.
|
|
2000
|
+
* @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.
|
|
2001
|
+
* @apiBody string city? If KBA-based authentication is used, the recipient's city to prefill. May only be changed if the recipient has not already completed KBA-based auth.
|
|
2002
|
+
* @apiBody string state? If KBA-based authentication is used, the recipient's state to prefill. May only be changed if the recipient has not already completed KBA-based auth.
|
|
2003
|
+
* @apiBody string zip? If KBA-based authentication is used, the recipient's zip code to prefill. May only be changed if the recipient has not already completed KBA-based auth.
|
|
2004
|
+
* @apiBody string dob? If KBA-based authentication is used, the recipient's date of birth to prefill. May only be changed if the recipient has not already completed KBA-based auth.
|
|
2005
|
+
* @apiBody string ssn_last_4? If KBA-based authentication is used, the recipient's SSN-last-4 to prefill. May only be changed if the recipient has not already completed KBA-based auth.
|
|
2006
|
+
* @apiSuccess IRecipient . The updated Recipient.
|
|
2007
|
+
*/
|
|
2008
|
+
const updateRecipient = (endpoint, envelopeId, roleName) => endpoint.api //
|
|
2009
|
+
.patch(`/v2/envelopes/${envelopeId}/recipients/${encodeURIComponent(roleName)}`, { action: 'resend' })
|
|
2010
|
+
.then((r) => r.data);
|
|
1982
2011
|
|
|
1983
2012
|
/**
|
|
1984
2013
|
* Various helpers to identify available operations for an envelope by a user.
|
|
@@ -3628,5 +3657,5 @@ const isValidRoleName = (value, roles) => roles.findIndex((role) => role.name ==
|
|
|
3628
3657
|
const TagRegEx = /^[a-zA-Z0-9-]{0,32}$/;
|
|
3629
3658
|
const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag) => tag === value) !== -1;
|
|
3630
3659
|
|
|
3631
|
-
export { ALL_PERMISSIONS, AtoB, Countries, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_WIDTHS, FIELD_TYPES, RolePermissions, VerdocsEndpoint, WEBHOOK_EVENTS, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, collapseEntitlements, convertToE164, createApiKey, createEnvelope, createField, createGroup, createInitials, createOrganization, createOrganizationContact, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateRole, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, deleteApiKey, deleteEnvelopeFieldAttachment, deleteField, deleteGroup, deleteGroupMember, deleteOrganization, deleteOrganizationContact, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateRole, deleteTemplateTag, downloadBlob, 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, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, isPuertoRico, isValidEmail, isValidPhone, isValidRoleName, isValidTag, nameToRGBA, randomString, recipientCanAct, recipientHasAction, refreshToken, rescale, resendInvitation, resendOrganizationInvitation, resendVerification, resetPassword, rotateApiKey, sendDelegate, setWebhooks, sortFields, startSigningSession, submitKbaChallengeResponse, submitKbaIdentity, submitKbaPin, switchProfile, toggleStar, updateApiKey, updateEnvelope, updateEnvelopeField, updateEnvelopeFieldInitials, updateEnvelopeFieldSignature, updateField, updateGroup, updateOrganization, updateOrganizationContact, updateOrganizationInvitation, updateOrganizationLogo, updateOrganizationMember, updateOrganizationThumbnail, updateProfile, updateProfilePhoto, updateRecipient, updateTemplate, updateTemplateRole, uploadEnvelopeFieldAttachment, 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 };
|
|
3660
|
+
export { ALL_PERMISSIONS, AtoB, Countries, DEFAULT_FIELD_HEIGHTS, DEFAULT_FIELD_WIDTHS, FIELD_TYPES, RolePermissions, VerdocsEndpoint, WEBHOOK_EVENTS, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, collapseEntitlements, convertToE164, createApiKey, createEnvelope, createField, createGroup, createInitials, createOrganization, createOrganizationContact, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateRole, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, deleteApiKey, deleteEnvelopeFieldAttachment, deleteField, deleteGroup, deleteGroupMember, deleteOrganization, deleteOrganizationContact, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateRole, deleteTemplateTag, downloadBlob, 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, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, isPuertoRico, isValidEmail, isValidPhone, isValidRoleName, isValidTag, nameToRGBA, randomString, recipientCanAct, recipientHasAction, refreshToken, rescale, resendInvitation, resendOrganizationInvitation, resendVerification, resetPassword, rotateApiKey, sendDelegate, 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, 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 };
|
|
3632
3661
|
//# sourceMappingURL=index.mjs.map
|