@verdocs/js-sdk 6.0.2 → 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 +17 -13
- package/dist/index.d.ts +17 -13
- package/dist/index.js +22 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -16
- 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
1613
|
.then((r) => r.data);
|
|
1614
1614
|
/**
|
|
1615
|
-
*
|
|
1616
|
-
|
|
1615
|
+
* Download a document directly.
|
|
1616
|
+
*/
|
|
1617
|
+
const downloadDocument = async (endpoint, _envelopeId, documentId) => endpoint.api //
|
|
1618
|
+
.get(`/v2/envelope-documents/${documentId}?type=file`)
|
|
1619
|
+
.then((r) => r.data);
|
|
1620
|
+
/**
|
|
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.
|
|
@@ -3685,5 +3691,5 @@ const isValidRoleName = (value, roles) => roles.findIndex((role) => role.name ==
|
|
|
3685
3691
|
const TagRegEx = /^[a-zA-Z0-9-]{0,32}$/;
|
|
3686
3692
|
const isValidTag = (value, tags) => TagRegEx.test(value) || tags.findIndex((tag) => tag === value) !== -1;
|
|
3687
3693
|
|
|
3688
|
-
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 };
|
|
3689
3695
|
//# sourceMappingURL=index.mjs.map
|