@verdocs/js-sdk 4.1.10 → 4.1.12
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 +301 -264
- package/dist/index.d.ts +301 -264
- package/dist/index.js +54 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +53 -20
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1722,27 +1722,61 @@ const updateGroup = (endpoint, groupId, params) => endpoint.api //
|
|
|
1722
1722
|
*
|
|
1723
1723
|
* @module
|
|
1724
1724
|
*/
|
|
1725
|
+
/**
|
|
1726
|
+
* Get a list of invitations pending for the caller's organization. The caller must be an admin or owner.
|
|
1727
|
+
*/
|
|
1725
1728
|
const getOrganizationInvitations = (endpoint) => endpoint.api //
|
|
1726
1729
|
.get(`/v2/organization-invitations`)
|
|
1727
1730
|
.then((r) => r.data);
|
|
1731
|
+
/**
|
|
1732
|
+
* Invite a new user to join the organization.
|
|
1733
|
+
*/
|
|
1728
1734
|
const createOrganizationInvitation = (endpoint, params) => endpoint.api //
|
|
1729
1735
|
.post(`/v2/organization-invitations`, params)
|
|
1730
1736
|
.then((r) => r.data);
|
|
1737
|
+
/**
|
|
1738
|
+
* Delete an invitation. Note that no cancellation message will be sent. Invitations are also one-time-use.
|
|
1739
|
+
* If the invitee attempts to join after the invitation is deleted, accepted, or decline, they will be
|
|
1740
|
+
* shown an error.
|
|
1741
|
+
*/
|
|
1731
1742
|
const deleteOrganizationInvitation = (endpoint, email) => endpoint.api //
|
|
1732
1743
|
.delete(`/v2/organization-invitations/${email}`)
|
|
1733
1744
|
.then((r) => r.data);
|
|
1745
|
+
/**
|
|
1746
|
+
* Update an invitation. Note that email may not be changed after the invite is sent. To change
|
|
1747
|
+
* an invitee's email, delete the incorrect entry and create one with the correct value.
|
|
1748
|
+
*/
|
|
1734
1749
|
const updateOrganizationInvitation = (endpoint, email, params) => endpoint.api //
|
|
1735
1750
|
.patch(`/v2/organization-invitations/${email}`, params)
|
|
1736
1751
|
.then((r) => r.data);
|
|
1752
|
+
/**
|
|
1753
|
+
* Send a reminder to the invitee to join the organization.
|
|
1754
|
+
*/
|
|
1737
1755
|
const resendOrganizationInvitation = (endpoint, email) => endpoint.api //
|
|
1738
1756
|
.post('/v2/organization-invitations/resend', { email })
|
|
1739
1757
|
.then((r) => r.data);
|
|
1758
|
+
/**
|
|
1759
|
+
* Get an invitation's details. This is generally used as the first step of accepting the invite.
|
|
1760
|
+
* A successful response will indicate that the invite token is still valid, and include some
|
|
1761
|
+
* metadata for the organization to style the acceptance screen.
|
|
1762
|
+
*/
|
|
1740
1763
|
const getOrganizationInvitation = (endpoint, email, token) => endpoint.api //
|
|
1741
1764
|
.get(`/v2/organization-invitations/${email}/${token}`)
|
|
1742
1765
|
.then((r) => r.data);
|
|
1766
|
+
/**
|
|
1767
|
+
* Accept an invitation. This will automatically create an Auth0 user for the caller as well as a profile
|
|
1768
|
+
* with the appropriate role as specified in the invite. The profile will be set as "current" for the caller,
|
|
1769
|
+
* and session tokens will be returned to access the new profile. The profile's email_verified flag will
|
|
1770
|
+
* also be set to true.
|
|
1771
|
+
*/
|
|
1743
1772
|
const acceptOrganizationInvitation = (endpoint, email, token) => endpoint.api //
|
|
1744
1773
|
.post('/v2/organization-invitations/accept', { email, token })
|
|
1745
1774
|
.then((r) => r.data);
|
|
1775
|
+
/**
|
|
1776
|
+
* Decline an invitation. This will mark the status "declined," providing a visual indication to the
|
|
1777
|
+
* organization's admins that the invite was declined, preventing further invites from being created
|
|
1778
|
+
* to the same email address, and also preventing the invitee from receiving reminders to join.
|
|
1779
|
+
*/
|
|
1746
1780
|
const declineOrganizationInvitation = (endpoint, email, token) => endpoint.api //
|
|
1747
1781
|
.post('/v2/organization-invitations/decline', { email, token })
|
|
1748
1782
|
.then((r) => r.data);
|
|
@@ -1752,12 +1786,22 @@ const declineOrganizationInvitation = (endpoint, email, token) => endpoint.api /
|
|
|
1752
1786
|
*
|
|
1753
1787
|
* @module
|
|
1754
1788
|
*/
|
|
1789
|
+
/**
|
|
1790
|
+
* Get a list of the members in the caller's organization.
|
|
1791
|
+
*/
|
|
1755
1792
|
const getOrganizationMembers = (endpoint) => endpoint.api //
|
|
1756
1793
|
.get(`/v2/organization-members`)
|
|
1757
1794
|
.then((r) => r.data);
|
|
1795
|
+
/**
|
|
1796
|
+
* Delete a member from the caller's organization. Note that the caller must be an admin or owner,
|
|
1797
|
+
* may not delete him/herself
|
|
1798
|
+
*/
|
|
1758
1799
|
const deleteOrganizationMember = (endpoint, profileId) => endpoint.api //
|
|
1759
1800
|
.delete(`/v2/organization-members/${profileId}`)
|
|
1760
1801
|
.then((r) => r.data);
|
|
1802
|
+
/**
|
|
1803
|
+
* Update a member.
|
|
1804
|
+
*/
|
|
1761
1805
|
const updateOrganizationMember = (endpoint, profileId, params) => endpoint.api //
|
|
1762
1806
|
.patch(`/v2/organization-members/${profileId}`, params)
|
|
1763
1807
|
.then((r) => r.data);
|
|
@@ -1776,19 +1820,8 @@ const updateOrganizationMember = (endpoint, profileId, params) => endpoint.api /
|
|
|
1776
1820
|
* @module
|
|
1777
1821
|
*/
|
|
1778
1822
|
/**
|
|
1779
|
-
* Get
|
|
1780
|
-
*
|
|
1781
|
-
* ```typescript
|
|
1782
|
-
* import {getOrganizations} from '@verdocs/js-sdk';
|
|
1783
|
-
*
|
|
1784
|
-
* const organizations = await getOrganizations(VerdocsEndpoint.getDefault());
|
|
1785
|
-
* ```
|
|
1786
|
-
*/
|
|
1787
|
-
const getOrganizations = (endpoint) => endpoint.api //
|
|
1788
|
-
.get('/v2/organizations')
|
|
1789
|
-
.then((r) => r.data);
|
|
1790
|
-
/**
|
|
1791
|
-
* Get an organization by ID.
|
|
1823
|
+
* Get an organization by ID. Note that this endpoint will return only a subset of fields
|
|
1824
|
+
* if the caller is not a member of the organization (the public fields).
|
|
1792
1825
|
*
|
|
1793
1826
|
* ```typescript
|
|
1794
1827
|
* import {getOrganization} from '@verdocs/js-sdk';
|
|
@@ -1815,12 +1848,12 @@ const updateOrganization = (endpoint, organizationId, params) => endpoint.api //
|
|
|
1815
1848
|
* Update the organization's logo. This can only be called by an admin or owner.
|
|
1816
1849
|
*
|
|
1817
1850
|
* ```typescript
|
|
1818
|
-
* import {
|
|
1851
|
+
* import {updateOrganizationLogo} from '@verdocs/js-sdk';
|
|
1819
1852
|
*
|
|
1820
|
-
* await
|
|
1853
|
+
* await updateOrganizationLogo((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1821
1854
|
* ```
|
|
1822
1855
|
*/
|
|
1823
|
-
const
|
|
1856
|
+
const updateOrganizationLogo = (endpoint, organizationId, file, onUploadProgress) => {
|
|
1824
1857
|
const formData = new FormData();
|
|
1825
1858
|
formData.append('logo', file, file.name);
|
|
1826
1859
|
return endpoint.api //
|
|
@@ -1838,12 +1871,12 @@ const uploadOrganizationLogo = (endpoint, organizationId, file, onUploadProgress
|
|
|
1838
1871
|
* Update the organization's thumbnail. This can only be called by an admin or owner.
|
|
1839
1872
|
*
|
|
1840
1873
|
* ```typescript
|
|
1841
|
-
* import {
|
|
1874
|
+
* import {updateOrganizationThumbnail} from '@verdocs/js-sdk';
|
|
1842
1875
|
*
|
|
1843
|
-
* await
|
|
1876
|
+
* await updateOrganizationThumbnail((VerdocsEndpoint.getDefault(), organizationId, file);
|
|
1844
1877
|
* ```
|
|
1845
1878
|
*/
|
|
1846
|
-
const
|
|
1879
|
+
const updateOrganizationThumbnail = (endpoint, organizationId, file, onUploadProgress) => {
|
|
1847
1880
|
const formData = new FormData();
|
|
1848
1881
|
formData.append('thumbnail', file, file.name);
|
|
1849
1882
|
return endpoint.api //
|
|
@@ -2782,5 +2815,5 @@ const updateProfilePhoto = (endpoint, profileId, file, onUploadProgress) => {
|
|
|
2782
2815
|
.then((r) => r.data);
|
|
2783
2816
|
};
|
|
2784
2817
|
|
|
2785
|
-
export { AtoB, Countries, VerdocsEndpoint, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, convertToE164, createApiKey, createEnvelope, createEnvelopeReminder, createField, createGroup, createInitials, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateReminder, createTemplateRole, createTemplatev2, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, deleteApiKey, deleteEnvelopeFieldAttachment, deleteEnvelopeReminder, deleteField, deleteGroupMember, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateReminder, deleteTemplateRole, deleteTemplateTag, downloadBlob, envelopeIsActive, envelopeIsComplete, envelopeRecipientAgree, envelopeRecipientChangeOwner, envelopeRecipientDecline, envelopeRecipientPrepare, envelopeRecipientSubmit, envelopeRecipientUpdateName, fileToDataUrl, formatFullName, formatInitials, formatShortTimeAgo, fullNameToInitials, getAllTags, getApiKeys, getCountryByCode, getCurrentProfile, getDocumentDownloadLink, getDocumentPreviewLink, getEnvelope, getEnvelopeDocument, getEnvelopeDocumentPageDisplayUri, getEnvelopeFile, getEnvelopeRecipients, getEnvelopeReminder, getEnvelopesByTemplateId, getEnvelopesSummary, getFieldAttachment, getFieldsForRole, getGroup, getGroups, getInPersonLink, getKbaStatus, getMatchingCountry, getNextRecipient, getNotifications, getOrganization, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers,
|
|
2818
|
+
export { AtoB, Countries, VerdocsEndpoint, acceptOrganizationInvitation, addGroupMember, addTemplateTag, authenticate, blobToBase64, canPerformTemplateAction, cancelEnvelope, capitalize, changePassword, convertToE164, createApiKey, createEnvelope, createEnvelopeReminder, createField, createGroup, createInitials, createOrganizationInvitation, createProfile, createSignature, createTag, createTemplate, createTemplateDocument, createTemplateFromSharepoint, createTemplateReminder, createTemplateRole, createTemplatev2, declineOrganizationInvitation, decodeAccessTokenBody, decodeJWTBody, deleteApiKey, deleteEnvelopeFieldAttachment, deleteEnvelopeReminder, deleteField, deleteGroupMember, deleteOrganizationInvitation, deleteOrganizationMember, deleteProfile, deleteSignature, deleteTemplate, deleteTemplateDocument, deleteTemplateReminder, deleteTemplateRole, deleteTemplateTag, downloadBlob, envelopeIsActive, envelopeIsComplete, envelopeRecipientAgree, envelopeRecipientChangeOwner, envelopeRecipientDecline, envelopeRecipientPrepare, envelopeRecipientSubmit, envelopeRecipientUpdateName, fileToDataUrl, formatFullName, formatInitials, formatShortTimeAgo, fullNameToInitials, getAllTags, getApiKeys, getCountryByCode, getCurrentProfile, getDocumentDownloadLink, getDocumentPreviewLink, getEnvelope, getEnvelopeDocument, getEnvelopeDocumentPageDisplayUri, getEnvelopeFile, getEnvelopeRecipients, getEnvelopeReminder, getEnvelopesByTemplateId, getEnvelopesSummary, getFieldAttachment, getFieldsForRole, getGroup, getGroups, getInPersonLink, getKbaStatus, getMatchingCountry, getNextRecipient, getNotifications, getOrganization, getOrganizationInvitation, getOrganizationInvitations, getOrganizationMembers, getPlusOneCountry, getProfile, getProfiles, getRGB, getRGBA, getRLeft, getRTop, getRValue, getRecipientsWithActions, getRoleColor, getSignature, getSignatures, getSignerToken, getSigningSession, getStars, getTag, getTemplate, getTemplateDocument, getTemplateDocumentFile, getTemplateDocumentPageDisplayUri, getTemplateDocumentThumbnail, getTemplateDocuments, getTemplateOwnerInfo, getTemplateReminder, getTemplateRole, getTemplateRoleFields, getTemplateRoles, getTemplateTags, getTemplates, getTemplatesSummary, getValidator, getValidators, getWebhooks, hasRequiredPermissions, integerSequence, isAmericanSamoa, isCanada, isDominicanRepublic, isFrenchGuiana, isGuadeloupe, isMartinique, isMayotte, isPuertoRico, isValidEmail, isValidPhone, isValidRoleName, isValidTag, listEnvelopes, listTemplates, nameToRGBA, recipientCanAct, recipientHasAction, refreshToken, rescale, resendInvitation, resendOrganizationInvitation, resendVerification, resetPassword, rotateApiKey, searchEnvelopes, searchTemplates, sendDelegate, setWebhooks, submitKbaChallengeResponse, submitKbaIdentity, submitKbaPin, switchProfile, throttledGetEnvelope, throttledGetTemplate, timePeriod, toggleStar, updateApiKey, updateEnvelopeField, updateEnvelopeFieldInitials, updateEnvelopeFieldSignature, updateEnvelopeReminder, updateField, updateGroup, updateOrganization, updateOrganizationInvitation, updateOrganizationLogo, updateOrganizationMember, updateOrganizationThumbnail, updateProfile, updateProfilePhoto, updateRecipient, updateTemplate, updateTemplateReminder, 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 };
|
|
2786
2819
|
//# sourceMappingURL=index.mjs.map
|