@verdocs/js-sdk 6.0.1 → 6.0.3
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 +27 -16
- package/dist/index.d.ts +27 -16
- package/dist/index.js +34 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -21
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1604,35 +1604,41 @@ const getEnvelope = async (endpoint, envelopeId) => endpoint.api //
|
|
|
1604
1604
|
* this will return only the **metadata** the caller is allowed to view.
|
|
1605
1605
|
*
|
|
1606
1606
|
* @group Envelope Documents
|
|
1607
|
-
* @api GET /
|
|
1608
|
-
* @apiParam string(format: 'uuid')
|
|
1607
|
+
* @api GET /v2/envelope-documents/:id Get envelope document
|
|
1608
|
+
* @apiParam string(format: 'uuid') document_id The ID of the document to retrieve.
|
|
1609
1609
|
* @apiSuccess IEnvelopeDocument . The detailed metadata for the document requested
|
|
1610
1610
|
*/
|
|
1611
|
-
const getEnvelopeDocument = async (endpoint,
|
|
1612
|
-
.get(`/
|
|
1611
|
+
const getEnvelopeDocument = async (endpoint, _envelopeId, documentId) => endpoint.api //
|
|
1612
|
+
.get(`/v2/envelope-documents/${documentId}`)
|
|
1613
|
+
.then((r) => r.data);
|
|
1614
|
+
/**
|
|
1615
|
+
* Download a document directly.
|
|
1616
|
+
*/
|
|
1617
|
+
const downloadDocument = async (endpoint, _envelopeId, documentId) => endpoint.api //
|
|
1618
|
+
.get(`/v2/envelope-documents/${documentId}?type=file`)
|
|
1613
1619
|
.then((r) => r.data);
|
|
1614
1620
|
/**
|
|
1615
|
-
* Get
|
|
1616
|
-
*
|
|
1621
|
+
* Get an envelope document's metadata, or the document itself. If no "type" parameter is specified,
|
|
1622
|
+
* the document metadata is returned. If "type" is set to "file", the document binary content is
|
|
1623
|
+
* returned with Content-Type set to the MIME type of the file. If "type" is set to "download", a
|
|
1624
|
+
* string download link will be returned. If "type" is set to "preview" a string preview link will
|
|
1625
|
+
* be returned. This link expires quickly, so it should be accessed immediately and never shared.
|
|
1617
1626
|
*
|
|
1618
1627
|
* @group Envelope Documents
|
|
1619
|
-
* @api GET /
|
|
1620
|
-
* @apiParam string(format: 'uuid') envelope_id The ID of the envelope to retrieve.
|
|
1628
|
+
* @api GET /v2/envelope-documents/:document_id Preview, Download, or Link to a Document
|
|
1621
1629
|
* @apiParam string(format: 'uuid') document_id The ID of the document to retrieve.
|
|
1622
|
-
* @apiQuery
|
|
1623
|
-
* @apiQuery boolean preview? Set to true to generate a preview link (content-disposition: inline).
|
|
1624
|
-
* @apiQuery boolean file? Set to true to return the raw binary BLOB data of the file rather than a link.
|
|
1630
|
+
* @apiQuery string(enum:'file'|'download'|'preview') type? Download the file directly, generate a download link, or generate a preview link.
|
|
1625
1631
|
* @apiSuccess string . The generated link.
|
|
1626
1632
|
*/
|
|
1627
|
-
const getDocumentDownloadLink = async (endpoint,
|
|
1628
|
-
.get(`/
|
|
1633
|
+
const getDocumentDownloadLink = async (endpoint, _envelopeId, documentId) => endpoint.api //
|
|
1634
|
+
.get(`/v2/envelope-documents/${documentId}?type=download`)
|
|
1629
1635
|
.then((r) => r.data);
|
|
1630
1636
|
/**
|
|
1631
1637
|
* Get a pre-signed preview link for an Envelope Document. This link expires quickly, so it should
|
|
1632
1638
|
* be accessed immediately and never shared. Content-Disposition will be set to "inline".
|
|
1633
1639
|
*/
|
|
1634
|
-
const getDocumentPreviewLink = async (endpoint,
|
|
1635
|
-
.get(`/
|
|
1640
|
+
const getDocumentPreviewLink = async (endpoint, _envelopeId, documentId) => endpoint.api //
|
|
1641
|
+
.get(`/v2/envelope-documents/${documentId}?type=preview`)
|
|
1636
1642
|
.then((r) => r.data);
|
|
1637
1643
|
/**
|
|
1638
1644
|
* Cancel an Envelope.
|
|
@@ -1807,8 +1813,12 @@ const getEnvelopes = (endpoint, params) => endpoint.api //
|
|
|
1807
1813
|
* create and store an initials block. Thereafter, the ID of the initials block may be re-used for each initials field
|
|
1808
1814
|
* to be "stamped" by the user.
|
|
1809
1815
|
*
|
|
1816
|
+
* Note: Both "guest" signers and authenticated users can create initials blocks. Guest signers
|
|
1817
|
+
* typically only ever have one, tied to that session. But authenticated users can create more than
|
|
1818
|
+
* one, and can use them interchangeably.
|
|
1819
|
+
*
|
|
1810
1820
|
* @group Signatures and Initials
|
|
1811
|
-
* @api POST /initials Create Initial Block
|
|
1821
|
+
* @api POST /v2/profiles/initials Create Initial Block
|
|
1812
1822
|
* @apiBody string initial Blob containing initials image to store.
|
|
1813
1823
|
* @apiSuccess IInitial . The newly-created initial block.
|
|
1814
1824
|
*/
|
|
@@ -1816,7 +1826,7 @@ const createInitials = (endpoint, name, initials) => {
|
|
|
1816
1826
|
const data = new FormData();
|
|
1817
1827
|
data.append('initial', initials, name);
|
|
1818
1828
|
return endpoint.api //
|
|
1819
|
-
.post(`/initials`, data)
|
|
1829
|
+
.post(`/v2/profiles/initials`, data)
|
|
1820
1830
|
.then((r) => r.data);
|
|
1821
1831
|
};
|
|
1822
1832
|
|
|
@@ -2109,9 +2119,12 @@ const getNextRecipient = (envelope) => {
|
|
|
2109
2119
|
* create and store a signature block. Thereafter, the ID of the signature block may be re-used for each signature field
|
|
2110
2120
|
* to be "stamped" by the user.
|
|
2111
2121
|
*
|
|
2112
|
-
*
|
|
2113
|
-
*
|
|
2122
|
+
* Note: Both "guest" signers and authenticated users can create initials blocks. Guest signers
|
|
2123
|
+
* typically only ever have one, tied to that session. But authenticated users can create more than
|
|
2124
|
+
* one, and can use them interchangeably.
|
|
2114
2125
|
*
|
|
2126
|
+
* @group Signatures and Initials
|
|
2127
|
+
* @api POST /v2/profiles/signatures Create Signature Block
|
|
2115
2128
|
* @apiBody string signature Blob containing signature image to store.
|
|
2116
2129
|
* @apiSuccess ISignature . The newly-created signature block.
|
|
2117
2130
|
*/
|
|
@@ -2119,7 +2132,7 @@ const createSignature = (endpoint, name, signature) => {
|
|
|
2119
2132
|
const data = new FormData();
|
|
2120
2133
|
data.append('signature', signature, name);
|
|
2121
2134
|
return endpoint.api //
|
|
2122
|
-
.post(`/signatures`, data)
|
|
2135
|
+
.post(`/v2/profiles/signatures`, data)
|
|
2123
2136
|
.then((r) => r.data);
|
|
2124
2137
|
};
|
|
2125
2138
|
/**
|
|
@@ -3678,5 +3691,5 @@ const isValidRoleName = (value, roles) => roles.findIndex((role) => role.name ==
|
|
|
3678
3691
|
const TagRegEx = /^[a-zA-Z0-9-]{0,32}$/;
|
|
3679
3692
|
const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag) => tag === value) !== -1;
|
|
3680
3693
|
|
|
3681
|
-
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, delegateRecipient, 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, 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 };
|
|
3694
|
+
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, 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, 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, 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 };
|
|
3682
3695
|
//# sourceMappingURL=index.mjs.map
|